From 7653bc692e5e2905acb1d035843872ca5558377e Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 13 Nov 2023 03:14:13 +0000 Subject: [PATCH] CodeGen from PR 26676 in Azure/azure-rest-api-specs Merge 31f34074beec7a08aeccc0e6f9286106af40abf2 into 78eac0bd58633028293cb1ec1709baa200bed9e2 --- .../appservice/armappservice/CHANGELOG.md | 28 + .../appservice/armappservice/autorest.md | 6 +- .../armappservice/certificateorders_client.go | 444 +- .../certificateorders_client_example_test.go | 952 - .../certificateordersdiagnostics_client.go | 49 +- ...teordersdiagnostics_client_example_test.go | 150 - .../certificateregistrationprovider_client.go | 30 +- ...egistrationprovider_client_example_test.go | 216 - .../armappservice/certificates_client.go | 138 +- .../certificates_client_example_test.go | 275 - .../armappservice/client_factory.go | 123 +- .../appservice/armappservice/constants.go | 677 +- .../armappservice/containerapps_client.go | 156 +- .../containerapps_client_example_test.go | 400 - .../containerappsrevisions_client.go | 97 +- ...tainerappsrevisions_client_example_test.go | 197 - .../armappservice/deletedwebapps_client.go | 74 +- .../deletedwebapps_client_example_test.go | 96 - .../armappservice/diagnostics_client.go | 477 +- .../diagnostics_client_example_test.go | 1474 -- .../domainregistrationprovider_client.go | 30 +- ...egistrationprovider_client_example_test.go | 136 - .../armappservice/domains_client.go | 364 +- .../domains_client_example_test.go | 1196 - .../armappservice/environments_client.go | 1240 +- .../environments_client_example_test.go | 2889 --- .../fake/certificateorders_server.go | 932 + .../certificateordersdiagnostics_server.go | 187 + .../certificateregistrationprovider_server.go | 96 + .../armappservice/fake/certificates_server.go | 326 + .../fake/containerapps_server.go | 332 + .../fake/containerappsrevisions_server.go | 285 + .../fake/deletedwebapps_server.go | 189 + .../armappservice/fake/diagnostics_server.go | 1363 ++ .../fake/domainregistrationprovider_server.go | 96 + .../armappservice/fake/domains_server.go | 761 + .../armappservice/fake/environments_server.go | 2376 ++ .../fake/getusagesinlocation_server.go | 108 + .../armappservice/fake/global_server.go | 170 + .../appservice/armappservice/fake/internal.go | 91 + .../fake/kubeenvironments_server.go | 340 + .../armappservice/fake/plans_server.go | 1357 ++ .../armappservice/fake/provider_server.go | 406 + .../fake/recommendations_server.go | 858 + .../fake/resourcehealthmetadata_server.go | 334 + .../armappservice/fake/server_factory.go | 265 + .../armappservice/fake/staticsites_server.go | 3789 +++ .../armappservice/fake/time_rfc3339.go | 86 + .../fake/topleveldomains_server.go | 189 + .../armappservice/fake/webapps_server.go | 19683 ++++++++++++++++ .../fake/websitemanagement_server.go | 796 + .../workflowrunactionrepetitions_server.go | 245 + ...ctionrepetitionsrequesthistories_server.go | 188 + .../fake/workflowrunactions_server.go | 261 + ...orkflowrunactionscoperepetitions_server.go | 180 + .../armappservice/fake/workflowruns_server.go | 239 + .../armappservice/fake/workflows_server.go | 155 + .../fake/workflowtriggerhistories_server.go | 264 + .../fake/workflowtriggers_server.go | 346 + .../fake/workflowversions_server.go | 186 + .../getusagesinlocation_client.go | 104 + .../appservice/armappservice/global_client.go | 59 +- .../global_client_example_test.go | 99 - .../appservice/armappservice/go.mod | 20 +- .../appservice/armappservice/go.sum | 39 +- .../armappservice/kubeenvironments_client.go | 161 +- .../kubeenvironments_client_example_test.go | 290 - .../appservice/armappservice/models.go | 4645 +--- .../appservice/armappservice/models_serde.go | 702 +- .../appservice/armappservice/options.go | 4434 ++++ .../appservice/armappservice/plans_client.go | 574 +- .../plans_client_example_test.go | 348 - .../armappservice/provider_client.go | 180 +- .../provider_client_example_test.go | 13014 ---------- .../armappservice/recommendations_client.go | 296 +- .../resourcehealthmetadata_client.go | 143 +- ...ourcehealthmetadata_client_example_test.go | 158 - .../armappservice/response_types.go | 537 +- .../armappservice/staticsites_client.go | 1808 +- .../staticsites_client_example_test.go | 2499 -- .../appservice/armappservice/time_rfc3339.go | 43 +- .../armappservice/topleveldomains_client.go | 79 +- .../topleveldomains_client_example_test.go | 190 - .../armappservice/webapps_client.go | 8941 ++++--- .../webapps_client_example_test.go | 4327 ---- .../armappservice/websitemanagement_client.go | 453 +- .../websitemanagement_client_example_test.go | 160 - .../workflowrunactionrepetitions_client.go | 74 +- ...unactionrepetitions_client_example_test.go | 216 - ...ctionrepetitionsrequesthistories_client.go | 49 +- ...onsrequesthistories_client_example_test.go | 172 - .../workflowrunactions_client.go | 74 +- .../workflowrunactions_client_example_test.go | 147 - ...orkflowrunactionscoperepetitions_client.go | 49 +- ...ionscoperepetitions_client_example_test.go | 126 - .../armappservice/workflowruns_client.go | 65 +- .../workflowruns_client_example_test.go | 149 - .../armappservice/workflows_client.go | 47 +- .../workflows_client_example_test.go | 67 - .../workflowtriggerhistories_client.go | 78 +- ...lowtriggerhistories_client_example_test.go | 131 - .../armappservice/workflowtriggers_client.go | 116 +- .../workflowtriggers_client_example_test.go | 176 - .../armappservice/workflowversions_client.go | 49 +- .../workflowversions_client_example_test.go | 138 - 105 files changed, 53776 insertions(+), 41843 deletions(-) delete mode 100644 sdk/resourcemanager/appservice/armappservice/certificateorders_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/certificateordersdiagnostics_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/certificateregistrationprovider_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/certificates_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/containerapps_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/containerappsrevisions_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/deletedwebapps_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/diagnostics_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/domainregistrationprovider_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/domains_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/environments_client_example_test.go create mode 100644 sdk/resourcemanager/appservice/armappservice/fake/certificateorders_server.go create mode 100644 sdk/resourcemanager/appservice/armappservice/fake/certificateordersdiagnostics_server.go create mode 100644 sdk/resourcemanager/appservice/armappservice/fake/certificateregistrationprovider_server.go create mode 100644 sdk/resourcemanager/appservice/armappservice/fake/certificates_server.go create mode 100644 sdk/resourcemanager/appservice/armappservice/fake/containerapps_server.go create mode 100644 sdk/resourcemanager/appservice/armappservice/fake/containerappsrevisions_server.go create mode 100644 sdk/resourcemanager/appservice/armappservice/fake/deletedwebapps_server.go create mode 100644 sdk/resourcemanager/appservice/armappservice/fake/diagnostics_server.go create mode 100644 sdk/resourcemanager/appservice/armappservice/fake/domainregistrationprovider_server.go create mode 100644 sdk/resourcemanager/appservice/armappservice/fake/domains_server.go create mode 100644 sdk/resourcemanager/appservice/armappservice/fake/environments_server.go create mode 100644 sdk/resourcemanager/appservice/armappservice/fake/getusagesinlocation_server.go create mode 100644 sdk/resourcemanager/appservice/armappservice/fake/global_server.go create mode 100644 sdk/resourcemanager/appservice/armappservice/fake/internal.go create mode 100644 sdk/resourcemanager/appservice/armappservice/fake/kubeenvironments_server.go create mode 100644 sdk/resourcemanager/appservice/armappservice/fake/plans_server.go create mode 100644 sdk/resourcemanager/appservice/armappservice/fake/provider_server.go create mode 100644 sdk/resourcemanager/appservice/armappservice/fake/recommendations_server.go create mode 100644 sdk/resourcemanager/appservice/armappservice/fake/resourcehealthmetadata_server.go create mode 100644 sdk/resourcemanager/appservice/armappservice/fake/server_factory.go create mode 100644 sdk/resourcemanager/appservice/armappservice/fake/staticsites_server.go create mode 100644 sdk/resourcemanager/appservice/armappservice/fake/time_rfc3339.go create mode 100644 sdk/resourcemanager/appservice/armappservice/fake/topleveldomains_server.go create mode 100644 sdk/resourcemanager/appservice/armappservice/fake/webapps_server.go create mode 100644 sdk/resourcemanager/appservice/armappservice/fake/websitemanagement_server.go create mode 100644 sdk/resourcemanager/appservice/armappservice/fake/workflowrunactionrepetitions_server.go create mode 100644 sdk/resourcemanager/appservice/armappservice/fake/workflowrunactionrepetitionsrequesthistories_server.go create mode 100644 sdk/resourcemanager/appservice/armappservice/fake/workflowrunactions_server.go create mode 100644 sdk/resourcemanager/appservice/armappservice/fake/workflowrunactionscoperepetitions_server.go create mode 100644 sdk/resourcemanager/appservice/armappservice/fake/workflowruns_server.go create mode 100644 sdk/resourcemanager/appservice/armappservice/fake/workflows_server.go create mode 100644 sdk/resourcemanager/appservice/armappservice/fake/workflowtriggerhistories_server.go create mode 100644 sdk/resourcemanager/appservice/armappservice/fake/workflowtriggers_server.go create mode 100644 sdk/resourcemanager/appservice/armappservice/fake/workflowversions_server.go create mode 100644 sdk/resourcemanager/appservice/armappservice/getusagesinlocation_client.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/global_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/kubeenvironments_client_example_test.go create mode 100644 sdk/resourcemanager/appservice/armappservice/options.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/plans_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/provider_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/resourcehealthmetadata_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/staticsites_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/topleveldomains_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/webapps_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/websitemanagement_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitions_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitionsrequesthistories_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/workflowrunactions_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/workflowrunactionscoperepetitions_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/workflowruns_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/workflows_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/workflowtriggerhistories_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/workflowtriggers_client_example_test.go delete mode 100644 sdk/resourcemanager/appservice/armappservice/workflowversions_client_example_test.go diff --git a/sdk/resourcemanager/appservice/armappservice/CHANGELOG.md b/sdk/resourcemanager/appservice/armappservice/CHANGELOG.md index 8dad11feaa20..3ba937e7a1ce 100644 --- a/sdk/resourcemanager/appservice/armappservice/CHANGELOG.md +++ b/sdk/resourcemanager/appservice/armappservice/CHANGELOG.md @@ -1,5 +1,33 @@ # Release History +## 3.0.0 (2023-11-13) +### Breaking Changes + +- Function `timeRFC3339.MarshalText` has been removed +- Function `*timeRFC3339.Parse` has been removed +- Function `*timeRFC3339.UnmarshalText` has been removed + +### Features Added + +- New enum type `DaprLogLevel` with values `DaprLogLevelDebug`, `DaprLogLevelError`, `DaprLogLevelInfo`, `DaprLogLevelWarn` +- New enum type `TLSCipherSuites` with values `TLSCipherSuitesTLSAES128GCMSHA256`, `TLSCipherSuitesTLSAES256GCMSHA384`, `TLSCipherSuitesTLSECDHEECDSAWITHAES128CBCSHA256`, `TLSCipherSuitesTLSECDHEECDSAWITHAES128GCMSHA256`, `TLSCipherSuitesTLSECDHEECDSAWITHAES256GCMSHA384`, `TLSCipherSuitesTLSECDHERSAWITHAES128CBCSHA`, `TLSCipherSuitesTLSECDHERSAWITHAES128CBCSHA256`, `TLSCipherSuitesTLSECDHERSAWITHAES128GCMSHA256`, `TLSCipherSuitesTLSECDHERSAWITHAES256CBCSHA`, `TLSCipherSuitesTLSECDHERSAWITHAES256CBCSHA384`, `TLSCipherSuitesTLSECDHERSAWITHAES256GCMSHA384`, `TLSCipherSuitesTLSRSAWITHAES128CBCSHA`, `TLSCipherSuitesTLSRSAWITHAES128CBCSHA256`, `TLSCipherSuitesTLSRSAWITHAES128GCMSHA256`, `TLSCipherSuitesTLSRSAWITHAES256CBCSHA`, `TLSCipherSuitesTLSRSAWITHAES256CBCSHA256`, `TLSCipherSuitesTLSRSAWITHAES256GCMSHA384` +- New function `*ClientFactory.NewGetUsagesInLocationClient() *GetUsagesInLocationClient` +- New function `NewGetUsagesInLocationClient(string, azcore.TokenCredential, *arm.ClientOptions) (*GetUsagesInLocationClient, error)` +- New function `*GetUsagesInLocationClient.NewListPager(string, *GetUsagesInLocationClientListOptions) *runtime.Pager[GetUsagesInLocationClientListResponse]` +- New function `*WebSiteManagementClient.NewListAseRegionsPager(*WebSiteManagementClientListAseRegionsOptions) *runtime.Pager[WebSiteManagementClientListAseRegionsResponse]` +- New function `dateTimeRFC3339.MarshalText() ([]byte, error)` +- New function `*dateTimeRFC3339.Parse(string) error` +- New function `*dateTimeRFC3339.UnmarshalText([]byte) error` +- New struct `AseRegion` +- New struct `AseRegionCollection` +- New struct `AseRegionProperties` +- New struct `DaprConfig` +- New struct `ResourceConfig` +- New field `EnvironmentID` in struct `ResourceNameAvailabilityRequest` +- New field `MinTLSCipherSuite` in struct `SiteConfig` +- New field `DaprConfig`, `ResourceConfig`, `WorkloadProfileName` in struct `SiteProperties` + + ## 2.1.1 (2023-04-14) ### Bug Fixes diff --git a/sdk/resourcemanager/appservice/armappservice/autorest.md b/sdk/resourcemanager/appservice/armappservice/autorest.md index 2dbf39ba84b8..6b2c1fcb7fbf 100644 --- a/sdk/resourcemanager/appservice/armappservice/autorest.md +++ b/sdk/resourcemanager/appservice/armappservice/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/readme.go.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/web/resource-manager/readme.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/web/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 2.1.1 +module-version: 3.0.0 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/appservice/armappservice/certificateorders_client.go b/sdk/resourcemanager/appservice/armappservice/certificateorders_client.go index 599cf2c02d4a..231fcd838918 100644 --- a/sdk/resourcemanager/appservice/armappservice/certificateorders_client.go +++ b/sdk/resourcemanager/appservice/armappservice/certificateorders_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappservice @@ -33,7 +32,7 @@ type CertificateOrdersClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewCertificateOrdersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CertificateOrdersClient, error) { - cl, err := arm.NewClient(moduleName+".CertificateOrdersClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,7 +46,7 @@ func NewCertificateOrdersClient(subscriptionID string, credential azcore.TokenCr // BeginCreateOrUpdate - Description for Create or update a certificate purchase order. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - certificateOrderName - Name of the certificate order. // - certificateDistinguishedName - Distinguished name to use for the certificate order. @@ -59,29 +58,40 @@ func (client *CertificateOrdersClient) BeginCreateOrUpdate(ctx context.Context, if err != nil { return nil, err } - return runtime.NewPoller[CertificateOrdersClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CertificateOrdersClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[CertificateOrdersClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CertificateOrdersClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateOrUpdate - Description for Create or update a certificate purchase order. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *CertificateOrdersClient) createOrUpdate(ctx context.Context, resourceGroupName string, certificateOrderName string, certificateDistinguishedName CertificateOrder, options *CertificateOrdersClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "CertificateOrdersClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, certificateOrderName, certificateDistinguishedName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -104,16 +114,19 @@ func (client *CertificateOrdersClient) createOrUpdateCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, certificateDistinguishedName) + if err := runtime.MarshalAsJSON(req, certificateDistinguishedName); err != nil { + return nil, err + } + return req, nil } // BeginCreateOrUpdateCertificate - Description for Creates or updates a certificate and associates with key vault secret. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - certificateOrderName - Name of the certificate order. // - name - Name of the certificate. @@ -126,29 +139,40 @@ func (client *CertificateOrdersClient) BeginCreateOrUpdateCertificate(ctx contex if err != nil { return nil, err } - return runtime.NewPoller[CertificateOrdersClientCreateOrUpdateCertificateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[CertificateOrdersClientCreateOrUpdateCertificateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[CertificateOrdersClientCreateOrUpdateCertificateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[CertificateOrdersClientCreateOrUpdateCertificateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateOrUpdateCertificate - Description for Creates or updates a certificate and associates with key vault secret. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *CertificateOrdersClient) createOrUpdateCertificate(ctx context.Context, resourceGroupName string, certificateOrderName string, name string, keyVaultCertificate CertificateResource, options *CertificateOrdersClientBeginCreateOrUpdateCertificateOptions) (*http.Response, error) { + var err error + const operationName = "CertificateOrdersClient.BeginCreateOrUpdateCertificate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCertificateCreateRequest(ctx, resourceGroupName, certificateOrderName, name, keyVaultCertificate, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCertificateCreateRequest creates the CreateOrUpdateCertificate request. @@ -175,31 +199,40 @@ func (client *CertificateOrdersClient) createOrUpdateCertificateCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, keyVaultCertificate) + if err := runtime.MarshalAsJSON(req, keyVaultCertificate); err != nil { + return nil, err + } + return req, nil } // Delete - Description for Delete an existing certificate order. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - certificateOrderName - Name of the certificate order. // - options - CertificateOrdersClientDeleteOptions contains the optional parameters for the CertificateOrdersClient.Delete // method. func (client *CertificateOrdersClient) Delete(ctx context.Context, resourceGroupName string, certificateOrderName string, options *CertificateOrdersClientDeleteOptions) (CertificateOrdersClientDeleteResponse, error) { + var err error + const operationName = "CertificateOrdersClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, certificateOrderName, options) if err != nil { return CertificateOrdersClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificateOrdersClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return CertificateOrdersClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return CertificateOrdersClientDeleteResponse{}, err } return CertificateOrdersClientDeleteResponse{}, nil } @@ -224,7 +257,7 @@ func (client *CertificateOrdersClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -233,23 +266,29 @@ func (client *CertificateOrdersClient) deleteCreateRequest(ctx context.Context, // DeleteCertificate - Description for Delete the certificate associated with a certificate order. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - certificateOrderName - Name of the certificate order. // - name - Name of the certificate. // - options - CertificateOrdersClientDeleteCertificateOptions contains the optional parameters for the CertificateOrdersClient.DeleteCertificate // method. func (client *CertificateOrdersClient) DeleteCertificate(ctx context.Context, resourceGroupName string, certificateOrderName string, name string, options *CertificateOrdersClientDeleteCertificateOptions) (CertificateOrdersClientDeleteCertificateResponse, error) { + var err error + const operationName = "CertificateOrdersClient.DeleteCertificate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCertificateCreateRequest(ctx, resourceGroupName, certificateOrderName, name, options) if err != nil { return CertificateOrdersClientDeleteCertificateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificateOrdersClientDeleteCertificateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return CertificateOrdersClientDeleteCertificateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return CertificateOrdersClientDeleteCertificateResponse{}, err } return CertificateOrdersClientDeleteCertificateResponse{}, nil } @@ -278,7 +317,7 @@ func (client *CertificateOrdersClient) deleteCertificateCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -287,23 +326,30 @@ func (client *CertificateOrdersClient) deleteCertificateCreateRequest(ctx contex // Get - Description for Get a certificate order. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - certificateOrderName - Name of the certificate order.. // - options - CertificateOrdersClientGetOptions contains the optional parameters for the CertificateOrdersClient.Get method. func (client *CertificateOrdersClient) Get(ctx context.Context, resourceGroupName string, certificateOrderName string, options *CertificateOrdersClientGetOptions) (CertificateOrdersClientGetResponse, error) { + var err error + const operationName = "CertificateOrdersClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, certificateOrderName, options) if err != nil { return CertificateOrdersClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificateOrdersClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateOrdersClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificateOrdersClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -326,7 +372,7 @@ func (client *CertificateOrdersClient) getCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -344,25 +390,32 @@ func (client *CertificateOrdersClient) getHandleResponse(resp *http.Response) (C // GetCertificate - Description for Get the certificate associated with a certificate order. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - certificateOrderName - Name of the certificate order. // - name - Name of the certificate. // - options - CertificateOrdersClientGetCertificateOptions contains the optional parameters for the CertificateOrdersClient.GetCertificate // method. func (client *CertificateOrdersClient) GetCertificate(ctx context.Context, resourceGroupName string, certificateOrderName string, name string, options *CertificateOrdersClientGetCertificateOptions) (CertificateOrdersClientGetCertificateResponse, error) { + var err error + const operationName = "CertificateOrdersClient.GetCertificate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCertificateCreateRequest(ctx, resourceGroupName, certificateOrderName, name, options) if err != nil { return CertificateOrdersClientGetCertificateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificateOrdersClientGetCertificateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateOrdersClientGetCertificateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificateOrdersClientGetCertificateResponse{}, err } - return client.getCertificateHandleResponse(resp) + resp, err := client.getCertificateHandleResponse(httpResp) + return resp, err } // getCertificateCreateRequest creates the GetCertificate request. @@ -389,7 +442,7 @@ func (client *CertificateOrdersClient) getCertificateCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -406,7 +459,7 @@ func (client *CertificateOrdersClient) getCertificateHandleResponse(resp *http.R // NewListPager - Description for List all certificate orders in a subscription. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - options - CertificateOrdersClientListOptions contains the optional parameters for the CertificateOrdersClient.NewListPager // method. func (client *CertificateOrdersClient) NewListPager(options *CertificateOrdersClientListOptions) *runtime.Pager[CertificateOrdersClientListResponse] { @@ -415,25 +468,20 @@ func (client *CertificateOrdersClient) NewListPager(options *CertificateOrdersCl return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *CertificateOrdersClientListResponse) (CertificateOrdersClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return CertificateOrdersClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CertificateOrdersClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return CertificateOrdersClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateOrdersClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -449,7 +497,7 @@ func (client *CertificateOrdersClient) listCreateRequest(ctx context.Context, op return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -466,7 +514,7 @@ func (client *CertificateOrdersClient) listHandleResponse(resp *http.Response) ( // NewListByResourceGroupPager - Description for Get certificate orders in a resource group. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - options - CertificateOrdersClientListByResourceGroupOptions contains the optional parameters for the CertificateOrdersClient.NewListByResourceGroupPager // method. @@ -476,25 +524,20 @@ func (client *CertificateOrdersClient) NewListByResourceGroupPager(resourceGroup return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *CertificateOrdersClientListByResourceGroupResponse) (CertificateOrdersClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CertificateOrdersClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return CertificateOrdersClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return CertificateOrdersClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateOrdersClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -514,7 +557,7 @@ func (client *CertificateOrdersClient) listByResourceGroupCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -531,7 +574,7 @@ func (client *CertificateOrdersClient) listByResourceGroupHandleResponse(resp *h // NewListCertificatesPager - Description for List all certificates associated with a certificate order. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - certificateOrderName - Name of the certificate order. // - options - CertificateOrdersClientListCertificatesOptions contains the optional parameters for the CertificateOrdersClient.NewListCertificatesPager @@ -542,25 +585,20 @@ func (client *CertificateOrdersClient) NewListCertificatesPager(resourceGroupNam return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *CertificateOrdersClientListCertificatesResponse) (CertificateOrdersClientListCertificatesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCertificatesCreateRequest(ctx, resourceGroupName, certificateOrderName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return CertificateOrdersClientListCertificatesResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CertificateOrdersClient.NewListCertificatesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCertificatesCreateRequest(ctx, resourceGroupName, certificateOrderName, options) + }, nil) if err != nil { return CertificateOrdersClientListCertificatesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateOrdersClientListCertificatesResponse{}, runtime.NewResponseError(resp) - } return client.listCertificatesHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -584,7 +622,7 @@ func (client *CertificateOrdersClient) listCertificatesCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -602,23 +640,29 @@ func (client *CertificateOrdersClient) listCertificatesHandleResponse(resp *http // Reissue - Description for Reissue an existing certificate order. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - certificateOrderName - Name of the certificate order. // - reissueCertificateOrderRequest - Parameters for the reissue. // - options - CertificateOrdersClientReissueOptions contains the optional parameters for the CertificateOrdersClient.Reissue // method. func (client *CertificateOrdersClient) Reissue(ctx context.Context, resourceGroupName string, certificateOrderName string, reissueCertificateOrderRequest ReissueCertificateOrderRequest, options *CertificateOrdersClientReissueOptions) (CertificateOrdersClientReissueResponse, error) { + var err error + const operationName = "CertificateOrdersClient.Reissue" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.reissueCreateRequest(ctx, resourceGroupName, certificateOrderName, reissueCertificateOrderRequest, options) if err != nil { return CertificateOrdersClientReissueResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificateOrdersClientReissueResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return CertificateOrdersClientReissueResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return CertificateOrdersClientReissueResponse{}, err } return CertificateOrdersClientReissueResponse{}, nil } @@ -643,31 +687,40 @@ func (client *CertificateOrdersClient) reissueCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, reissueCertificateOrderRequest) + if err := runtime.MarshalAsJSON(req, reissueCertificateOrderRequest); err != nil { + return nil, err + } + return req, nil } // Renew - Description for Renew an existing certificate order. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - certificateOrderName - Name of the certificate order. // - renewCertificateOrderRequest - Renew parameters // - options - CertificateOrdersClientRenewOptions contains the optional parameters for the CertificateOrdersClient.Renew method. func (client *CertificateOrdersClient) Renew(ctx context.Context, resourceGroupName string, certificateOrderName string, renewCertificateOrderRequest RenewCertificateOrderRequest, options *CertificateOrdersClientRenewOptions) (CertificateOrdersClientRenewResponse, error) { + var err error + const operationName = "CertificateOrdersClient.Renew" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.renewCreateRequest(ctx, resourceGroupName, certificateOrderName, renewCertificateOrderRequest, options) if err != nil { return CertificateOrdersClientRenewResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificateOrdersClientRenewResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return CertificateOrdersClientRenewResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return CertificateOrdersClientRenewResponse{}, err } return CertificateOrdersClientRenewResponse{}, nil } @@ -692,31 +745,40 @@ func (client *CertificateOrdersClient) renewCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, renewCertificateOrderRequest) + if err := runtime.MarshalAsJSON(req, renewCertificateOrderRequest); err != nil { + return nil, err + } + return req, nil } // ResendEmail - Description for Resend certificate email. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - certificateOrderName - Name of the certificate order. // - options - CertificateOrdersClientResendEmailOptions contains the optional parameters for the CertificateOrdersClient.ResendEmail // method. func (client *CertificateOrdersClient) ResendEmail(ctx context.Context, resourceGroupName string, certificateOrderName string, options *CertificateOrdersClientResendEmailOptions) (CertificateOrdersClientResendEmailResponse, error) { + var err error + const operationName = "CertificateOrdersClient.ResendEmail" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.resendEmailCreateRequest(ctx, resourceGroupName, certificateOrderName, options) if err != nil { return CertificateOrdersClientResendEmailResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificateOrdersClientResendEmailResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return CertificateOrdersClientResendEmailResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return CertificateOrdersClientResendEmailResponse{}, err } return CertificateOrdersClientResendEmailResponse{}, nil } @@ -741,7 +803,7 @@ func (client *CertificateOrdersClient) resendEmailCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -751,23 +813,29 @@ func (client *CertificateOrdersClient) resendEmailCreateRequest(ctx context.Cont // certificate order // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - certificateOrderName - Name of the certificate order. // - nameIdentifier - Email address // - options - CertificateOrdersClientResendRequestEmailsOptions contains the optional parameters for the CertificateOrdersClient.ResendRequestEmails // method. func (client *CertificateOrdersClient) ResendRequestEmails(ctx context.Context, resourceGroupName string, certificateOrderName string, nameIdentifier NameIdentifier, options *CertificateOrdersClientResendRequestEmailsOptions) (CertificateOrdersClientResendRequestEmailsResponse, error) { + var err error + const operationName = "CertificateOrdersClient.ResendRequestEmails" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.resendRequestEmailsCreateRequest(ctx, resourceGroupName, certificateOrderName, nameIdentifier, options) if err != nil { return CertificateOrdersClientResendRequestEmailsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificateOrdersClientResendRequestEmailsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return CertificateOrdersClientResendRequestEmailsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return CertificateOrdersClientResendRequestEmailsResponse{}, err } return CertificateOrdersClientResendRequestEmailsResponse{}, nil } @@ -792,33 +860,43 @@ func (client *CertificateOrdersClient) resendRequestEmailsCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, nameIdentifier) + if err := runtime.MarshalAsJSON(req, nameIdentifier); err != nil { + return nil, err + } + return req, nil } // RetrieveCertificateActions - Description for Retrieve the list of certificate actions. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the certificate order. // - options - CertificateOrdersClientRetrieveCertificateActionsOptions contains the optional parameters for the CertificateOrdersClient.RetrieveCertificateActions // method. func (client *CertificateOrdersClient) RetrieveCertificateActions(ctx context.Context, resourceGroupName string, name string, options *CertificateOrdersClientRetrieveCertificateActionsOptions) (CertificateOrdersClientRetrieveCertificateActionsResponse, error) { + var err error + const operationName = "CertificateOrdersClient.RetrieveCertificateActions" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.retrieveCertificateActionsCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return CertificateOrdersClientRetrieveCertificateActionsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificateOrdersClientRetrieveCertificateActionsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateOrdersClientRetrieveCertificateActionsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificateOrdersClientRetrieveCertificateActionsResponse{}, err } - return client.retrieveCertificateActionsHandleResponse(resp) + resp, err := client.retrieveCertificateActionsHandleResponse(httpResp) + return resp, err } // retrieveCertificateActionsCreateRequest creates the RetrieveCertificateActions request. @@ -841,7 +919,7 @@ func (client *CertificateOrdersClient) retrieveCertificateActionsCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -859,24 +937,31 @@ func (client *CertificateOrdersClient) retrieveCertificateActionsHandleResponse( // RetrieveCertificateEmailHistory - Description for Retrieve email history. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the certificate order. // - options - CertificateOrdersClientRetrieveCertificateEmailHistoryOptions contains the optional parameters for the CertificateOrdersClient.RetrieveCertificateEmailHistory // method. func (client *CertificateOrdersClient) RetrieveCertificateEmailHistory(ctx context.Context, resourceGroupName string, name string, options *CertificateOrdersClientRetrieveCertificateEmailHistoryOptions) (CertificateOrdersClientRetrieveCertificateEmailHistoryResponse, error) { + var err error + const operationName = "CertificateOrdersClient.RetrieveCertificateEmailHistory" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.retrieveCertificateEmailHistoryCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return CertificateOrdersClientRetrieveCertificateEmailHistoryResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificateOrdersClientRetrieveCertificateEmailHistoryResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateOrdersClientRetrieveCertificateEmailHistoryResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificateOrdersClientRetrieveCertificateEmailHistoryResponse{}, err } - return client.retrieveCertificateEmailHistoryHandleResponse(resp) + resp, err := client.retrieveCertificateEmailHistoryHandleResponse(httpResp) + return resp, err } // retrieveCertificateEmailHistoryCreateRequest creates the RetrieveCertificateEmailHistory request. @@ -899,7 +984,7 @@ func (client *CertificateOrdersClient) retrieveCertificateEmailHistoryCreateRequ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -923,25 +1008,32 @@ func (client *CertificateOrdersClient) retrieveCertificateEmailHistoryHandleResp // and hosted by the reseller, to minimize delays for customer page load times. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - certificateOrderName - Name of the certificate order. // - siteSealRequest - Site seal request. // - options - CertificateOrdersClientRetrieveSiteSealOptions contains the optional parameters for the CertificateOrdersClient.RetrieveSiteSeal // method. func (client *CertificateOrdersClient) RetrieveSiteSeal(ctx context.Context, resourceGroupName string, certificateOrderName string, siteSealRequest SiteSealRequest, options *CertificateOrdersClientRetrieveSiteSealOptions) (CertificateOrdersClientRetrieveSiteSealResponse, error) { + var err error + const operationName = "CertificateOrdersClient.RetrieveSiteSeal" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.retrieveSiteSealCreateRequest(ctx, resourceGroupName, certificateOrderName, siteSealRequest, options) if err != nil { return CertificateOrdersClientRetrieveSiteSealResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificateOrdersClientRetrieveSiteSealResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateOrdersClientRetrieveSiteSealResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificateOrdersClientRetrieveSiteSealResponse{}, err } - return client.retrieveSiteSealHandleResponse(resp) + resp, err := client.retrieveSiteSealHandleResponse(httpResp) + return resp, err } // retrieveSiteSealCreateRequest creates the RetrieveSiteSeal request. @@ -964,10 +1056,13 @@ func (client *CertificateOrdersClient) retrieveSiteSealCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, siteSealRequest) + if err := runtime.MarshalAsJSON(req, siteSealRequest); err != nil { + return nil, err + } + return req, nil } // retrieveSiteSealHandleResponse handles the RetrieveSiteSeal response. @@ -982,25 +1077,32 @@ func (client *CertificateOrdersClient) retrieveSiteSealHandleResponse(resp *http // Update - Description for Create or update a certificate purchase order. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - certificateOrderName - Name of the certificate order. // - certificateDistinguishedName - Distinguished name to use for the certificate order. // - options - CertificateOrdersClientUpdateOptions contains the optional parameters for the CertificateOrdersClient.Update // method. func (client *CertificateOrdersClient) Update(ctx context.Context, resourceGroupName string, certificateOrderName string, certificateDistinguishedName CertificateOrderPatchResource, options *CertificateOrdersClientUpdateOptions) (CertificateOrdersClientUpdateResponse, error) { + var err error + const operationName = "CertificateOrdersClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, certificateOrderName, certificateDistinguishedName, options) if err != nil { return CertificateOrdersClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificateOrdersClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateOrdersClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificateOrdersClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -1023,10 +1125,13 @@ func (client *CertificateOrdersClient) updateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, certificateDistinguishedName) + if err := runtime.MarshalAsJSON(req, certificateDistinguishedName); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. @@ -1041,7 +1146,7 @@ func (client *CertificateOrdersClient) updateHandleResponse(resp *http.Response) // UpdateCertificate - Description for Creates or updates a certificate and associates with key vault secret. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - certificateOrderName - Name of the certificate order. // - name - Name of the certificate. @@ -1049,18 +1154,25 @@ func (client *CertificateOrdersClient) updateHandleResponse(resp *http.Response) // - options - CertificateOrdersClientUpdateCertificateOptions contains the optional parameters for the CertificateOrdersClient.UpdateCertificate // method. func (client *CertificateOrdersClient) UpdateCertificate(ctx context.Context, resourceGroupName string, certificateOrderName string, name string, keyVaultCertificate CertificatePatchResource, options *CertificateOrdersClientUpdateCertificateOptions) (CertificateOrdersClientUpdateCertificateResponse, error) { + var err error + const operationName = "CertificateOrdersClient.UpdateCertificate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCertificateCreateRequest(ctx, resourceGroupName, certificateOrderName, name, keyVaultCertificate, options) if err != nil { return CertificateOrdersClientUpdateCertificateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificateOrdersClientUpdateCertificateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateOrdersClientUpdateCertificateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificateOrdersClientUpdateCertificateResponse{}, err } - return client.updateCertificateHandleResponse(resp) + resp, err := client.updateCertificateHandleResponse(httpResp) + return resp, err } // updateCertificateCreateRequest creates the UpdateCertificate request. @@ -1087,10 +1199,13 @@ func (client *CertificateOrdersClient) updateCertificateCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, keyVaultCertificate) + if err := runtime.MarshalAsJSON(req, keyVaultCertificate); err != nil { + return nil, err + } + return req, nil } // updateCertificateHandleResponse handles the UpdateCertificate response. @@ -1105,21 +1220,27 @@ func (client *CertificateOrdersClient) updateCertificateHandleResponse(resp *htt // ValidatePurchaseInformation - Description for Validate information for a certificate order. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - appServiceCertificateOrder - Information for a certificate order. // - options - CertificateOrdersClientValidatePurchaseInformationOptions contains the optional parameters for the CertificateOrdersClient.ValidatePurchaseInformation // method. func (client *CertificateOrdersClient) ValidatePurchaseInformation(ctx context.Context, appServiceCertificateOrder CertificateOrder, options *CertificateOrdersClientValidatePurchaseInformationOptions) (CertificateOrdersClientValidatePurchaseInformationResponse, error) { + var err error + const operationName = "CertificateOrdersClient.ValidatePurchaseInformation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.validatePurchaseInformationCreateRequest(ctx, appServiceCertificateOrder, options) if err != nil { return CertificateOrdersClientValidatePurchaseInformationResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificateOrdersClientValidatePurchaseInformationResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return CertificateOrdersClientValidatePurchaseInformationResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return CertificateOrdersClientValidatePurchaseInformationResponse{}, err } return CertificateOrdersClientValidatePurchaseInformationResponse{}, nil } @@ -1136,31 +1257,40 @@ func (client *CertificateOrdersClient) validatePurchaseInformationCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, appServiceCertificateOrder) + if err := runtime.MarshalAsJSON(req, appServiceCertificateOrder); err != nil { + return nil, err + } + return req, nil } // VerifyDomainOwnership - Description for Verify domain ownership for this certificate order. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - certificateOrderName - Name of the certificate order. // - options - CertificateOrdersClientVerifyDomainOwnershipOptions contains the optional parameters for the CertificateOrdersClient.VerifyDomainOwnership // method. func (client *CertificateOrdersClient) VerifyDomainOwnership(ctx context.Context, resourceGroupName string, certificateOrderName string, options *CertificateOrdersClientVerifyDomainOwnershipOptions) (CertificateOrdersClientVerifyDomainOwnershipResponse, error) { + var err error + const operationName = "CertificateOrdersClient.VerifyDomainOwnership" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.verifyDomainOwnershipCreateRequest(ctx, resourceGroupName, certificateOrderName, options) if err != nil { return CertificateOrdersClientVerifyDomainOwnershipResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificateOrdersClientVerifyDomainOwnershipResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return CertificateOrdersClientVerifyDomainOwnershipResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return CertificateOrdersClientVerifyDomainOwnershipResponse{}, err } return CertificateOrdersClientVerifyDomainOwnershipResponse{}, nil } @@ -1185,7 +1315,7 @@ func (client *CertificateOrdersClient) verifyDomainOwnershipCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/certificateorders_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/certificateorders_client_example_test.go deleted file mode 100644 index 416200ee3105..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/certificateorders_client_example_test.go +++ /dev/null @@ -1,952 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-09-01/examples/ListAppServiceCertificateOrdersBySubscription.json -func ExampleCertificateOrdersClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewCertificateOrdersClient().NewListPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.CertificateOrderCollection = armappservice.CertificateOrderCollection{ - // Value: []*armappservice.CertificateOrder{ - // { - // Name: to.Ptr("SampleCertificateOrderName"), - // Type: to.Ptr("Microsoft.CertificateRegistration/certificateOrders"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.CertificateRegistration/certificateOrders/SampleCertificateOrderName"), - // Location: to.Ptr("Global"), - // Properties: &armappservice.CertificateOrderProperties{ - // AppServiceCertificateNotRenewableReasons: []*armappservice.ResourceNotRenewableReason{ - // to.Ptr(armappservice.ResourceNotRenewableReasonExpirationNotInRenewalTimeRange)}, - // AutoRenew: to.Ptr(true), - // Certificates: map[string]*armappservice.Certificate{ - // "SampleCertName1": &armappservice.Certificate{ - // KeyVaultID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), - // KeyVaultSecretName: to.Ptr("SampleSecretName1"), - // ProvisioningState: to.Ptr(armappservice.KeyVaultSecretStatusSucceeded), - // }, - // "SampleCertName2": &armappservice.Certificate{ - // KeyVaultID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), - // KeyVaultSecretName: to.Ptr("SampleSecretName2"), - // ProvisioningState: to.Ptr(armappservice.KeyVaultSecretStatusSucceeded), - // }, - // }, - // Contact: &armappservice.CertificateOrderContact{ - // Email: to.Ptr("contact@email.com"), - // NameFirst: to.Ptr("SampleFirstName"), - // NameLast: to.Ptr("SampleLastName"), - // Phone: to.Ptr("1-224-550-332"), - // }, - // Csr: to.Ptr("xdf!x|"), - // DistinguishedName: to.Ptr("CN=SampleCustomDomain.com"), - // DomainVerificationToken: to.Ptr("awe4163Br6d32r"), - // ExpirationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-12T23:40:25+00:00"); return t}()), - // Intermediate: &armappservice.CertificateDetails{ - // Issuer: to.Ptr("CACert"), - // NotAfter: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-12T23:40:25+00:00"); return t}()), - // NotBefore: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-12T23:40:25+00:00"); return t}()), - // SerialNumber: to.Ptr("k45kad0024"), - // SignatureAlgorithm: to.Ptr("SHA"), - // Subject: to.Ptr("CN=IntermediateCertSubjectName"), - // Thumbprint: to.Ptr("RF3D7411A44163B6D32B3343559B03E175886EBFE"), - // Version: to.Ptr[int32](5589220), - // }, - // IsPrivateKeyExternal: to.Ptr(false), - // KeySize: to.Ptr[int32](2048), - // LastCertificateIssuanceTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-12T23:40:25+00:00"); return t}()), - // NextAutoRenewalTimeStamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-12T23:40:25+00:00"); return t}()), - // ProductType: to.Ptr(armappservice.CertificateProductTypeStandardDomainValidatedSSL), - // ProvisioningState: to.Ptr(armappservice.ProvisioningStateSucceeded), - // Root: &armappservice.CertificateDetails{ - // Issuer: to.Ptr("CACert"), - // NotAfter: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-12T23:40:25+00:00"); return t}()), - // NotBefore: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-12T23:40:25+00:00"); return t}()), - // SerialNumber: to.Ptr("jkskd890ajdd00124"), - // SignatureAlgorithm: to.Ptr("SHA"), - // Subject: to.Ptr("CN=RootCertSubjectName"), - // Thumbprint: to.Ptr("ZD3D7411A44163B6D32B3343559B03E175886EBFE"), - // Version: to.Ptr[int32](3430921), - // }, - // SerialNumber: to.Ptr("12324325325"), - // SignedCertificate: &armappservice.CertificateDetails{ - // Issuer: to.Ptr("CACert"), - // NotAfter: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-12T23:40:25+00:00"); return t}()), - // NotBefore: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-12T23:40:25+00:00"); return t}()), - // SerialNumber: to.Ptr("sds12424k"), - // SignatureAlgorithm: to.Ptr("SHA"), - // Subject: to.Ptr("CN=CertSubjectName"), - // Thumbprint: to.Ptr("FE703D7411A44163B6D32B3AD9B03E175886EBFE"), - // Version: to.Ptr[int32](1232490), - // }, - // Status: to.Ptr(armappservice.CertificateOrderStatusIssued), - // ValidityInYears: to.Ptr[int32](2), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-09-01/examples/ValidateAppServiceCertificatePurchaseInformationBySubscription.json -func ExampleCertificateOrdersClient_ValidatePurchaseInformation() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewCertificateOrdersClient().ValidatePurchaseInformation(ctx, armappservice.CertificateOrder{ - Location: to.Ptr("Global"), - Properties: &armappservice.CertificateOrderProperties{ - AutoRenew: to.Ptr(true), - Certificates: map[string]*armappservice.Certificate{ - "SampleCertName1": { - KeyVaultID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), - KeyVaultSecretName: to.Ptr("SampleSecretName1"), - }, - "SampleCertName2": { - KeyVaultID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), - KeyVaultSecretName: to.Ptr("SampleSecretName2"), - }, - }, - DistinguishedName: to.Ptr("CN=SampleCustomDomain.com"), - KeySize: to.Ptr[int32](2048), - ProductType: to.Ptr(armappservice.CertificateProductTypeStandardDomainValidatedSSL), - ValidityInYears: to.Ptr[int32](2), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-09-01/examples/ListAppServiceCertificateOrdersByResourceGroup.json -func ExampleCertificateOrdersClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewCertificateOrdersClient().NewListByResourceGroupPager("testrg123", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.CertificateOrderCollection = armappservice.CertificateOrderCollection{ - // Value: []*armappservice.CertificateOrder{ - // { - // Name: to.Ptr("SampleCertificateOrderName"), - // Type: to.Ptr("Microsoft.CertificateRegistration/certificateOrders"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.CertificateRegistration/certificateOrders/SampleCertificateOrderName"), - // Location: to.Ptr("Global"), - // Properties: &armappservice.CertificateOrderProperties{ - // AppServiceCertificateNotRenewableReasons: []*armappservice.ResourceNotRenewableReason{ - // to.Ptr(armappservice.ResourceNotRenewableReasonExpirationNotInRenewalTimeRange)}, - // AutoRenew: to.Ptr(true), - // Certificates: map[string]*armappservice.Certificate{ - // "SampleCertName1": &armappservice.Certificate{ - // KeyVaultID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), - // KeyVaultSecretName: to.Ptr("SampleSecretName1"), - // ProvisioningState: to.Ptr(armappservice.KeyVaultSecretStatusSucceeded), - // }, - // "SampleCertName2": &armappservice.Certificate{ - // KeyVaultID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), - // KeyVaultSecretName: to.Ptr("SampleSecretName2"), - // ProvisioningState: to.Ptr(armappservice.KeyVaultSecretStatusSucceeded), - // }, - // }, - // Contact: &armappservice.CertificateOrderContact{ - // Email: to.Ptr("contact@email.com"), - // NameFirst: to.Ptr("SampleFirstName"), - // NameLast: to.Ptr("SampleLastName"), - // Phone: to.Ptr("1-224-550-332"), - // }, - // Csr: to.Ptr("xdf!x|"), - // DistinguishedName: to.Ptr("CN=SampleCustomDomain.com"), - // DomainVerificationToken: to.Ptr("awe4163Br6d32r"), - // ExpirationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-12T23:40:25+00:00"); return t}()), - // Intermediate: &armappservice.CertificateDetails{ - // Issuer: to.Ptr("CACert"), - // NotAfter: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-12T23:40:25+00:00"); return t}()), - // NotBefore: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-12T23:40:25+00:00"); return t}()), - // SerialNumber: to.Ptr("k45kad0024"), - // SignatureAlgorithm: to.Ptr("SHA"), - // Subject: to.Ptr("CN=IntermediateCertSubjectName"), - // Thumbprint: to.Ptr("RF3D7411A44163B6D32B3343559B03E175886EBFE"), - // Version: to.Ptr[int32](5589220), - // }, - // IsPrivateKeyExternal: to.Ptr(false), - // KeySize: to.Ptr[int32](2048), - // LastCertificateIssuanceTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-12T23:40:25+00:00"); return t}()), - // NextAutoRenewalTimeStamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-12T23:40:25+00:00"); return t}()), - // ProductType: to.Ptr(armappservice.CertificateProductTypeStandardDomainValidatedSSL), - // ProvisioningState: to.Ptr(armappservice.ProvisioningStateSucceeded), - // Root: &armappservice.CertificateDetails{ - // Issuer: to.Ptr("CACert"), - // NotAfter: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-12T23:40:25+00:00"); return t}()), - // NotBefore: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-12T23:40:25+00:00"); return t}()), - // SerialNumber: to.Ptr("jkskd890ajdd00124"), - // SignatureAlgorithm: to.Ptr("SHA"), - // Subject: to.Ptr("CN=RootCertSubjectName"), - // Thumbprint: to.Ptr("ZD3D7411A44163B6D32B3343559B03E175886EBFE"), - // Version: to.Ptr[int32](3430921), - // }, - // SerialNumber: to.Ptr("12324325325"), - // SignedCertificate: &armappservice.CertificateDetails{ - // Issuer: to.Ptr("CACert"), - // NotAfter: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-12T23:40:25+00:00"); return t}()), - // NotBefore: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-12T23:40:25+00:00"); return t}()), - // SerialNumber: to.Ptr("sds12424k"), - // SignatureAlgorithm: to.Ptr("SHA"), - // Subject: to.Ptr("CN=CertSubjectName"), - // Thumbprint: to.Ptr("FE703D7411A44163B6D32B3AD9B03E175886EBFE"), - // Version: to.Ptr[int32](123249), - // }, - // Status: to.Ptr(armappservice.CertificateOrderStatusIssued), - // ValidityInYears: to.Ptr[int32](2), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-09-01/examples/GetAppServiceCertificateOrder.json -func ExampleCertificateOrdersClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewCertificateOrdersClient().Get(ctx, "testrg123", "SampleCertificateOrderName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CertificateOrder = armappservice.CertificateOrder{ - // Name: to.Ptr("SampleCertificateOrderName"), - // Type: to.Ptr("Microsoft.CertificateRegistration/certificateOrders"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.CertificateRegistration/certificateOrders/SampleCertificateOrderName"), - // Location: to.Ptr("Global"), - // Properties: &armappservice.CertificateOrderProperties{ - // AppServiceCertificateNotRenewableReasons: []*armappservice.ResourceNotRenewableReason{ - // to.Ptr(armappservice.ResourceNotRenewableReasonExpirationNotInRenewalTimeRange)}, - // AutoRenew: to.Ptr(true), - // Certificates: map[string]*armappservice.Certificate{ - // "SampleCertName1": &armappservice.Certificate{ - // KeyVaultID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), - // KeyVaultSecretName: to.Ptr("SampleSecretName1"), - // ProvisioningState: to.Ptr(armappservice.KeyVaultSecretStatusSucceeded), - // }, - // "SampleCertName2": &armappservice.Certificate{ - // KeyVaultID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), - // KeyVaultSecretName: to.Ptr("SampleSecretName2"), - // ProvisioningState: to.Ptr(armappservice.KeyVaultSecretStatusSucceeded), - // }, - // }, - // Contact: &armappservice.CertificateOrderContact{ - // Email: to.Ptr("contact@email.com"), - // NameFirst: to.Ptr("SampleFirstName"), - // NameLast: to.Ptr("SampleLastName"), - // Phone: to.Ptr("1-224-550-332"), - // }, - // Csr: to.Ptr("xdf!x|"), - // DistinguishedName: to.Ptr("CN=SampleCustomDomain.com"), - // DomainVerificationToken: to.Ptr("awe4163Br6d32r"), - // ExpirationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-12T23:40:25+00:00"); return t}()), - // Intermediate: &armappservice.CertificateDetails{ - // Issuer: to.Ptr("CACert"), - // NotAfter: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-12T23:40:25+00:00"); return t}()), - // NotBefore: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-12T23:40:25+00:00"); return t}()), - // SerialNumber: to.Ptr("k45kad0024"), - // SignatureAlgorithm: to.Ptr("SHA"), - // Subject: to.Ptr("CN=IntermediateCertSubjectName"), - // Thumbprint: to.Ptr("RF3D7411A44163B6D32B3343559B03E175886EBFE"), - // Version: to.Ptr[int32](5589220), - // }, - // IsPrivateKeyExternal: to.Ptr(false), - // KeySize: to.Ptr[int32](2048), - // LastCertificateIssuanceTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-12T23:40:25+00:00"); return t}()), - // NextAutoRenewalTimeStamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-12T23:40:25+00:00"); return t}()), - // ProductType: to.Ptr(armappservice.CertificateProductTypeStandardDomainValidatedSSL), - // ProvisioningState: to.Ptr(armappservice.ProvisioningStateSucceeded), - // Root: &armappservice.CertificateDetails{ - // Issuer: to.Ptr("CACert"), - // NotAfter: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-12T23:40:25+00:00"); return t}()), - // NotBefore: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-12T23:40:25+00:00"); return t}()), - // SerialNumber: to.Ptr("jkskd890ajdd00124"), - // SignatureAlgorithm: to.Ptr("SHA"), - // Subject: to.Ptr("CN=RootCertSubjectName"), - // Thumbprint: to.Ptr("ZD3D7411A44163B6D32B3343559B03E175886EBFE"), - // Version: to.Ptr[int32](3430921), - // }, - // SerialNumber: to.Ptr("12324325325"), - // SignedCertificate: &armappservice.CertificateDetails{ - // Issuer: to.Ptr("CACert"), - // NotAfter: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-12T23:40:25+00:00"); return t}()), - // NotBefore: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-12T23:40:25+00:00"); return t}()), - // SerialNumber: to.Ptr("sds12424k"), - // SignatureAlgorithm: to.Ptr("SHA"), - // Subject: to.Ptr("CN=CertSubjectName"), - // Thumbprint: to.Ptr("FE703D7411A44163B6D32B3AD9B03E175886EBFE"), - // Version: to.Ptr[int32](1232490), - // }, - // Status: to.Ptr(armappservice.CertificateOrderStatusIssued), - // ValidityInYears: to.Ptr[int32](2), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-09-01/examples/CreateAppServiceCertificateOrder.json -func ExampleCertificateOrdersClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewCertificateOrdersClient().BeginCreateOrUpdate(ctx, "testrg123", "SampleCertificateOrderName", armappservice.CertificateOrder{ - Location: to.Ptr("Global"), - Properties: &armappservice.CertificateOrderProperties{ - AutoRenew: to.Ptr(true), - Certificates: map[string]*armappservice.Certificate{ - "SampleCertName1": { - KeyVaultID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), - KeyVaultSecretName: to.Ptr("SampleSecretName1"), - }, - "SampleCertName2": { - KeyVaultID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), - KeyVaultSecretName: to.Ptr("SampleSecretName2"), - }, - }, - DistinguishedName: to.Ptr("CN=SampleCustomDomain.com"), - KeySize: to.Ptr[int32](2048), - ProductType: to.Ptr(armappservice.CertificateProductTypeStandardDomainValidatedSSL), - ValidityInYears: to.Ptr[int32](2), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CertificateOrder = armappservice.CertificateOrder{ - // Name: to.Ptr("SampleCertificateOrderName"), - // Type: to.Ptr("Microsoft.CertificateRegistration/certificateOrders"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.CertificateRegistration/certificateOrders/SampleCertificateOrderName"), - // Location: to.Ptr("Global"), - // Properties: &armappservice.CertificateOrderProperties{ - // AppServiceCertificateNotRenewableReasons: []*armappservice.ResourceNotRenewableReason{ - // to.Ptr(armappservice.ResourceNotRenewableReasonExpirationNotInRenewalTimeRange)}, - // AutoRenew: to.Ptr(true), - // Certificates: map[string]*armappservice.Certificate{ - // "SampleCertName1": &armappservice.Certificate{ - // KeyVaultID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), - // KeyVaultSecretName: to.Ptr("SampleSecretName1"), - // ProvisioningState: to.Ptr(armappservice.KeyVaultSecretStatusSucceeded), - // }, - // "SampleCertName2": &armappservice.Certificate{ - // KeyVaultID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), - // KeyVaultSecretName: to.Ptr("SampleSecretName2"), - // ProvisioningState: to.Ptr(armappservice.KeyVaultSecretStatusSucceeded), - // }, - // }, - // Contact: &armappservice.CertificateOrderContact{ - // Email: to.Ptr("contact@email.com"), - // NameFirst: to.Ptr("SampleFirstName"), - // NameLast: to.Ptr("SampleLastName"), - // Phone: to.Ptr("1-224-550-332"), - // }, - // Csr: to.Ptr("xdf!x|"), - // DistinguishedName: to.Ptr("CN=SampleCustomDomain.com"), - // DomainVerificationToken: to.Ptr("awe4163Br6d32r"), - // ExpirationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-12T23:40:25+00:00"); return t}()), - // Intermediate: &armappservice.CertificateDetails{ - // Issuer: to.Ptr("CACert"), - // NotAfter: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-12T23:40:25+00:00"); return t}()), - // NotBefore: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-12T23:40:25+00:00"); return t}()), - // SerialNumber: to.Ptr("k45kad0024"), - // SignatureAlgorithm: to.Ptr("SHA"), - // Subject: to.Ptr("CN=IntermediateCertSubjectName"), - // Thumbprint: to.Ptr("RF3D7411A44163B6D32B3343559B03E175886EBFE"), - // Version: to.Ptr[int32](5589220), - // }, - // IsPrivateKeyExternal: to.Ptr(false), - // KeySize: to.Ptr[int32](2048), - // LastCertificateIssuanceTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-12T23:40:25+00:00"); return t}()), - // NextAutoRenewalTimeStamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-12T23:40:25+00:00"); return t}()), - // ProductType: to.Ptr(armappservice.CertificateProductTypeStandardDomainValidatedSSL), - // ProvisioningState: to.Ptr(armappservice.ProvisioningStateSucceeded), - // Root: &armappservice.CertificateDetails{ - // Issuer: to.Ptr("CACert"), - // NotAfter: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-12T23:40:25+00:00"); return t}()), - // NotBefore: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-12T23:40:25+00:00"); return t}()), - // SerialNumber: to.Ptr("jkskd890ajdd00124"), - // SignatureAlgorithm: to.Ptr("SHA"), - // Subject: to.Ptr("CN=RootCertSubjectName"), - // Thumbprint: to.Ptr("ZD3D7411A44163B6D32B3343559B03E175886EBFE"), - // Version: to.Ptr[int32](3430921), - // }, - // SerialNumber: to.Ptr("12324325325"), - // SignedCertificate: &armappservice.CertificateDetails{ - // Issuer: to.Ptr("CACert"), - // NotAfter: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-12T23:40:25+00:00"); return t}()), - // NotBefore: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-12T23:40:25+00:00"); return t}()), - // SerialNumber: to.Ptr("sds12424k"), - // SignatureAlgorithm: to.Ptr("SHA"), - // Subject: to.Ptr("CN=CertSubjectName"), - // Thumbprint: to.Ptr("FE703D7411A44163B6D32B3AD9B03E175886EBFE"), - // Version: to.Ptr[int32](1232490), - // }, - // Status: to.Ptr(armappservice.CertificateOrderStatusIssued), - // ValidityInYears: to.Ptr[int32](2), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-09-01/examples/DeleteAppServiceCertificateOrder.json -func ExampleCertificateOrdersClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewCertificateOrdersClient().Delete(ctx, "testrg123", "SampleCertificateOrderName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-09-01/examples/UpdateAppServiceCertificateOrder.json -func ExampleCertificateOrdersClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewCertificateOrdersClient().Update(ctx, "testrg123", "SampleCertificateOrderName", armappservice.CertificateOrderPatchResource{ - Properties: &armappservice.CertificateOrderPatchResourceProperties{ - AutoRenew: to.Ptr(true), - Certificates: map[string]*armappservice.Certificate{ - "SampleCertName1": { - KeyVaultID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), - KeyVaultSecretName: to.Ptr("SampleSecretName1"), - }, - "SampleCertName2": { - KeyVaultID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), - KeyVaultSecretName: to.Ptr("SampleSecretName2"), - }, - }, - DistinguishedName: to.Ptr("CN=SampleCustomDomain.com"), - KeySize: to.Ptr[int32](2048), - ProductType: to.Ptr(armappservice.CertificateProductTypeStandardDomainValidatedSSL), - ValidityInYears: to.Ptr[int32](2), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CertificateOrder = armappservice.CertificateOrder{ - // Name: to.Ptr("SampleCertificateOrderName"), - // Type: to.Ptr("Microsoft.CertificateRegistration/certificateOrders"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.CertificateRegistration/certificateOrders/SampleCertificateOrderName"), - // Location: to.Ptr("Global"), - // Properties: &armappservice.CertificateOrderProperties{ - // AppServiceCertificateNotRenewableReasons: []*armappservice.ResourceNotRenewableReason{ - // to.Ptr(armappservice.ResourceNotRenewableReasonExpirationNotInRenewalTimeRange)}, - // AutoRenew: to.Ptr(true), - // Certificates: map[string]*armappservice.Certificate{ - // "SampleCertName1": &armappservice.Certificate{ - // KeyVaultID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), - // KeyVaultSecretName: to.Ptr("SampleSecretName1"), - // ProvisioningState: to.Ptr(armappservice.KeyVaultSecretStatusSucceeded), - // }, - // "SampleCertName2": &armappservice.Certificate{ - // KeyVaultID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), - // KeyVaultSecretName: to.Ptr("SampleSecretName2"), - // ProvisioningState: to.Ptr(armappservice.KeyVaultSecretStatusSucceeded), - // }, - // }, - // Contact: &armappservice.CertificateOrderContact{ - // Email: to.Ptr("contact@email.com"), - // NameFirst: to.Ptr("SampleFirstName"), - // NameLast: to.Ptr("SampleLastName"), - // Phone: to.Ptr("1-224-550-332"), - // }, - // Csr: to.Ptr("xdf!x|"), - // DistinguishedName: to.Ptr("CN=SampleCustomDomain.com"), - // DomainVerificationToken: to.Ptr("awe4163Br6d32r"), - // ExpirationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-12T23:40:25+00:00"); return t}()), - // Intermediate: &armappservice.CertificateDetails{ - // Issuer: to.Ptr("CACert"), - // NotAfter: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-12T23:40:25+00:00"); return t}()), - // NotBefore: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-12T23:40:25+00:00"); return t}()), - // SerialNumber: to.Ptr("k45kad0024"), - // SignatureAlgorithm: to.Ptr("SHA"), - // Subject: to.Ptr("CN=IntermediateCertSubjectName"), - // Thumbprint: to.Ptr("RF3D7411A44163B6D32B3343559B03E175886EBFE"), - // Version: to.Ptr[int32](5589220), - // }, - // IsPrivateKeyExternal: to.Ptr(false), - // KeySize: to.Ptr[int32](2048), - // LastCertificateIssuanceTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-12T23:40:25+00:00"); return t}()), - // NextAutoRenewalTimeStamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-12T23:40:25+00:00"); return t}()), - // ProductType: to.Ptr(armappservice.CertificateProductTypeStandardDomainValidatedSSL), - // ProvisioningState: to.Ptr(armappservice.ProvisioningStateSucceeded), - // Root: &armappservice.CertificateDetails{ - // Issuer: to.Ptr("CACert"), - // NotAfter: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-12T23:40:25+00:00"); return t}()), - // NotBefore: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-12T23:40:25+00:00"); return t}()), - // SerialNumber: to.Ptr("jkskd890ajdd00124"), - // SignatureAlgorithm: to.Ptr("SHA"), - // Subject: to.Ptr("CN=RootCertSubjectName"), - // Thumbprint: to.Ptr("ZD3D7411A44163B6D32B3343559B03E175886EBFE"), - // Version: to.Ptr[int32](3430921), - // }, - // SerialNumber: to.Ptr("12324325325"), - // SignedCertificate: &armappservice.CertificateDetails{ - // Issuer: to.Ptr("CACert"), - // NotAfter: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-12T23:40:25+00:00"); return t}()), - // NotBefore: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-12T23:40:25+00:00"); return t}()), - // SerialNumber: to.Ptr("sds12424k"), - // SignatureAlgorithm: to.Ptr("SHA"), - // Subject: to.Ptr("CN=CertSubjectName"), - // Thumbprint: to.Ptr("FE703D7411A44163B6D32B3AD9B03E175886EBFE"), - // Version: to.Ptr[int32](1232490), - // }, - // Status: to.Ptr(armappservice.CertificateOrderStatusIssued), - // ValidityInYears: to.Ptr[int32](2), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-09-01/examples/ListCertificatesByAppServiceCertificateOrder.json -func ExampleCertificateOrdersClient_NewListCertificatesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewCertificateOrdersClient().NewListCertificatesPager("testrg123", "SampleCertificateOrderName", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.CertificateCollection = armappservice.CertificateCollection{ - // Value: []*armappservice.CertificateResource{ - // { - // Name: to.Ptr("SampleCertName1"), - // Type: to.Ptr("Microsoft.CertificateRegistration/certificateOrders/certificates"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.CertificateRegistration/certificateOrders/SampleCertificateOrderName/certificates/SampleCertName1"), - // Location: to.Ptr("Global"), - // Properties: &armappservice.Certificate{ - // KeyVaultID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), - // KeyVaultSecretName: to.Ptr("SampleSecretName1"), - // ProvisioningState: to.Ptr(armappservice.KeyVaultSecretStatusSucceeded), - // }, - // }, - // { - // Name: to.Ptr("SampleCertName2"), - // Type: to.Ptr("Microsoft.CertificateRegistration/certificateOrders/certificates"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.CertificateRegistration/certificateOrders/SampleCertificateOrderName/certificates/SampleCertName2"), - // Location: to.Ptr("Global"), - // Properties: &armappservice.Certificate{ - // KeyVaultID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), - // KeyVaultSecretName: to.Ptr("SampleCertName2"), - // ProvisioningState: to.Ptr(armappservice.KeyVaultSecretStatusSucceeded), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-09-01/examples/GetAppServiceCertificate.json -func ExampleCertificateOrdersClient_GetCertificate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewCertificateOrdersClient().GetCertificate(ctx, "testrg123", "SampleCertificateOrderName", "SampleCertName1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CertificateResource = armappservice.CertificateResource{ - // Name: to.Ptr("SampleCertName1"), - // Type: to.Ptr("Microsoft.CertificateRegistration/certificateOrders/certificates"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.CertificateRegistration/certificateOrders/SampleCertificateOrderName/certificates/SampleCertName1"), - // Location: to.Ptr("Global"), - // Properties: &armappservice.Certificate{ - // KeyVaultID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), - // KeyVaultSecretName: to.Ptr("SampleSecretName1"), - // ProvisioningState: to.Ptr(armappservice.KeyVaultSecretStatusSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-09-01/examples/CreateAppServiceCertificate.json -func ExampleCertificateOrdersClient_BeginCreateOrUpdateCertificate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewCertificateOrdersClient().BeginCreateOrUpdateCertificate(ctx, "testrg123", "SampleCertificateOrderName", "SampleCertName1", armappservice.CertificateResource{ - Location: to.Ptr("Global"), - Properties: &armappservice.Certificate{ - KeyVaultID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), - KeyVaultSecretName: to.Ptr("SampleSecretName1"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CertificateResource = armappservice.CertificateResource{ - // Name: to.Ptr("SampleCertName1"), - // Type: to.Ptr("Microsoft.CertificateRegistration/certificateOrders/certificates"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.CertificateRegistration/certificateOrders/SampleCertificateOrderName/certificates/SampleCertName1"), - // Location: to.Ptr("Global"), - // Properties: &armappservice.Certificate{ - // KeyVaultID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), - // KeyVaultSecretName: to.Ptr("SampleSecretName1"), - // ProvisioningState: to.Ptr(armappservice.KeyVaultSecretStatusSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-09-01/examples/DeleteAppServiceCertificate.json -func ExampleCertificateOrdersClient_DeleteCertificate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewCertificateOrdersClient().DeleteCertificate(ctx, "testrg123", "SampleCertificateOrderName", "SampleCertName1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-09-01/examples/UpdateAppServiceCertificate.json -func ExampleCertificateOrdersClient_UpdateCertificate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewCertificateOrdersClient().UpdateCertificate(ctx, "testrg123", "SampleCertificateOrderName", "SampleCertName1", armappservice.CertificatePatchResource{ - Properties: &armappservice.Certificate{ - KeyVaultID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), - KeyVaultSecretName: to.Ptr("SampleSecretName1"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CertificateResource = armappservice.CertificateResource{ - // Name: to.Ptr("SampleCertName1"), - // Type: to.Ptr("Microsoft.CertificateRegistration/certificateOrders/certificates"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.CertificateRegistration/certificateOrders/SampleCertificateOrderName/certificates/SampleCertName1"), - // Location: to.Ptr("Global"), - // Properties: &armappservice.Certificate{ - // KeyVaultID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), - // KeyVaultSecretName: to.Ptr("SampleSecretName1"), - // ProvisioningState: to.Ptr(armappservice.KeyVaultSecretStatusSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-09-01/examples/ReissueAppServiceCertificateOrder.json -func ExampleCertificateOrdersClient_Reissue() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewCertificateOrdersClient().Reissue(ctx, "testrg123", "SampleCertificateOrderName", armappservice.ReissueCertificateOrderRequest{ - Properties: &armappservice.ReissueCertificateOrderRequestProperties{ - Csr: to.Ptr("CSR1223238Value"), - DelayExistingRevokeInHours: to.Ptr[int32](2), - IsPrivateKeyExternal: to.Ptr(false), - KeySize: to.Ptr[int32](2048), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-09-01/examples/RenewAppServiceCertificateOrder.json -func ExampleCertificateOrdersClient_Renew() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewCertificateOrdersClient().Renew(ctx, "testrg123", "SampleCertificateOrderName", armappservice.RenewCertificateOrderRequest{ - Properties: &armappservice.RenewCertificateOrderRequestProperties{ - Csr: to.Ptr("CSR1223238Value"), - IsPrivateKeyExternal: to.Ptr(false), - KeySize: to.Ptr[int32](2048), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-09-01/examples/ResendAppServiceCertificateOrderEmail.json -func ExampleCertificateOrdersClient_ResendEmail() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewCertificateOrdersClient().ResendEmail(ctx, "testrg123", "SampleCertificateOrderName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-09-01/examples/ResendDomainOwnershipVerificationEmail.json -func ExampleCertificateOrdersClient_ResendRequestEmails() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewCertificateOrdersClient().ResendRequestEmails(ctx, "testrg123", "SampleCertificateOrderName", armappservice.NameIdentifier{ - Name: to.Ptr("Domain name"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-09-01/examples/RetrieveSiteSeal.json -func ExampleCertificateOrdersClient_RetrieveSiteSeal() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewCertificateOrdersClient().RetrieveSiteSeal(ctx, "testrg123", "SampleCertOrder", armappservice.SiteSealRequest{ - LightTheme: to.Ptr(true), - Locale: to.Ptr("en-us"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SiteSeal = armappservice.SiteSeal{ - // HTML: to.Ptr("SiteSeal"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-09-01/examples/VerifyDomainOwnership.json -func ExampleCertificateOrdersClient_VerifyDomainOwnership() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewCertificateOrdersClient().VerifyDomainOwnership(ctx, "testrg123", "SampleCertificateOrderName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-09-01/examples/RetrieveCertificateOrderActions.json -func ExampleCertificateOrdersClient_RetrieveCertificateActions() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewCertificateOrdersClient().RetrieveCertificateActions(ctx, "testrg123", "SampleCertOrder", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CertificateOrderActionArray = []*armappservice.CertificateOrderAction{ - // { - // ActionType: to.Ptr(armappservice.CertificateOrderActionTypeFraudDetected), - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-12T23:40:25+00:00"); return t}()), - // }, - // { - // ActionType: to.Ptr(armappservice.CertificateOrderActionTypeCertificateRevoked), - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-12T23:40:25+00:00"); return t}()), - // }, - // { - // ActionType: to.Ptr(armappservice.CertificateOrderActionTypeCertificateIssued), - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-12T23:40:25+00:00"); return t}()), - // }} -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-09-01/examples/RetrieveCertificateEmailHistory.json -func ExampleCertificateOrdersClient_RetrieveCertificateEmailHistory() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewCertificateOrdersClient().RetrieveCertificateEmailHistory(ctx, "testrg123", "SampleCertOrder", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CertificateEmailArray = []*armappservice.CertificateEmail{ - // { - // EmailID: to.Ptr("customer@email.com"), - // TimeStamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-12T23:40:25+00:00"); return t}()), - // }, - // { - // EmailID: to.Ptr("customer@email.com"), - // TimeStamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-11-12T23:40:25+00:00"); return t}()), - // }} -} diff --git a/sdk/resourcemanager/appservice/armappservice/certificateordersdiagnostics_client.go b/sdk/resourcemanager/appservice/armappservice/certificateordersdiagnostics_client.go index d0b6d991b634..86fd67e41ce8 100644 --- a/sdk/resourcemanager/appservice/armappservice/certificateordersdiagnostics_client.go +++ b/sdk/resourcemanager/appservice/armappservice/certificateordersdiagnostics_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappservice @@ -34,7 +33,7 @@ type CertificateOrdersDiagnosticsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewCertificateOrdersDiagnosticsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CertificateOrdersDiagnosticsClient, error) { - cl, err := arm.NewClient(moduleName+".CertificateOrdersDiagnosticsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -49,25 +48,32 @@ func NewCertificateOrdersDiagnosticsClient(subscriptionID string, credential azc // response from App Lens. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - certificateOrderName - The certificate order name for which the response is needed. // - detectorName - The detector name which needs to be run. // - options - CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseOptions contains the optional // parameters for the CertificateOrdersDiagnosticsClient.GetAppServiceCertificateOrderDetectorResponse method. func (client *CertificateOrdersDiagnosticsClient) GetAppServiceCertificateOrderDetectorResponse(ctx context.Context, resourceGroupName string, certificateOrderName string, detectorName string, options *CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseOptions) (CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseResponse, error) { + var err error + const operationName = "CertificateOrdersDiagnosticsClient.GetAppServiceCertificateOrderDetectorResponse" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getAppServiceCertificateOrderDetectorResponseCreateRequest(ctx, resourceGroupName, certificateOrderName, detectorName, options) if err != nil { return CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseResponse{}, err } - return client.getAppServiceCertificateOrderDetectorResponseHandleResponse(resp) + resp, err := client.getAppServiceCertificateOrderDetectorResponseHandleResponse(httpResp) + return resp, err } // getAppServiceCertificateOrderDetectorResponseCreateRequest creates the GetAppServiceCertificateOrderDetectorResponse request. @@ -103,7 +109,7 @@ func (client *CertificateOrdersDiagnosticsClient) getAppServiceCertificateOrderD if options != nil && options.TimeGrain != nil { reqQP.Set("timeGrain", *options.TimeGrain) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -121,7 +127,7 @@ func (client *CertificateOrdersDiagnosticsClient) getAppServiceCertificateOrderD // NewListAppServiceCertificateOrderDetectorResponsePager - Description for Microsoft.CertificateRegistration to get the list // of detectors for this RP. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - certificateOrderName - The certificate order name for which the response is needed. // - options - CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseOptions contains the optional @@ -132,25 +138,20 @@ func (client *CertificateOrdersDiagnosticsClient) NewListAppServiceCertificateOr return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse) (CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listAppServiceCertificateOrderDetectorResponseCreateRequest(ctx, resourceGroupName, certificateOrderName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CertificateOrdersDiagnosticsClient.NewListAppServiceCertificateOrderDetectorResponsePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAppServiceCertificateOrderDetectorResponseCreateRequest(ctx, resourceGroupName, certificateOrderName, options) + }, nil) if err != nil { return CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse{}, runtime.NewResponseError(resp) - } return client.listAppServiceCertificateOrderDetectorResponseHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -174,7 +175,7 @@ func (client *CertificateOrdersDiagnosticsClient) listAppServiceCertificateOrder return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/certificateordersdiagnostics_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/certificateordersdiagnostics_client_example_test.go deleted file mode 100644 index 3f7ff69e6ce3..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/certificateordersdiagnostics_client_example_test.go +++ /dev/null @@ -1,150 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-09-01/examples/Diagnostics_ListAppServiceCertificateOrderDetectorResponse.json -func ExampleCertificateOrdersDiagnosticsClient_NewListAppServiceCertificateOrderDetectorResponsePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewCertificateOrdersDiagnosticsClient().NewListAppServiceCertificateOrderDetectorResponsePager("Sample-WestUSResourceGroup", "SampleCertificateOrderName", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DetectorResponseCollection = armappservice.DetectorResponseCollection{ - // Value: []*armappservice.DetectorResponse{ - // { - // Name: to.Ptr("CertsImport"), - // Type: to.Ptr("Microsoft.Web/certificateOrders/detectors"), - // ID: to.Ptr("/subscriptions/5700fc96-77b4-4f8d-afce-c353d8c443bd/resourceGroups/Sample-WestUSResourceGroup/providers/Microsoft.CertificateRegistration/certificateOrders/SampleCertificateOrderName/detectors/CertsImport"), - // Properties: &armappservice.DetectorResponseProperties{ - // Dataset: []*armappservice.DiagnosticData{ - // }, - // Metadata: &armappservice.DetectorInfo{ - // Name: to.Ptr("Certificates Import/Upload"), - // Author: to.Ptr(""), - // ID: to.Ptr("CertsImport"), - // }, - // Status: &armappservice.Status{ - // StatusID: to.Ptr(armappservice.InsightStatusNone), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-09-01/examples/Diagnostics_GetAppServiceCertificateOrderDetectorResponse.json -func ExampleCertificateOrdersDiagnosticsClient_GetAppServiceCertificateOrderDetectorResponse() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewCertificateOrdersDiagnosticsClient().GetAppServiceCertificateOrderDetectorResponse(ctx, "Sample-WestUSResourceGroup", "SampleCertificateOrderName", "AutoRenewStatus", &armappservice.CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseOptions{StartTime: nil, - EndTime: nil, - TimeGrain: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DetectorResponse = armappservice.DetectorResponse{ - // Name: to.Ptr("AutoRenewStatus"), - // ID: to.Ptr("/subscriptions/5700fc96-77b4-4f8d-afce-c353d8c443bd/resourceGroups/Sample-WestUSResourceGroup/providers/Microsoft.CertificateRegistration/certificateOrders/SampleCertificateOrderName/detectors/AutoRenewStatus"), - // Properties: &armappservice.DetectorResponseProperties{ - // Dataset: []*armappservice.DiagnosticData{ - // { - // RenderingProperties: &armappservice.Rendering{ - // Type: to.Ptr(armappservice.RenderingTypeInsights), - // }, - // Table: &armappservice.DataTableResponseObject{ - // Columns: []*armappservice.DataTableResponseColumn{ - // { - // ColumnName: to.Ptr("Status"), - // DataType: to.Ptr("String"), - // }, - // { - // ColumnName: to.Ptr("Message"), - // DataType: to.Ptr("String"), - // }, - // { - // ColumnName: to.Ptr("Data.Name"), - // DataType: to.Ptr("String"), - // }, - // { - // ColumnName: to.Ptr("Data.Value"), - // DataType: to.Ptr("String"), - // }, - // { - // ColumnName: to.Ptr("Expanded"), - // DataType: to.Ptr("String"), - // }, - // { - // ColumnName: to.Ptr("Solutions"), - // DataType: to.Ptr("String"), - // }}, - // Rows: [][]*string{ - // []*string{ - // to.Ptr("Info"), - // to.Ptr("App Service Certificate name SampleCertificateOrderName"), - // to.Ptr("Certificate for"), - // to.Ptr("*.mysampledomain.com"), - // to.Ptr("False"), - // to.Ptr("null")}, - // []*string{ - // to.Ptr("Info"), - // to.Ptr("App Service Certificate name SampleCertificateOrderName"), - // to.Ptr("Certificate Status"), - // to.Ptr("Issued"), - // to.Ptr("False"), - // to.Ptr("null")}}, - // TableName: to.Ptr(""), - // }, - // }}, - // Metadata: &armappservice.DetectorInfo{ - // Name: to.Ptr("AutoRenewStatus"), - // Type: to.Ptr(armappservice.DetectorTypeDetector), - // Description: to.Ptr("Check auto renew status"), - // ID: to.Ptr("AutoRenewStatus"), - // Score: to.Ptr[float32](0), - // SupportTopicList: []*armappservice.SupportTopic{ - // }, - // }, - // }, - // } -} diff --git a/sdk/resourcemanager/appservice/armappservice/certificateregistrationprovider_client.go b/sdk/resourcemanager/appservice/armappservice/certificateregistrationprovider_client.go index c549e1bfe41b..892fefc4c751 100644 --- a/sdk/resourcemanager/appservice/armappservice/certificateregistrationprovider_client.go +++ b/sdk/resourcemanager/appservice/armappservice/certificateregistrationprovider_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappservice @@ -28,7 +27,7 @@ type CertificateRegistrationProviderClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewCertificateRegistrationProviderClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*CertificateRegistrationProviderClient, error) { - cl, err := arm.NewClient(moduleName+".CertificateRegistrationProviderClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -41,7 +40,7 @@ func NewCertificateRegistrationProviderClient(credential azcore.TokenCredential, // NewListOperationsPager - Description for Implements Csm operations Api to exposes the list of available Csm Apis under // the resource provider // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - options - CertificateRegistrationProviderClientListOperationsOptions contains the optional parameters for the CertificateRegistrationProviderClient.NewListOperationsPager // method. func (client *CertificateRegistrationProviderClient) NewListOperationsPager(options *CertificateRegistrationProviderClientListOperationsOptions) *runtime.Pager[CertificateRegistrationProviderClientListOperationsResponse] { @@ -50,25 +49,20 @@ func (client *CertificateRegistrationProviderClient) NewListOperationsPager(opti return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *CertificateRegistrationProviderClientListOperationsResponse) (CertificateRegistrationProviderClientListOperationsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listOperationsCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CertificateRegistrationProviderClient.NewListOperationsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listOperationsCreateRequest(ctx, options) + }, nil) if err != nil { return CertificateRegistrationProviderClientListOperationsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return CertificateRegistrationProviderClientListOperationsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificateRegistrationProviderClientListOperationsResponse{}, runtime.NewResponseError(resp) - } return client.listOperationsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -80,7 +74,7 @@ func (client *CertificateRegistrationProviderClient) listOperationsCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/certificateregistrationprovider_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/certificateregistrationprovider_client_example_test.go deleted file mode 100644 index e34c8605e75e..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/certificateregistrationprovider_client_example_test.go +++ /dev/null @@ -1,216 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2022-09-01/examples/ListOperations.json -func ExampleCertificateRegistrationProviderClient_NewListOperationsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewCertificateRegistrationProviderClient().NewListOperationsPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.CsmOperationCollection = armappservice.CsmOperationCollection{ - // Value: []*armappservice.CsmOperationDescription{ - // { - // Name: to.Ptr("Microsoft.CertificateRegistration/certificateOrders/certificates/Write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Add a new certificate or update an existing one"), - // Operation: to.Ptr("Add or Update Certificate"), - // Provider: to.Ptr("Microsoft Certificates"), - // Resource: to.Ptr("Certificate"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.CertificateRegistration/certificateOrders/Write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Add a new certificateOrder or update an existing one"), - // Operation: to.Ptr("Add or Update AppServiceCertificate"), - // Provider: to.Ptr("Microsoft Certificates"), - // Resource: to.Ptr("AppServiceCertificate"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.CertificateRegistration/certificateOrders/certificates/Delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete an existing certificate"), - // Operation: to.Ptr("Delete Certificate"), - // Provider: to.Ptr("Microsoft Certificates"), - // Resource: to.Ptr("Certificate"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.CertificateRegistration/certificateOrders/Delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete an existing AppServiceCertificate"), - // Operation: to.Ptr("Delete AppServiceCertificate"), - // Provider: to.Ptr("Microsoft Certificates"), - // Resource: to.Ptr("AppServiceCertificate"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.CertificateRegistration/certificateOrders/Read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get the list of CertificateOrders"), - // Operation: to.Ptr("Get CertificateOrders"), - // Provider: to.Ptr("Microsoft Certificates"), - // Resource: to.Ptr("AppServiceCertificate"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.CertificateRegistration/certificateOrders/certificates/Read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get the list of certificates"), - // Operation: to.Ptr("Get Certificates"), - // Provider: to.Ptr("Microsoft Certificates"), - // Resource: to.Ptr("Certificate"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.CertificateRegistration/certificateOrders/reissue/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Reissue an existing certificateorder"), - // Operation: to.Ptr("Reissue certificateorder"), - // Provider: to.Ptr("Microsoft Certificates"), - // Resource: to.Ptr("AppServiceCertificate"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.CertificateRegistration/certificateOrders/renew/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Renew an existing certificateorder"), - // Operation: to.Ptr("Renew certificateorder"), - // Provider: to.Ptr("Microsoft Certificates"), - // Resource: to.Ptr("AppServiceCertificate"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.CertificateRegistration/certificateOrders/retrieveCertificateActions/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Retrieve the list of certificate actions"), - // Operation: to.Ptr("Certificateorder actions"), - // Provider: to.Ptr("Microsoft Certificates"), - // Resource: to.Ptr("AppServiceCertificate"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.CertificateRegistration/certificateOrders/retrieveEmailHistory/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Retrieve certificate email history"), - // Operation: to.Ptr("Certificateorder email history"), - // Provider: to.Ptr("Microsoft Certificates"), - // Resource: to.Ptr("AppServiceCertificate"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.CertificateRegistration/certificateOrders/resendEmail/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Resend certificate email"), - // Operation: to.Ptr("Resend Certificateorder email"), - // Provider: to.Ptr("Microsoft Certificates"), - // Resource: to.Ptr("AppServiceCertificate"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.CertificateRegistration/certificateOrders/verifyDomainOwnership/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Verify domain ownership"), - // Operation: to.Ptr("Verify domain ownership"), - // Provider: to.Ptr("Microsoft Certificates"), - // Resource: to.Ptr("AppServiceCertificate"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.CertificateRegistration/certificateOrders/resendRequestEmails/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Resend request emails to another email address"), - // Operation: to.Ptr("Resend request emails to another email address"), - // Provider: to.Ptr("Microsoft Certificates"), - // Resource: to.Ptr("AppServiceCertificate"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.CertificateRegistration/certificateOrders/resendRequestEmails/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Retrieve site seal for an issued App Service Certificate"), - // Operation: to.Ptr("Retrieve site seal for an issued App Service Certificate"), - // Provider: to.Ptr("Microsoft Certificates"), - // Resource: to.Ptr("AppServiceCertificate"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.CertificateRegistration/provisionGlobalAppServicePrincipalInUserTenant/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Provision service principal for service app principal"), - // Operation: to.Ptr("Provision service principal"), - // Provider: to.Ptr("Microsoft Certificates"), - // Resource: to.Ptr("AppServiceCertificate"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.CertificateRegistration/validateCertificateRegistrationInformation/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Validate certificate purchase object without submitting it"), - // Operation: to.Ptr("Certificate Purchase Info Validation"), - // Provider: to.Ptr("Microsoft Certificates"), - // Resource: to.Ptr("AppServiceCertificate"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.CertificateRegistration/register/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Register the Microsoft Certificates resource provider for the subscription"), - // Operation: to.Ptr("Register Microsoft Certificates resource provider"), - // Provider: to.Ptr("Microsoft Certificates"), - // Resource: to.Ptr("Microsoft Certificates resource provider"), - // }, - // Origin: to.Ptr("user,system"), - // }}, - // } - } -} diff --git a/sdk/resourcemanager/appservice/armappservice/certificates_client.go b/sdk/resourcemanager/appservice/armappservice/certificates_client.go index 3bcc8314ae40..ede2aa5a22dc 100644 --- a/sdk/resourcemanager/appservice/armappservice/certificates_client.go +++ b/sdk/resourcemanager/appservice/armappservice/certificates_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappservice @@ -33,7 +32,7 @@ type CertificatesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewCertificatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CertificatesClient, error) { - cl, err := arm.NewClient(moduleName+".CertificatesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,25 +46,32 @@ func NewCertificatesClient(subscriptionID string, credential azcore.TokenCredent // CreateOrUpdate - Description for Create or update a certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the certificate. // - certificateEnvelope - Details of certificate, if it exists already. // - options - CertificatesClientCreateOrUpdateOptions contains the optional parameters for the CertificatesClient.CreateOrUpdate // method. func (client *CertificatesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, name string, certificateEnvelope AppCertificate, options *CertificatesClientCreateOrUpdateOptions) (CertificatesClientCreateOrUpdateResponse, error) { + var err error + const operationName = "CertificatesClient.CreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, name, certificateEnvelope, options) if err != nil { return CertificatesClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificatesClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificatesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificatesClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -88,10 +94,13 @@ func (client *CertificatesClient) createOrUpdateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, certificateEnvelope) + if err := runtime.MarshalAsJSON(req, certificateEnvelope); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -106,21 +115,27 @@ func (client *CertificatesClient) createOrUpdateHandleResponse(resp *http.Respon // Delete - Description for Delete a certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the certificate. // - options - CertificatesClientDeleteOptions contains the optional parameters for the CertificatesClient.Delete method. func (client *CertificatesClient) Delete(ctx context.Context, resourceGroupName string, name string, options *CertificatesClientDeleteOptions) (CertificatesClientDeleteResponse, error) { + var err error + const operationName = "CertificatesClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return CertificatesClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificatesClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return CertificatesClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return CertificatesClientDeleteResponse{}, err } return CertificatesClientDeleteResponse{}, nil } @@ -145,7 +160,7 @@ func (client *CertificatesClient) deleteCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -154,23 +169,30 @@ func (client *CertificatesClient) deleteCreateRequest(ctx context.Context, resou // Get - Description for Get a certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the certificate. // - options - CertificatesClientGetOptions contains the optional parameters for the CertificatesClient.Get method. func (client *CertificatesClient) Get(ctx context.Context, resourceGroupName string, name string, options *CertificatesClientGetOptions) (CertificatesClientGetResponse, error) { + var err error + const operationName = "CertificatesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return CertificatesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificatesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificatesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificatesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -193,7 +215,7 @@ func (client *CertificatesClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -210,7 +232,7 @@ func (client *CertificatesClient) getHandleResponse(resp *http.Response) (Certif // NewListPager - Description for Get all certificates for a subscription. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - options - CertificatesClientListOptions contains the optional parameters for the CertificatesClient.NewListPager method. func (client *CertificatesClient) NewListPager(options *CertificatesClientListOptions) *runtime.Pager[CertificatesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[CertificatesClientListResponse]{ @@ -218,25 +240,20 @@ func (client *CertificatesClient) NewListPager(options *CertificatesClientListOp return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *CertificatesClientListResponse) (CertificatesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return CertificatesClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CertificatesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return CertificatesClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificatesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -252,7 +269,7 @@ func (client *CertificatesClient) listCreateRequest(ctx context.Context, options return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() unencodedParams := []string{req.Raw().URL.RawQuery} if options != nil && options.Filter != nil { @@ -274,7 +291,7 @@ func (client *CertificatesClient) listHandleResponse(resp *http.Response) (Certi // NewListByResourceGroupPager - Description for Get all certificates in a resource group. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - options - CertificatesClientListByResourceGroupOptions contains the optional parameters for the CertificatesClient.NewListByResourceGroupPager // method. @@ -284,25 +301,20 @@ func (client *CertificatesClient) NewListByResourceGroupPager(resourceGroupName return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *CertificatesClientListByResourceGroupResponse) (CertificatesClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "CertificatesClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return CertificatesClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return CertificatesClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificatesClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -322,7 +334,7 @@ func (client *CertificatesClient) listByResourceGroupCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -340,24 +352,31 @@ func (client *CertificatesClient) listByResourceGroupHandleResponse(resp *http.R // Update - Description for Create or update a certificate. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the certificate. // - certificateEnvelope - Details of certificate, if it exists already. // - options - CertificatesClientUpdateOptions contains the optional parameters for the CertificatesClient.Update method. func (client *CertificatesClient) Update(ctx context.Context, resourceGroupName string, name string, certificateEnvelope AppCertificatePatchResource, options *CertificatesClientUpdateOptions) (CertificatesClientUpdateResponse, error) { + var err error + const operationName = "CertificatesClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, name, certificateEnvelope, options) if err != nil { return CertificatesClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return CertificatesClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return CertificatesClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return CertificatesClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -380,10 +399,13 @@ func (client *CertificatesClient) updateCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, certificateEnvelope) + if err := runtime.MarshalAsJSON(req, certificateEnvelope); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/sdk/resourcemanager/appservice/armappservice/certificates_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/certificates_client_example_test.go deleted file mode 100644 index 78b83a502136..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/certificates_client_example_test.go +++ /dev/null @@ -1,275 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListCertificates.json -func ExampleCertificatesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewCertificatesClient().NewListPager(&armappservice.CertificatesClientListOptions{Filter: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.AppCertificateCollection = armappservice.AppCertificateCollection{ - // Value: []*armappservice.AppCertificate{ - // { - // Name: to.Ptr("testc6282"), - // Type: to.Ptr("Microsoft.Web/certificates"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/certificates/testc6282"), - // Location: to.Ptr("East US"), - // Properties: &armappservice.AppCertificateProperties{ - // ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2039-12-31T23:59:59+00:00"); return t}()), - // FriendlyName: to.Ptr(""), - // HostNames: []*string{ - // to.Ptr("ServerCert")}, - // IssueDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-11-12T23:40:25+00:00"); return t}()), - // Issuer: to.Ptr("CACert"), - // SubjectName: to.Ptr("ServerCert"), - // Thumbprint: to.Ptr("FE703D7411A44163B6D32B3AD9B03E175886EBFE"), - // }, - // }, - // { - // Name: to.Ptr("testc4912"), - // Type: to.Ptr("Microsoft.Web/certificates"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/certificates/testc4912"), - // Location: to.Ptr("West US"), - // Properties: &armappservice.AppCertificateProperties{ - // ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2040-12-31T23:59:59+00:00"); return t}()), - // FriendlyName: to.Ptr(""), - // HostNames: []*string{ - // to.Ptr("ServerCert2")}, - // IssueDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-12-12T23:40:25+00:00"); return t}()), - // Issuer: to.Ptr("CACert"), - // SubjectName: to.Ptr("ServerCert2"), - // Thumbprint: to.Ptr("FE703D7411A44163B6D32B3AD9B0490D5886EBFE"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListCertificatesByResourceGroup.json -func ExampleCertificatesClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewCertificatesClient().NewListByResourceGroupPager("testrg123", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.AppCertificateCollection = armappservice.AppCertificateCollection{ - // Value: []*armappservice.AppCertificate{ - // { - // Name: to.Ptr("testc6282"), - // Type: to.Ptr("Microsoft.Web/certificates"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/certificates/testc6282"), - // Location: to.Ptr("East US"), - // Properties: &armappservice.AppCertificateProperties{ - // ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2039-12-31T23:59:59+00:00"); return t}()), - // FriendlyName: to.Ptr(""), - // HostNames: []*string{ - // to.Ptr("ServerCert")}, - // IssueDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-11-12T23:40:25+00:00"); return t}()), - // Issuer: to.Ptr("CACert"), - // SubjectName: to.Ptr("ServerCert"), - // Thumbprint: to.Ptr("FE703D7411A44163B6D32B3AD9B03E175886EBFE"), - // }, - // }, - // { - // Name: to.Ptr("testc4912"), - // Type: to.Ptr("Microsoft.Web/certificates"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/certificates/testc4912"), - // Location: to.Ptr("West US"), - // Properties: &armappservice.AppCertificateProperties{ - // ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2040-12-31T23:59:59+00:00"); return t}()), - // FriendlyName: to.Ptr(""), - // HostNames: []*string{ - // to.Ptr("ServerCert2")}, - // IssueDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-12-12T23:40:25+00:00"); return t}()), - // Issuer: to.Ptr("CACert"), - // SubjectName: to.Ptr("ServerCert2"), - // Thumbprint: to.Ptr("FE703D7411A44163B6D32B3AD9B0490D5886EBFE"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetCertificate.json -func ExampleCertificatesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewCertificatesClient().Get(ctx, "testrg123", "testc6282", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.AppCertificate = armappservice.AppCertificate{ - // Name: to.Ptr("testc6282"), - // Type: to.Ptr("Microsoft.Web/certificates"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/certificates/testc6282"), - // Location: to.Ptr("East US"), - // Properties: &armappservice.AppCertificateProperties{ - // ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2039-12-31T23:59:59+00:00"); return t}()), - // FriendlyName: to.Ptr(""), - // HostNames: []*string{ - // to.Ptr("ServerCert")}, - // IssueDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-11-12T23:40:25+00:00"); return t}()), - // Issuer: to.Ptr("CACert"), - // SubjectName: to.Ptr("ServerCert"), - // Thumbprint: to.Ptr("FE703D7411A44163B6D32B3AD9B03E175886EBFE"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/CreateOrUpdateCertificate.json -func ExampleCertificatesClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewCertificatesClient().CreateOrUpdate(ctx, "testrg123", "testc6282", armappservice.AppCertificate{ - Location: to.Ptr("East US"), - Properties: &armappservice.AppCertificateProperties{ - HostNames: []*string{ - to.Ptr("ServerCert")}, - Password: to.Ptr(""), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.AppCertificate = armappservice.AppCertificate{ - // Name: to.Ptr("testc6282"), - // Type: to.Ptr("Microsoft.Web/certificates"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/certificates/testc6282"), - // Location: to.Ptr("East US"), - // Properties: &armappservice.AppCertificateProperties{ - // ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2039-12-31T23:59:59+00:00"); return t}()), - // FriendlyName: to.Ptr(""), - // HostNames: []*string{ - // to.Ptr("ServerCert")}, - // IssueDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-11-12T23:40:25+00:00"); return t}()), - // Issuer: to.Ptr("CACert"), - // SubjectName: to.Ptr("ServerCert"), - // Thumbprint: to.Ptr("FE703D7411A44163B6D32B3AD9B03E175886EBFE"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/DeleteCertificate.json -func ExampleCertificatesClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewCertificatesClient().Delete(ctx, "testrg123", "testc6282", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/PatchCertificate.json -func ExampleCertificatesClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewCertificatesClient().Update(ctx, "testrg123", "testc6282", armappservice.AppCertificatePatchResource{ - Properties: &armappservice.AppCertificatePatchResourceProperties{ - Password: to.Ptr(""), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.AppCertificate = armappservice.AppCertificate{ - // Name: to.Ptr("testc6282"), - // Type: to.Ptr("Microsoft.Web/certificates"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/certificates/testc6282"), - // Location: to.Ptr("East US"), - // Properties: &armappservice.AppCertificateProperties{ - // ExpirationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2039-12-31T23:59:59+00:00"); return t}()), - // FriendlyName: to.Ptr(""), - // HostNames: []*string{ - // to.Ptr("ServerCert")}, - // IssueDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-11-12T23:40:25+00:00"); return t}()), - // Issuer: to.Ptr("CACert"), - // SubjectName: to.Ptr("ServerCert"), - // Thumbprint: to.Ptr("FE703D7411A44163B6D32B3AD9B03E175886EBFE"), - // }, - // } -} diff --git a/sdk/resourcemanager/appservice/armappservice/client_factory.go b/sdk/resourcemanager/appservice/armappservice/client_factory.go index fc695cc3d0eb..41a26833bd89 100644 --- a/sdk/resourcemanager/appservice/armappservice/client_factory.go +++ b/sdk/resourcemanager/appservice/armappservice/client_factory.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappservice @@ -28,7 +27,7 @@ type ClientFactory struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error) { - _, err := arm.NewClient(moduleName+".ClientFactory", moduleVersion, credential, options) + _, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -38,152 +37,188 @@ func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, }, nil } +// NewCertificateOrdersClient creates a new instance of CertificateOrdersClient. func (c *ClientFactory) NewCertificateOrdersClient() *CertificateOrdersClient { subClient, _ := NewCertificateOrdersClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewCertificateOrdersDiagnosticsClient creates a new instance of CertificateOrdersDiagnosticsClient. func (c *ClientFactory) NewCertificateOrdersDiagnosticsClient() *CertificateOrdersDiagnosticsClient { subClient, _ := NewCertificateOrdersDiagnosticsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewCertificateRegistrationProviderClient creates a new instance of CertificateRegistrationProviderClient. func (c *ClientFactory) NewCertificateRegistrationProviderClient() *CertificateRegistrationProviderClient { subClient, _ := NewCertificateRegistrationProviderClient(c.credential, c.options) return subClient } -func (c *ClientFactory) NewDomainsClient() *DomainsClient { - subClient, _ := NewDomainsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewTopLevelDomainsClient() *TopLevelDomainsClient { - subClient, _ := NewTopLevelDomainsClient(c.subscriptionID, c.credential, c.options) +// NewCertificatesClient creates a new instance of CertificatesClient. +func (c *ClientFactory) NewCertificatesClient() *CertificatesClient { + subClient, _ := NewCertificatesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewDomainRegistrationProviderClient() *DomainRegistrationProviderClient { - subClient, _ := NewDomainRegistrationProviderClient(c.credential, c.options) +// NewContainerAppsClient creates a new instance of ContainerAppsClient. +func (c *ClientFactory) NewContainerAppsClient() *ContainerAppsClient { + subClient, _ := NewContainerAppsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewEnvironmentsClient() *EnvironmentsClient { - subClient, _ := NewEnvironmentsClient(c.subscriptionID, c.credential, c.options) +// NewContainerAppsRevisionsClient creates a new instance of ContainerAppsRevisionsClient. +func (c *ClientFactory) NewContainerAppsRevisionsClient() *ContainerAppsRevisionsClient { + subClient, _ := NewContainerAppsRevisionsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewPlansClient() *PlansClient { - subClient, _ := NewPlansClient(c.subscriptionID, c.credential, c.options) +// NewDeletedWebAppsClient creates a new instance of DeletedWebAppsClient. +func (c *ClientFactory) NewDeletedWebAppsClient() *DeletedWebAppsClient { + subClient, _ := NewDeletedWebAppsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewCertificatesClient() *CertificatesClient { - subClient, _ := NewCertificatesClient(c.subscriptionID, c.credential, c.options) +// NewDiagnosticsClient creates a new instance of DiagnosticsClient. +func (c *ClientFactory) NewDiagnosticsClient() *DiagnosticsClient { + subClient, _ := NewDiagnosticsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewContainerAppsClient() *ContainerAppsClient { - subClient, _ := NewContainerAppsClient(c.subscriptionID, c.credential, c.options) +// NewDomainRegistrationProviderClient creates a new instance of DomainRegistrationProviderClient. +func (c *ClientFactory) NewDomainRegistrationProviderClient() *DomainRegistrationProviderClient { + subClient, _ := NewDomainRegistrationProviderClient(c.credential, c.options) return subClient } -func (c *ClientFactory) NewContainerAppsRevisionsClient() *ContainerAppsRevisionsClient { - subClient, _ := NewContainerAppsRevisionsClient(c.subscriptionID, c.credential, c.options) +// NewDomainsClient creates a new instance of DomainsClient. +func (c *ClientFactory) NewDomainsClient() *DomainsClient { + subClient, _ := NewDomainsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewDeletedWebAppsClient() *DeletedWebAppsClient { - subClient, _ := NewDeletedWebAppsClient(c.subscriptionID, c.credential, c.options) +// NewEnvironmentsClient creates a new instance of EnvironmentsClient. +func (c *ClientFactory) NewEnvironmentsClient() *EnvironmentsClient { + subClient, _ := NewEnvironmentsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewDiagnosticsClient() *DiagnosticsClient { - subClient, _ := NewDiagnosticsClient(c.subscriptionID, c.credential, c.options) +// NewGetUsagesInLocationClient creates a new instance of GetUsagesInLocationClient. +func (c *ClientFactory) NewGetUsagesInLocationClient() *GetUsagesInLocationClient { + subClient, _ := NewGetUsagesInLocationClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewGlobalClient creates a new instance of GlobalClient. func (c *ClientFactory) NewGlobalClient() *GlobalClient { subClient, _ := NewGlobalClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewKubeEnvironmentsClient creates a new instance of KubeEnvironmentsClient. func (c *ClientFactory) NewKubeEnvironmentsClient() *KubeEnvironmentsClient { subClient, _ := NewKubeEnvironmentsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewPlansClient creates a new instance of PlansClient. +func (c *ClientFactory) NewPlansClient() *PlansClient { + subClient, _ := NewPlansClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewProviderClient creates a new instance of ProviderClient. func (c *ClientFactory) NewProviderClient() *ProviderClient { subClient, _ := NewProviderClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewRecommendationsClient creates a new instance of RecommendationsClient. func (c *ClientFactory) NewRecommendationsClient() *RecommendationsClient { subClient, _ := NewRecommendationsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewResourceHealthMetadataClient creates a new instance of ResourceHealthMetadataClient. func (c *ClientFactory) NewResourceHealthMetadataClient() *ResourceHealthMetadataClient { subClient, _ := NewResourceHealthMetadataClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewWebSiteManagementClient() *WebSiteManagementClient { - subClient, _ := NewWebSiteManagementClient(c.subscriptionID, c.credential, c.options) - return subClient -} - +// NewStaticSitesClient creates a new instance of StaticSitesClient. func (c *ClientFactory) NewStaticSitesClient() *StaticSitesClient { subClient, _ := NewStaticSitesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewWebAppsClient() *WebAppsClient { - subClient, _ := NewWebAppsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewWorkflowsClient() *WorkflowsClient { - subClient, _ := NewWorkflowsClient(c.subscriptionID, c.credential, c.options) +// NewTopLevelDomainsClient creates a new instance of TopLevelDomainsClient. +func (c *ClientFactory) NewTopLevelDomainsClient() *TopLevelDomainsClient { + subClient, _ := NewTopLevelDomainsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewWorkflowRunsClient() *WorkflowRunsClient { - subClient, _ := NewWorkflowRunsClient(c.subscriptionID, c.credential, c.options) +// NewWebAppsClient creates a new instance of WebAppsClient. +func (c *ClientFactory) NewWebAppsClient() *WebAppsClient { + subClient, _ := NewWebAppsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewWorkflowRunActionsClient() *WorkflowRunActionsClient { - subClient, _ := NewWorkflowRunActionsClient(c.subscriptionID, c.credential, c.options) +// NewWebSiteManagementClient creates a new instance of WebSiteManagementClient. +func (c *ClientFactory) NewWebSiteManagementClient() *WebSiteManagementClient { + subClient, _ := NewWebSiteManagementClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewWorkflowRunActionRepetitionsClient creates a new instance of WorkflowRunActionRepetitionsClient. func (c *ClientFactory) NewWorkflowRunActionRepetitionsClient() *WorkflowRunActionRepetitionsClient { subClient, _ := NewWorkflowRunActionRepetitionsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewWorkflowRunActionRepetitionsRequestHistoriesClient creates a new instance of WorkflowRunActionRepetitionsRequestHistoriesClient. func (c *ClientFactory) NewWorkflowRunActionRepetitionsRequestHistoriesClient() *WorkflowRunActionRepetitionsRequestHistoriesClient { subClient, _ := NewWorkflowRunActionRepetitionsRequestHistoriesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewWorkflowRunActionScopeRepetitionsClient creates a new instance of WorkflowRunActionScopeRepetitionsClient. func (c *ClientFactory) NewWorkflowRunActionScopeRepetitionsClient() *WorkflowRunActionScopeRepetitionsClient { subClient, _ := NewWorkflowRunActionScopeRepetitionsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewWorkflowTriggersClient() *WorkflowTriggersClient { - subClient, _ := NewWorkflowTriggersClient(c.subscriptionID, c.credential, c.options) +// NewWorkflowRunActionsClient creates a new instance of WorkflowRunActionsClient. +func (c *ClientFactory) NewWorkflowRunActionsClient() *WorkflowRunActionsClient { + subClient, _ := NewWorkflowRunActionsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewWorkflowRunsClient creates a new instance of WorkflowRunsClient. +func (c *ClientFactory) NewWorkflowRunsClient() *WorkflowRunsClient { + subClient, _ := NewWorkflowRunsClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewWorkflowTriggerHistoriesClient creates a new instance of WorkflowTriggerHistoriesClient. func (c *ClientFactory) NewWorkflowTriggerHistoriesClient() *WorkflowTriggerHistoriesClient { subClient, _ := NewWorkflowTriggerHistoriesClient(c.subscriptionID, c.credential, c.options) return subClient } +// NewWorkflowTriggersClient creates a new instance of WorkflowTriggersClient. +func (c *ClientFactory) NewWorkflowTriggersClient() *WorkflowTriggersClient { + subClient, _ := NewWorkflowTriggersClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +// NewWorkflowVersionsClient creates a new instance of WorkflowVersionsClient. func (c *ClientFactory) NewWorkflowVersionsClient() *WorkflowVersionsClient { subClient, _ := NewWorkflowVersionsClient(c.subscriptionID, c.credential, c.options) return subClient } + +// NewWorkflowsClient creates a new instance of WorkflowsClient. +func (c *ClientFactory) NewWorkflowsClient() *WorkflowsClient { + subClient, _ := NewWorkflowsClient(c.subscriptionID, c.credential, c.options) + return subClient +} diff --git a/sdk/resourcemanager/appservice/armappservice/constants.go b/sdk/resourcemanager/appservice/armappservice/constants.go index 8753a6906bf8..6d441a47cdf9 100644 --- a/sdk/resourcemanager/appservice/armappservice/constants.go +++ b/sdk/resourcemanager/appservice/armappservice/constants.go @@ -3,15 +3,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappservice const ( - moduleName = "armappservice" - moduleVersion = "v2.1.1" + moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice" + moduleVersion = "v3.0.0" ) // ActiveRevisionsMode - ActiveRevisionsMode controls how active revisions are handled for the Container app:Multiple: multiple @@ -36,23 +35,23 @@ func PossibleActiveRevisionsModeValues() []ActiveRevisionsMode { type AppServicePlanRestrictions string const ( - AppServicePlanRestrictionsNone AppServicePlanRestrictions = "None" + AppServicePlanRestrictionsBasic AppServicePlanRestrictions = "Basic" AppServicePlanRestrictionsFree AppServicePlanRestrictions = "Free" + AppServicePlanRestrictionsNone AppServicePlanRestrictions = "None" + AppServicePlanRestrictionsPremium AppServicePlanRestrictions = "Premium" AppServicePlanRestrictionsShared AppServicePlanRestrictions = "Shared" - AppServicePlanRestrictionsBasic AppServicePlanRestrictions = "Basic" AppServicePlanRestrictionsStandard AppServicePlanRestrictions = "Standard" - AppServicePlanRestrictionsPremium AppServicePlanRestrictions = "Premium" ) // PossibleAppServicePlanRestrictionsValues returns the possible values for the AppServicePlanRestrictions const type. func PossibleAppServicePlanRestrictionsValues() []AppServicePlanRestrictions { return []AppServicePlanRestrictions{ - AppServicePlanRestrictionsNone, + AppServicePlanRestrictionsBasic, AppServicePlanRestrictionsFree, + AppServicePlanRestrictionsNone, + AppServicePlanRestrictionsPremium, AppServicePlanRestrictionsShared, - AppServicePlanRestrictionsBasic, AppServicePlanRestrictionsStandard, - AppServicePlanRestrictionsPremium, } } @@ -60,17 +59,17 @@ func PossibleAppServicePlanRestrictionsValues() []AppServicePlanRestrictions { type AutoHealActionType string const ( - AutoHealActionTypeRecycle AutoHealActionType = "Recycle" - AutoHealActionTypeLogEvent AutoHealActionType = "LogEvent" AutoHealActionTypeCustomAction AutoHealActionType = "CustomAction" + AutoHealActionTypeLogEvent AutoHealActionType = "LogEvent" + AutoHealActionTypeRecycle AutoHealActionType = "Recycle" ) // PossibleAutoHealActionTypeValues returns the possible values for the AutoHealActionType const type. func PossibleAutoHealActionTypeValues() []AutoHealActionType { return []AutoHealActionType{ - AutoHealActionTypeRecycle, - AutoHealActionTypeLogEvent, AutoHealActionTypeCustomAction, + AutoHealActionTypeLogEvent, + AutoHealActionTypeRecycle, } } @@ -78,15 +77,15 @@ func PossibleAutoHealActionTypeValues() []AutoHealActionType { type AzureResourceType string const ( - AzureResourceTypeWebsite AzureResourceType = "Website" AzureResourceTypeTrafficManager AzureResourceType = "TrafficManager" + AzureResourceTypeWebsite AzureResourceType = "Website" ) // PossibleAzureResourceTypeValues returns the possible values for the AzureResourceType const type. func PossibleAzureResourceTypeValues() []AzureResourceType { return []AzureResourceType{ - AzureResourceTypeWebsite, AzureResourceTypeTrafficManager, + AzureResourceTypeWebsite, } } @@ -94,19 +93,19 @@ func PossibleAzureResourceTypeValues() []AzureResourceType { type AzureStorageState string const ( - AzureStorageStateOk AzureStorageState = "Ok" AzureStorageStateInvalidCredentials AzureStorageState = "InvalidCredentials" AzureStorageStateInvalidShare AzureStorageState = "InvalidShare" AzureStorageStateNotValidated AzureStorageState = "NotValidated" + AzureStorageStateOk AzureStorageState = "Ok" ) // PossibleAzureStorageStateValues returns the possible values for the AzureStorageState const type. func PossibleAzureStorageStateValues() []AzureStorageState { return []AzureStorageState{ - AzureStorageStateOk, AzureStorageStateInvalidCredentials, AzureStorageStateInvalidShare, AzureStorageStateNotValidated, + AzureStorageStateOk, } } @@ -114,15 +113,15 @@ func PossibleAzureStorageStateValues() []AzureStorageState { type AzureStorageType string const ( - AzureStorageTypeAzureFiles AzureStorageType = "AzureFiles" AzureStorageTypeAzureBlob AzureStorageType = "AzureBlob" + AzureStorageTypeAzureFiles AzureStorageType = "AzureFiles" ) // PossibleAzureStorageTypeValues returns the possible values for the AzureStorageType const type. func PossibleAzureStorageTypeValues() []AzureStorageType { return []AzureStorageType{ - AzureStorageTypeAzureFiles, AzureStorageTypeAzureBlob, + AzureStorageTypeAzureFiles, } } @@ -130,31 +129,31 @@ func PossibleAzureStorageTypeValues() []AzureStorageType { type BackupItemStatus string const ( - BackupItemStatusInProgress BackupItemStatus = "InProgress" - BackupItemStatusFailed BackupItemStatus = "Failed" - BackupItemStatusSucceeded BackupItemStatus = "Succeeded" - BackupItemStatusTimedOut BackupItemStatus = "TimedOut" BackupItemStatusCreated BackupItemStatus = "Created" - BackupItemStatusSkipped BackupItemStatus = "Skipped" - BackupItemStatusPartiallySucceeded BackupItemStatus = "PartiallySucceeded" - BackupItemStatusDeleteInProgress BackupItemStatus = "DeleteInProgress" BackupItemStatusDeleteFailed BackupItemStatus = "DeleteFailed" + BackupItemStatusDeleteInProgress BackupItemStatus = "DeleteInProgress" BackupItemStatusDeleted BackupItemStatus = "Deleted" + BackupItemStatusFailed BackupItemStatus = "Failed" + BackupItemStatusInProgress BackupItemStatus = "InProgress" + BackupItemStatusPartiallySucceeded BackupItemStatus = "PartiallySucceeded" + BackupItemStatusSkipped BackupItemStatus = "Skipped" + BackupItemStatusSucceeded BackupItemStatus = "Succeeded" + BackupItemStatusTimedOut BackupItemStatus = "TimedOut" ) // PossibleBackupItemStatusValues returns the possible values for the BackupItemStatus const type. func PossibleBackupItemStatusValues() []BackupItemStatus { return []BackupItemStatus{ - BackupItemStatusInProgress, - BackupItemStatusFailed, - BackupItemStatusSucceeded, - BackupItemStatusTimedOut, BackupItemStatusCreated, - BackupItemStatusSkipped, - BackupItemStatusPartiallySucceeded, - BackupItemStatusDeleteInProgress, BackupItemStatusDeleteFailed, + BackupItemStatusDeleteInProgress, BackupItemStatusDeleted, + BackupItemStatusFailed, + BackupItemStatusInProgress, + BackupItemStatusPartiallySucceeded, + BackupItemStatusSkipped, + BackupItemStatusSucceeded, + BackupItemStatusTimedOut, } } @@ -162,21 +161,21 @@ func PossibleBackupItemStatusValues() []BackupItemStatus { type BackupRestoreOperationType string const ( - BackupRestoreOperationTypeDefault BackupRestoreOperationType = "Default" BackupRestoreOperationTypeClone BackupRestoreOperationType = "Clone" + BackupRestoreOperationTypeCloudFS BackupRestoreOperationType = "CloudFS" + BackupRestoreOperationTypeDefault BackupRestoreOperationType = "Default" BackupRestoreOperationTypeRelocation BackupRestoreOperationType = "Relocation" BackupRestoreOperationTypeSnapshot BackupRestoreOperationType = "Snapshot" - BackupRestoreOperationTypeCloudFS BackupRestoreOperationType = "CloudFS" ) // PossibleBackupRestoreOperationTypeValues returns the possible values for the BackupRestoreOperationType const type. func PossibleBackupRestoreOperationTypeValues() []BackupRestoreOperationType { return []BackupRestoreOperationType{ - BackupRestoreOperationTypeDefault, BackupRestoreOperationTypeClone, + BackupRestoreOperationTypeCloudFS, + BackupRestoreOperationTypeDefault, BackupRestoreOperationTypeRelocation, BackupRestoreOperationTypeSnapshot, - BackupRestoreOperationTypeCloudFS, } } @@ -227,10 +226,10 @@ type BuiltInAuthenticationProvider string const ( BuiltInAuthenticationProviderAzureActiveDirectory BuiltInAuthenticationProvider = "AzureActiveDirectory" BuiltInAuthenticationProviderFacebook BuiltInAuthenticationProvider = "Facebook" + BuiltInAuthenticationProviderGithub BuiltInAuthenticationProvider = "Github" BuiltInAuthenticationProviderGoogle BuiltInAuthenticationProvider = "Google" BuiltInAuthenticationProviderMicrosoftAccount BuiltInAuthenticationProvider = "MicrosoftAccount" BuiltInAuthenticationProviderTwitter BuiltInAuthenticationProvider = "Twitter" - BuiltInAuthenticationProviderGithub BuiltInAuthenticationProvider = "Github" ) // PossibleBuiltInAuthenticationProviderValues returns the possible values for the BuiltInAuthenticationProvider const type. @@ -238,10 +237,10 @@ func PossibleBuiltInAuthenticationProviderValues() []BuiltInAuthenticationProvid return []BuiltInAuthenticationProvider{ BuiltInAuthenticationProviderAzureActiveDirectory, BuiltInAuthenticationProviderFacebook, + BuiltInAuthenticationProviderGithub, BuiltInAuthenticationProviderGoogle, BuiltInAuthenticationProviderMicrosoftAccount, BuiltInAuthenticationProviderTwitter, - BuiltInAuthenticationProviderGithub, } } @@ -249,38 +248,38 @@ func PossibleBuiltInAuthenticationProviderValues() []BuiltInAuthenticationProvid type CertificateOrderActionType string const ( + CertificateOrderActionTypeCertificateExpirationWarning CertificateOrderActionType = "CertificateExpirationWarning" + CertificateOrderActionTypeCertificateExpired CertificateOrderActionType = "CertificateExpired" CertificateOrderActionTypeCertificateIssued CertificateOrderActionType = "CertificateIssued" CertificateOrderActionTypeCertificateOrderCanceled CertificateOrderActionType = "CertificateOrderCanceled" CertificateOrderActionTypeCertificateOrderCreated CertificateOrderActionType = "CertificateOrderCreated" CertificateOrderActionTypeCertificateRevoked CertificateOrderActionType = "CertificateRevoked" CertificateOrderActionTypeDomainValidationComplete CertificateOrderActionType = "DomainValidationComplete" + CertificateOrderActionTypeFraudCleared CertificateOrderActionType = "FraudCleared" CertificateOrderActionTypeFraudDetected CertificateOrderActionType = "FraudDetected" + CertificateOrderActionTypeFraudDocumentationRequired CertificateOrderActionType = "FraudDocumentationRequired" CertificateOrderActionTypeOrgNameChange CertificateOrderActionType = "OrgNameChange" CertificateOrderActionTypeOrgValidationComplete CertificateOrderActionType = "OrgValidationComplete" CertificateOrderActionTypeSanDrop CertificateOrderActionType = "SanDrop" - CertificateOrderActionTypeFraudCleared CertificateOrderActionType = "FraudCleared" - CertificateOrderActionTypeCertificateExpired CertificateOrderActionType = "CertificateExpired" - CertificateOrderActionTypeCertificateExpirationWarning CertificateOrderActionType = "CertificateExpirationWarning" - CertificateOrderActionTypeFraudDocumentationRequired CertificateOrderActionType = "FraudDocumentationRequired" CertificateOrderActionTypeUnknown CertificateOrderActionType = "Unknown" ) // PossibleCertificateOrderActionTypeValues returns the possible values for the CertificateOrderActionType const type. func PossibleCertificateOrderActionTypeValues() []CertificateOrderActionType { return []CertificateOrderActionType{ + CertificateOrderActionTypeCertificateExpirationWarning, + CertificateOrderActionTypeCertificateExpired, CertificateOrderActionTypeCertificateIssued, CertificateOrderActionTypeCertificateOrderCanceled, CertificateOrderActionTypeCertificateOrderCreated, CertificateOrderActionTypeCertificateRevoked, CertificateOrderActionTypeDomainValidationComplete, + CertificateOrderActionTypeFraudCleared, CertificateOrderActionTypeFraudDetected, + CertificateOrderActionTypeFraudDocumentationRequired, CertificateOrderActionTypeOrgNameChange, CertificateOrderActionTypeOrgValidationComplete, CertificateOrderActionTypeSanDrop, - CertificateOrderActionTypeFraudCleared, - CertificateOrderActionTypeCertificateExpired, - CertificateOrderActionTypeCertificateExpirationWarning, - CertificateOrderActionTypeFraudDocumentationRequired, CertificateOrderActionTypeUnknown, } } @@ -289,31 +288,31 @@ func PossibleCertificateOrderActionTypeValues() []CertificateOrderActionType { type CertificateOrderStatus string const ( - CertificateOrderStatusPendingissuance CertificateOrderStatus = "Pendingissuance" - CertificateOrderStatusIssued CertificateOrderStatus = "Issued" - CertificateOrderStatusRevoked CertificateOrderStatus = "Revoked" CertificateOrderStatusCanceled CertificateOrderStatus = "Canceled" CertificateOrderStatusDenied CertificateOrderStatus = "Denied" - CertificateOrderStatusPendingrevocation CertificateOrderStatus = "Pendingrevocation" - CertificateOrderStatusPendingRekey CertificateOrderStatus = "PendingRekey" - CertificateOrderStatusUnused CertificateOrderStatus = "Unused" CertificateOrderStatusExpired CertificateOrderStatus = "Expired" + CertificateOrderStatusIssued CertificateOrderStatus = "Issued" CertificateOrderStatusNotSubmitted CertificateOrderStatus = "NotSubmitted" + CertificateOrderStatusPendingRekey CertificateOrderStatus = "PendingRekey" + CertificateOrderStatusPendingissuance CertificateOrderStatus = "Pendingissuance" + CertificateOrderStatusPendingrevocation CertificateOrderStatus = "Pendingrevocation" + CertificateOrderStatusRevoked CertificateOrderStatus = "Revoked" + CertificateOrderStatusUnused CertificateOrderStatus = "Unused" ) // PossibleCertificateOrderStatusValues returns the possible values for the CertificateOrderStatus const type. func PossibleCertificateOrderStatusValues() []CertificateOrderStatus { return []CertificateOrderStatus{ - CertificateOrderStatusPendingissuance, - CertificateOrderStatusIssued, - CertificateOrderStatusRevoked, CertificateOrderStatusCanceled, CertificateOrderStatusDenied, - CertificateOrderStatusPendingrevocation, - CertificateOrderStatusPendingRekey, - CertificateOrderStatusUnused, CertificateOrderStatusExpired, + CertificateOrderStatusIssued, CertificateOrderStatusNotSubmitted, + CertificateOrderStatusPendingRekey, + CertificateOrderStatusPendingissuance, + CertificateOrderStatusPendingrevocation, + CertificateOrderStatusRevoked, + CertificateOrderStatusUnused, } } @@ -337,21 +336,21 @@ func PossibleCertificateProductTypeValues() []CertificateProductType { type Channels string const ( - ChannelsNotification Channels = "Notification" ChannelsAPI Channels = "Api" + ChannelsAll Channels = "All" ChannelsEmail Channels = "Email" + ChannelsNotification Channels = "Notification" ChannelsWebhook Channels = "Webhook" - ChannelsAll Channels = "All" ) // PossibleChannelsValues returns the possible values for the Channels const type. func PossibleChannelsValues() []Channels { return []Channels{ - ChannelsNotification, ChannelsAPI, + ChannelsAll, ChannelsEmail, + ChannelsNotification, ChannelsWebhook, - ChannelsAll, } } @@ -390,17 +389,17 @@ func PossibleCheckNameResourceTypesValues() []CheckNameResourceTypes { type ClientCertMode string const ( - ClientCertModeRequired ClientCertMode = "Required" ClientCertModeOptional ClientCertMode = "Optional" ClientCertModeOptionalInteractiveUser ClientCertMode = "OptionalInteractiveUser" + ClientCertModeRequired ClientCertMode = "Required" ) // PossibleClientCertModeValues returns the possible values for the ClientCertMode const type. func PossibleClientCertModeValues() []ClientCertMode { return []ClientCertMode{ - ClientCertModeRequired, ClientCertModeOptional, ClientCertModeOptionalInteractiveUser, + ClientCertModeRequired, } } @@ -409,16 +408,16 @@ type CloneAbilityResult string const ( CloneAbilityResultCloneable CloneAbilityResult = "Cloneable" - CloneAbilityResultPartiallyCloneable CloneAbilityResult = "PartiallyCloneable" CloneAbilityResultNotCloneable CloneAbilityResult = "NotCloneable" + CloneAbilityResultPartiallyCloneable CloneAbilityResult = "PartiallyCloneable" ) // PossibleCloneAbilityResultValues returns the possible values for the CloneAbilityResult const type. func PossibleCloneAbilityResultValues() []CloneAbilityResult { return []CloneAbilityResult{ CloneAbilityResultCloneable, - CloneAbilityResultPartiallyCloneable, CloneAbilityResultNotCloneable, + CloneAbilityResultPartiallyCloneable, } } @@ -426,17 +425,17 @@ func PossibleCloneAbilityResultValues() []CloneAbilityResult { type ComputeModeOptions string const ( - ComputeModeOptionsShared ComputeModeOptions = "Shared" ComputeModeOptionsDedicated ComputeModeOptions = "Dedicated" ComputeModeOptionsDynamic ComputeModeOptions = "Dynamic" + ComputeModeOptionsShared ComputeModeOptions = "Shared" ) // PossibleComputeModeOptionsValues returns the possible values for the ComputeModeOptions const type. func PossibleComputeModeOptionsValues() []ComputeModeOptions { return []ComputeModeOptions{ - ComputeModeOptionsShared, ComputeModeOptionsDedicated, ComputeModeOptionsDynamic, + ComputeModeOptionsShared, } } @@ -444,33 +443,33 @@ func PossibleComputeModeOptionsValues() []ComputeModeOptions { type ConnectionStringType string const ( - ConnectionStringTypeMySQL ConnectionStringType = "MySql" - ConnectionStringTypeSQLServer ConnectionStringType = "SQLServer" - ConnectionStringTypeSQLAzure ConnectionStringType = "SQLAzure" - ConnectionStringTypeCustom ConnectionStringType = "Custom" - ConnectionStringTypeNotificationHub ConnectionStringType = "NotificationHub" - ConnectionStringTypeServiceBus ConnectionStringType = "ServiceBus" - ConnectionStringTypeEventHub ConnectionStringType = "EventHub" ConnectionStringTypeAPIHub ConnectionStringType = "ApiHub" + ConnectionStringTypeCustom ConnectionStringType = "Custom" ConnectionStringTypeDocDb ConnectionStringType = "DocDb" - ConnectionStringTypeRedisCache ConnectionStringType = "RedisCache" + ConnectionStringTypeEventHub ConnectionStringType = "EventHub" + ConnectionStringTypeMySQL ConnectionStringType = "MySql" + ConnectionStringTypeNotificationHub ConnectionStringType = "NotificationHub" ConnectionStringTypePostgreSQL ConnectionStringType = "PostgreSQL" + ConnectionStringTypeRedisCache ConnectionStringType = "RedisCache" + ConnectionStringTypeSQLAzure ConnectionStringType = "SQLAzure" + ConnectionStringTypeSQLServer ConnectionStringType = "SQLServer" + ConnectionStringTypeServiceBus ConnectionStringType = "ServiceBus" ) // PossibleConnectionStringTypeValues returns the possible values for the ConnectionStringType const type. func PossibleConnectionStringTypeValues() []ConnectionStringType { return []ConnectionStringType{ - ConnectionStringTypeMySQL, - ConnectionStringTypeSQLServer, - ConnectionStringTypeSQLAzure, - ConnectionStringTypeCustom, - ConnectionStringTypeNotificationHub, - ConnectionStringTypeServiceBus, - ConnectionStringTypeEventHub, ConnectionStringTypeAPIHub, + ConnectionStringTypeCustom, ConnectionStringTypeDocDb, - ConnectionStringTypeRedisCache, + ConnectionStringTypeEventHub, + ConnectionStringTypeMySQL, + ConnectionStringTypeNotificationHub, ConnectionStringTypePostgreSQL, + ConnectionStringTypeRedisCache, + ConnectionStringTypeSQLAzure, + ConnectionStringTypeSQLServer, + ConnectionStringTypeServiceBus, } } @@ -499,9 +498,9 @@ type ContinuousWebJobStatus string const ( ContinuousWebJobStatusInitializing ContinuousWebJobStatus = "Initializing" - ContinuousWebJobStatusStarting ContinuousWebJobStatus = "Starting" - ContinuousWebJobStatusRunning ContinuousWebJobStatus = "Running" ContinuousWebJobStatusPendingRestart ContinuousWebJobStatus = "PendingRestart" + ContinuousWebJobStatusRunning ContinuousWebJobStatus = "Running" + ContinuousWebJobStatusStarting ContinuousWebJobStatus = "Starting" ContinuousWebJobStatusStopped ContinuousWebJobStatus = "Stopped" ) @@ -509,9 +508,9 @@ const ( func PossibleContinuousWebJobStatusValues() []ContinuousWebJobStatus { return []ContinuousWebJobStatus{ ContinuousWebJobStatusInitializing, - ContinuousWebJobStatusStarting, - ContinuousWebJobStatusRunning, ContinuousWebJobStatusPendingRestart, + ContinuousWebJobStatusRunning, + ContinuousWebJobStatusStarting, ContinuousWebJobStatusStopped, } } @@ -535,19 +534,19 @@ func PossibleCookieExpirationConventionValues() []CookieExpirationConvention { type CustomDNSSuffixProvisioningState string const ( - CustomDNSSuffixProvisioningStateSucceeded CustomDNSSuffixProvisioningState = "Succeeded" - CustomDNSSuffixProvisioningStateFailed CustomDNSSuffixProvisioningState = "Failed" CustomDNSSuffixProvisioningStateDegraded CustomDNSSuffixProvisioningState = "Degraded" + CustomDNSSuffixProvisioningStateFailed CustomDNSSuffixProvisioningState = "Failed" CustomDNSSuffixProvisioningStateInProgress CustomDNSSuffixProvisioningState = "InProgress" + CustomDNSSuffixProvisioningStateSucceeded CustomDNSSuffixProvisioningState = "Succeeded" ) // PossibleCustomDNSSuffixProvisioningStateValues returns the possible values for the CustomDNSSuffixProvisioningState const type. func PossibleCustomDNSSuffixProvisioningStateValues() []CustomDNSSuffixProvisioningState { return []CustomDNSSuffixProvisioningState{ - CustomDNSSuffixProvisioningStateSucceeded, - CustomDNSSuffixProvisioningStateFailed, CustomDNSSuffixProvisioningStateDegraded, + CustomDNSSuffixProvisioningStateFailed, CustomDNSSuffixProvisioningStateInProgress, + CustomDNSSuffixProvisioningStateSucceeded, } } @@ -581,15 +580,15 @@ func PossibleCustomDomainStatusValues() []CustomDomainStatus { type CustomHostNameDNSRecordType string const ( - CustomHostNameDNSRecordTypeCName CustomHostNameDNSRecordType = "CName" CustomHostNameDNSRecordTypeA CustomHostNameDNSRecordType = "A" + CustomHostNameDNSRecordTypeCName CustomHostNameDNSRecordType = "CName" ) // PossibleCustomHostNameDNSRecordTypeValues returns the possible values for the CustomHostNameDNSRecordType const type. func PossibleCustomHostNameDNSRecordTypeValues() []CustomHostNameDNSRecordType { return []CustomHostNameDNSRecordType{ - CustomHostNameDNSRecordTypeCName, CustomHostNameDNSRecordTypeA, + CustomHostNameDNSRecordTypeCName, } } @@ -613,20 +612,40 @@ func PossibleDNSTypeValues() []DNSType { type DNSVerificationTestResult string const ( - DNSVerificationTestResultPassed DNSVerificationTestResult = "Passed" DNSVerificationTestResultFailed DNSVerificationTestResult = "Failed" + DNSVerificationTestResultPassed DNSVerificationTestResult = "Passed" DNSVerificationTestResultSkipped DNSVerificationTestResult = "Skipped" ) // PossibleDNSVerificationTestResultValues returns the possible values for the DNSVerificationTestResult const type. func PossibleDNSVerificationTestResultValues() []DNSVerificationTestResult { return []DNSVerificationTestResult{ - DNSVerificationTestResultPassed, DNSVerificationTestResultFailed, + DNSVerificationTestResultPassed, DNSVerificationTestResultSkipped, } } +// DaprLogLevel - Sets the log level for the Dapr sidecar. Allowed values are debug, info, warn, error. Default is info. +type DaprLogLevel string + +const ( + DaprLogLevelDebug DaprLogLevel = "debug" + DaprLogLevelError DaprLogLevel = "error" + DaprLogLevelInfo DaprLogLevel = "info" + DaprLogLevelWarn DaprLogLevel = "warn" +) + +// PossibleDaprLogLevelValues returns the possible values for the DaprLogLevel const type. +func PossibleDaprLogLevelValues() []DaprLogLevel { + return []DaprLogLevel{ + DaprLogLevelDebug, + DaprLogLevelError, + DaprLogLevelInfo, + DaprLogLevelWarn, + } +} + // DatabaseType - Database type (e.g. SqlAzure / MySql). type DatabaseType string @@ -651,50 +670,50 @@ func PossibleDatabaseTypeValues() []DatabaseType { type DayOfWeek string const ( - DayOfWeekSunday DayOfWeek = "Sunday" + DayOfWeekFriday DayOfWeek = "Friday" DayOfWeekMonday DayOfWeek = "Monday" + DayOfWeekSaturday DayOfWeek = "Saturday" + DayOfWeekSunday DayOfWeek = "Sunday" + DayOfWeekThursday DayOfWeek = "Thursday" DayOfWeekTuesday DayOfWeek = "Tuesday" DayOfWeekWednesday DayOfWeek = "Wednesday" - DayOfWeekThursday DayOfWeek = "Thursday" - DayOfWeekFriday DayOfWeek = "Friday" - DayOfWeekSaturday DayOfWeek = "Saturday" ) // PossibleDayOfWeekValues returns the possible values for the DayOfWeek const type. func PossibleDayOfWeekValues() []DayOfWeek { return []DayOfWeek{ - DayOfWeekSunday, + DayOfWeekFriday, DayOfWeekMonday, + DayOfWeekSaturday, + DayOfWeekSunday, + DayOfWeekThursday, DayOfWeekTuesday, DayOfWeekWednesday, - DayOfWeekThursday, - DayOfWeekFriday, - DayOfWeekSaturday, } } type DaysOfWeek string const ( - DaysOfWeekSunday DaysOfWeek = "Sunday" + DaysOfWeekFriday DaysOfWeek = "Friday" DaysOfWeekMonday DaysOfWeek = "Monday" + DaysOfWeekSaturday DaysOfWeek = "Saturday" + DaysOfWeekSunday DaysOfWeek = "Sunday" + DaysOfWeekThursday DaysOfWeek = "Thursday" DaysOfWeekTuesday DaysOfWeek = "Tuesday" DaysOfWeekWednesday DaysOfWeek = "Wednesday" - DaysOfWeekThursday DaysOfWeek = "Thursday" - DaysOfWeekFriday DaysOfWeek = "Friday" - DaysOfWeekSaturday DaysOfWeek = "Saturday" ) // PossibleDaysOfWeekValues returns the possible values for the DaysOfWeek const type. func PossibleDaysOfWeekValues() []DaysOfWeek { return []DaysOfWeek{ - DaysOfWeekSunday, + DaysOfWeekFriday, DaysOfWeekMonday, + DaysOfWeekSaturday, + DaysOfWeekSunday, + DaysOfWeekThursday, DaysOfWeekTuesday, DaysOfWeekWednesday, - DaysOfWeekThursday, - DaysOfWeekFriday, - DaysOfWeekSaturday, } } @@ -756,17 +775,17 @@ func PossibleDeploymentBuildStatusValues() []DeploymentBuildStatus { type DetectorType string const ( - DetectorTypeDetector DetectorType = "Detector" DetectorTypeAnalysis DetectorType = "Analysis" DetectorTypeCategoryOverview DetectorType = "CategoryOverview" + DetectorTypeDetector DetectorType = "Detector" ) // PossibleDetectorTypeValues returns the possible values for the DetectorType const type. func PossibleDetectorTypeValues() []DetectorType { return []DetectorType{ - DetectorTypeDetector, DetectorTypeAnalysis, DetectorTypeCategoryOverview, + DetectorTypeDetector, } } @@ -783,6 +802,7 @@ const ( DomainStatusExpired DomainStatus = "Expired" DomainStatusFailed DomainStatus = "Failed" DomainStatusHeld DomainStatus = "Held" + DomainStatusJSONConverterFailed DomainStatus = "JsonConverterFailed" DomainStatusLocked DomainStatus = "Locked" DomainStatusParked DomainStatus = "Parked" DomainStatusPending DomainStatus = "Pending" @@ -794,7 +814,6 @@ const ( DomainStatusUnlocked DomainStatus = "Unlocked" DomainStatusUnparked DomainStatus = "Unparked" DomainStatusUpdated DomainStatus = "Updated" - DomainStatusJSONConverterFailed DomainStatus = "JsonConverterFailed" ) // PossibleDomainStatusValues returns the possible values for the DomainStatus const type. @@ -809,6 +828,7 @@ func PossibleDomainStatusValues() []DomainStatus { DomainStatusExpired, DomainStatusFailed, DomainStatusHeld, + DomainStatusJSONConverterFailed, DomainStatusLocked, DomainStatusParked, DomainStatusPending, @@ -820,7 +840,6 @@ func PossibleDomainStatusValues() []DomainStatus { DomainStatusUnlocked, DomainStatusUnparked, DomainStatusUpdated, - DomainStatusJSONConverterFailed, } } @@ -865,17 +884,17 @@ func PossibleEnterpriseGradeCdnStatusValues() []EnterpriseGradeCdnStatus { type ForwardProxyConvention string const ( + ForwardProxyConventionCustom ForwardProxyConvention = "Custom" ForwardProxyConventionNoProxy ForwardProxyConvention = "NoProxy" ForwardProxyConventionStandard ForwardProxyConvention = "Standard" - ForwardProxyConventionCustom ForwardProxyConvention = "Custom" ) // PossibleForwardProxyConventionValues returns the possible values for the ForwardProxyConvention const type. func PossibleForwardProxyConventionValues() []ForwardProxyConvention { return []ForwardProxyConvention{ + ForwardProxyConventionCustom, ForwardProxyConventionNoProxy, ForwardProxyConventionStandard, - ForwardProxyConventionCustom, } } @@ -899,15 +918,15 @@ func PossibleFrequencyUnitValues() []FrequencyUnit { type FrontEndServiceType string const ( - FrontEndServiceTypeNodePort FrontEndServiceType = "NodePort" FrontEndServiceTypeLoadBalancer FrontEndServiceType = "LoadBalancer" + FrontEndServiceTypeNodePort FrontEndServiceType = "NodePort" ) // PossibleFrontEndServiceTypeValues returns the possible values for the FrontEndServiceType const type. func PossibleFrontEndServiceTypeValues() []FrontEndServiceType { return []FrontEndServiceType{ - FrontEndServiceTypeNodePort, FrontEndServiceTypeLoadBalancer, + FrontEndServiceTypeNodePort, } } @@ -933,15 +952,15 @@ func PossibleFtpsStateValues() []FtpsState { type HostNameType string const ( - HostNameTypeVerified HostNameType = "Verified" HostNameTypeManaged HostNameType = "Managed" + HostNameTypeVerified HostNameType = "Verified" ) // PossibleHostNameTypeValues returns the possible values for the HostNameType const type. func PossibleHostNameTypeValues() []HostNameType { return []HostNameType{ - HostNameTypeVerified, HostNameTypeManaged, + HostNameTypeVerified, } } @@ -949,15 +968,15 @@ func PossibleHostNameTypeValues() []HostNameType { type HostType string const ( - HostTypeStandard HostType = "Standard" HostTypeRepository HostType = "Repository" + HostTypeStandard HostType = "Standard" ) // PossibleHostTypeValues returns the possible values for the HostType const type. func PossibleHostTypeValues() []HostType { return []HostType{ - HostTypeStandard, HostTypeRepository, + HostTypeStandard, } } @@ -965,19 +984,19 @@ func PossibleHostTypeValues() []HostType { type HostingEnvironmentStatus string const ( + HostingEnvironmentStatusDeleting HostingEnvironmentStatus = "Deleting" HostingEnvironmentStatusPreparing HostingEnvironmentStatus = "Preparing" HostingEnvironmentStatusReady HostingEnvironmentStatus = "Ready" HostingEnvironmentStatusScaling HostingEnvironmentStatus = "Scaling" - HostingEnvironmentStatusDeleting HostingEnvironmentStatus = "Deleting" ) // PossibleHostingEnvironmentStatusValues returns the possible values for the HostingEnvironmentStatus const type. func PossibleHostingEnvironmentStatusValues() []HostingEnvironmentStatus { return []HostingEnvironmentStatus{ + HostingEnvironmentStatusDeleting, HostingEnvironmentStatusPreparing, HostingEnvironmentStatusReady, HostingEnvironmentStatusScaling, - HostingEnvironmentStatusDeleting, } } @@ -1039,20 +1058,20 @@ type InsightStatus string const ( InsightStatusCritical InsightStatus = "Critical" - InsightStatusWarning InsightStatus = "Warning" InsightStatusInfo InsightStatus = "Info" - InsightStatusSuccess InsightStatus = "Success" InsightStatusNone InsightStatus = "None" + InsightStatusSuccess InsightStatus = "Success" + InsightStatusWarning InsightStatus = "Warning" ) // PossibleInsightStatusValues returns the possible values for the InsightStatus const type. func PossibleInsightStatusValues() []InsightStatus { return []InsightStatus{ InsightStatusCritical, - InsightStatusWarning, InsightStatusInfo, - InsightStatusSuccess, InsightStatusNone, + InsightStatusSuccess, + InsightStatusWarning, } } @@ -1060,27 +1079,27 @@ func PossibleInsightStatusValues() []InsightStatus { type IssueType string const ( - IssueTypeServiceIncident IssueType = "ServiceIncident" - IssueTypeAppDeployment IssueType = "AppDeployment" IssueTypeAppCrash IssueType = "AppCrash" - IssueTypeRuntimeIssueDetected IssueType = "RuntimeIssueDetected" + IssueTypeAppDeployment IssueType = "AppDeployment" IssueTypeAseDeployment IssueType = "AseDeployment" - IssueTypeUserIssue IssueType = "UserIssue" - IssueTypePlatformIssue IssueType = "PlatformIssue" IssueTypeOther IssueType = "Other" + IssueTypePlatformIssue IssueType = "PlatformIssue" + IssueTypeRuntimeIssueDetected IssueType = "RuntimeIssueDetected" + IssueTypeServiceIncident IssueType = "ServiceIncident" + IssueTypeUserIssue IssueType = "UserIssue" ) // PossibleIssueTypeValues returns the possible values for the IssueType const type. func PossibleIssueTypeValues() []IssueType { return []IssueType{ - IssueTypeServiceIncident, - IssueTypeAppDeployment, IssueTypeAppCrash, - IssueTypeRuntimeIssueDetected, + IssueTypeAppDeployment, IssueTypeAseDeployment, - IssueTypeUserIssue, - IssueTypePlatformIssue, IssueTypeOther, + IssueTypePlatformIssue, + IssueTypeRuntimeIssueDetected, + IssueTypeServiceIncident, + IssueTypeUserIssue, } } @@ -1106,33 +1125,33 @@ func PossibleKeyTypeValues() []KeyType { type KeyVaultSecretStatus string const ( - KeyVaultSecretStatusInitialized KeyVaultSecretStatus = "Initialized" - KeyVaultSecretStatusWaitingOnCertificateOrder KeyVaultSecretStatus = "WaitingOnCertificateOrder" - KeyVaultSecretStatusSucceeded KeyVaultSecretStatus = "Succeeded" - KeyVaultSecretStatusCertificateOrderFailed KeyVaultSecretStatus = "CertificateOrderFailed" - KeyVaultSecretStatusOperationNotPermittedOnKeyVault KeyVaultSecretStatus = "OperationNotPermittedOnKeyVault" KeyVaultSecretStatusAzureServiceUnauthorizedToAccessKeyVault KeyVaultSecretStatus = "AzureServiceUnauthorizedToAccessKeyVault" + KeyVaultSecretStatusCertificateOrderFailed KeyVaultSecretStatus = "CertificateOrderFailed" + KeyVaultSecretStatusExternalPrivateKey KeyVaultSecretStatus = "ExternalPrivateKey" + KeyVaultSecretStatusInitialized KeyVaultSecretStatus = "Initialized" KeyVaultSecretStatusKeyVaultDoesNotExist KeyVaultSecretStatus = "KeyVaultDoesNotExist" KeyVaultSecretStatusKeyVaultSecretDoesNotExist KeyVaultSecretStatus = "KeyVaultSecretDoesNotExist" - KeyVaultSecretStatusUnknownError KeyVaultSecretStatus = "UnknownError" - KeyVaultSecretStatusExternalPrivateKey KeyVaultSecretStatus = "ExternalPrivateKey" + KeyVaultSecretStatusOperationNotPermittedOnKeyVault KeyVaultSecretStatus = "OperationNotPermittedOnKeyVault" + KeyVaultSecretStatusSucceeded KeyVaultSecretStatus = "Succeeded" KeyVaultSecretStatusUnknown KeyVaultSecretStatus = "Unknown" + KeyVaultSecretStatusUnknownError KeyVaultSecretStatus = "UnknownError" + KeyVaultSecretStatusWaitingOnCertificateOrder KeyVaultSecretStatus = "WaitingOnCertificateOrder" ) // PossibleKeyVaultSecretStatusValues returns the possible values for the KeyVaultSecretStatus const type. func PossibleKeyVaultSecretStatusValues() []KeyVaultSecretStatus { return []KeyVaultSecretStatus{ - KeyVaultSecretStatusInitialized, - KeyVaultSecretStatusWaitingOnCertificateOrder, - KeyVaultSecretStatusSucceeded, - KeyVaultSecretStatusCertificateOrderFailed, - KeyVaultSecretStatusOperationNotPermittedOnKeyVault, KeyVaultSecretStatusAzureServiceUnauthorizedToAccessKeyVault, + KeyVaultSecretStatusCertificateOrderFailed, + KeyVaultSecretStatusExternalPrivateKey, + KeyVaultSecretStatusInitialized, KeyVaultSecretStatusKeyVaultDoesNotExist, KeyVaultSecretStatusKeyVaultSecretDoesNotExist, - KeyVaultSecretStatusUnknownError, - KeyVaultSecretStatusExternalPrivateKey, + KeyVaultSecretStatusOperationNotPermittedOnKeyVault, + KeyVaultSecretStatusSucceeded, KeyVaultSecretStatusUnknown, + KeyVaultSecretStatusUnknownError, + KeyVaultSecretStatusWaitingOnCertificateOrder, } } @@ -1156,31 +1175,31 @@ func PossibleKindValues() []Kind { type KubeEnvironmentProvisioningState string const ( - KubeEnvironmentProvisioningStateSucceeded KubeEnvironmentProvisioningState = "Succeeded" - KubeEnvironmentProvisioningStateFailed KubeEnvironmentProvisioningState = "Failed" KubeEnvironmentProvisioningStateCanceled KubeEnvironmentProvisioningState = "Canceled" - KubeEnvironmentProvisioningStateWaiting KubeEnvironmentProvisioningState = "Waiting" - KubeEnvironmentProvisioningStateInitializationInProgress KubeEnvironmentProvisioningState = "InitializationInProgress" - KubeEnvironmentProvisioningStateInfrastructureSetupInProgress KubeEnvironmentProvisioningState = "InfrastructureSetupInProgress" + KubeEnvironmentProvisioningStateFailed KubeEnvironmentProvisioningState = "Failed" KubeEnvironmentProvisioningStateInfrastructureSetupComplete KubeEnvironmentProvisioningState = "InfrastructureSetupComplete" + KubeEnvironmentProvisioningStateInfrastructureSetupInProgress KubeEnvironmentProvisioningState = "InfrastructureSetupInProgress" + KubeEnvironmentProvisioningStateInitializationInProgress KubeEnvironmentProvisioningState = "InitializationInProgress" KubeEnvironmentProvisioningStateScheduledForDelete KubeEnvironmentProvisioningState = "ScheduledForDelete" - KubeEnvironmentProvisioningStateUpgradeRequested KubeEnvironmentProvisioningState = "UpgradeRequested" + KubeEnvironmentProvisioningStateSucceeded KubeEnvironmentProvisioningState = "Succeeded" KubeEnvironmentProvisioningStateUpgradeFailed KubeEnvironmentProvisioningState = "UpgradeFailed" + KubeEnvironmentProvisioningStateUpgradeRequested KubeEnvironmentProvisioningState = "UpgradeRequested" + KubeEnvironmentProvisioningStateWaiting KubeEnvironmentProvisioningState = "Waiting" ) // PossibleKubeEnvironmentProvisioningStateValues returns the possible values for the KubeEnvironmentProvisioningState const type. func PossibleKubeEnvironmentProvisioningStateValues() []KubeEnvironmentProvisioningState { return []KubeEnvironmentProvisioningState{ - KubeEnvironmentProvisioningStateSucceeded, - KubeEnvironmentProvisioningStateFailed, KubeEnvironmentProvisioningStateCanceled, - KubeEnvironmentProvisioningStateWaiting, - KubeEnvironmentProvisioningStateInitializationInProgress, - KubeEnvironmentProvisioningStateInfrastructureSetupInProgress, + KubeEnvironmentProvisioningStateFailed, KubeEnvironmentProvisioningStateInfrastructureSetupComplete, + KubeEnvironmentProvisioningStateInfrastructureSetupInProgress, + KubeEnvironmentProvisioningStateInitializationInProgress, KubeEnvironmentProvisioningStateScheduledForDelete, - KubeEnvironmentProvisioningStateUpgradeRequested, + KubeEnvironmentProvisioningStateSucceeded, KubeEnvironmentProvisioningStateUpgradeFailed, + KubeEnvironmentProvisioningStateUpgradeRequested, + KubeEnvironmentProvisioningStateWaiting, } } @@ -1208,21 +1227,21 @@ func PossibleLoadBalancingModeValues() []LoadBalancingMode { type LogLevel string const ( + LogLevelError LogLevel = "Error" + LogLevelInformation LogLevel = "Information" LogLevelOff LogLevel = "Off" LogLevelVerbose LogLevel = "Verbose" - LogLevelInformation LogLevel = "Information" LogLevelWarning LogLevel = "Warning" - LogLevelError LogLevel = "Error" ) // PossibleLogLevelValues returns the possible values for the LogLevel const type. func PossibleLogLevelValues() []LogLevel { return []LogLevel{ + LogLevelError, + LogLevelInformation, LogLevelOff, LogLevelVerbose, - LogLevelInformation, LogLevelWarning, - LogLevelError, } } @@ -1230,17 +1249,17 @@ func PossibleLogLevelValues() []LogLevel { type MSDeployLogEntryType string const ( + MSDeployLogEntryTypeError MSDeployLogEntryType = "Error" MSDeployLogEntryTypeMessage MSDeployLogEntryType = "Message" MSDeployLogEntryTypeWarning MSDeployLogEntryType = "Warning" - MSDeployLogEntryTypeError MSDeployLogEntryType = "Error" ) // PossibleMSDeployLogEntryTypeValues returns the possible values for the MSDeployLogEntryType const type. func PossibleMSDeployLogEntryTypeValues() []MSDeployLogEntryType { return []MSDeployLogEntryType{ + MSDeployLogEntryTypeError, MSDeployLogEntryTypeMessage, MSDeployLogEntryTypeWarning, - MSDeployLogEntryTypeError, } } @@ -1249,20 +1268,20 @@ type MSDeployProvisioningState string const ( MSDeployProvisioningStateAccepted MSDeployProvisioningState = "accepted" + MSDeployProvisioningStateCanceled MSDeployProvisioningState = "canceled" + MSDeployProvisioningStateFailed MSDeployProvisioningState = "failed" MSDeployProvisioningStateRunning MSDeployProvisioningState = "running" MSDeployProvisioningStateSucceeded MSDeployProvisioningState = "succeeded" - MSDeployProvisioningStateFailed MSDeployProvisioningState = "failed" - MSDeployProvisioningStateCanceled MSDeployProvisioningState = "canceled" ) // PossibleMSDeployProvisioningStateValues returns the possible values for the MSDeployProvisioningState const type. func PossibleMSDeployProvisioningStateValues() []MSDeployProvisioningState { return []MSDeployProvisioningState{ MSDeployProvisioningStateAccepted, - MSDeployProvisioningStateRunning, - MSDeployProvisioningStateSucceeded, - MSDeployProvisioningStateFailed, MSDeployProvisioningStateCanceled, + MSDeployProvisioningStateFailed, + MSDeployProvisioningStateRunning, + MSDeployProvisioningStateSucceeded, } } @@ -1270,15 +1289,15 @@ func PossibleMSDeployProvisioningStateValues() []MSDeployProvisioningState { type ManagedPipelineMode string const ( - ManagedPipelineModeIntegrated ManagedPipelineMode = "Integrated" ManagedPipelineModeClassic ManagedPipelineMode = "Classic" + ManagedPipelineModeIntegrated ManagedPipelineMode = "Integrated" ) // PossibleManagedPipelineModeValues returns the possible values for the ManagedPipelineMode const type. func PossibleManagedPipelineModeValues() []ManagedPipelineMode { return []ManagedPipelineMode{ - ManagedPipelineModeIntegrated, ManagedPipelineModeClassic, + ManagedPipelineModeIntegrated, } } @@ -1286,19 +1305,19 @@ func PossibleManagedPipelineModeValues() []ManagedPipelineMode { type ManagedServiceIdentityType string const ( + ManagedServiceIdentityTypeNone ManagedServiceIdentityType = "None" ManagedServiceIdentityTypeSystemAssigned ManagedServiceIdentityType = "SystemAssigned" - ManagedServiceIdentityTypeUserAssigned ManagedServiceIdentityType = "UserAssigned" ManagedServiceIdentityTypeSystemAssignedUserAssigned ManagedServiceIdentityType = "SystemAssigned, UserAssigned" - ManagedServiceIdentityTypeNone ManagedServiceIdentityType = "None" + ManagedServiceIdentityTypeUserAssigned ManagedServiceIdentityType = "UserAssigned" ) // PossibleManagedServiceIdentityTypeValues returns the possible values for the ManagedServiceIdentityType const type. func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType { return []ManagedServiceIdentityType{ + ManagedServiceIdentityTypeNone, ManagedServiceIdentityTypeSystemAssigned, - ManagedServiceIdentityTypeUserAssigned, ManagedServiceIdentityTypeSystemAssignedUserAssigned, - ManagedServiceIdentityTypeNone, + ManagedServiceIdentityTypeUserAssigned, } } @@ -1323,18 +1342,18 @@ type NotificationLevel string const ( NotificationLevelCritical NotificationLevel = "Critical" - NotificationLevelWarning NotificationLevel = "Warning" NotificationLevelInformation NotificationLevel = "Information" NotificationLevelNonUrgentSuggestion NotificationLevel = "NonUrgentSuggestion" + NotificationLevelWarning NotificationLevel = "Warning" ) // PossibleNotificationLevelValues returns the possible values for the NotificationLevel const type. func PossibleNotificationLevelValues() []NotificationLevel { return []NotificationLevel{ NotificationLevelCritical, - NotificationLevelWarning, NotificationLevelInformation, NotificationLevelNonUrgentSuggestion, + NotificationLevelWarning, } } @@ -1356,21 +1375,21 @@ func PossibleOpenAuthenticationProviderTypeValues() []OpenAuthenticationProvider type OperationStatus string const ( - OperationStatusInProgress OperationStatus = "InProgress" + OperationStatusCreated OperationStatus = "Created" OperationStatusFailed OperationStatus = "Failed" + OperationStatusInProgress OperationStatus = "InProgress" OperationStatusSucceeded OperationStatus = "Succeeded" OperationStatusTimedOut OperationStatus = "TimedOut" - OperationStatusCreated OperationStatus = "Created" ) // PossibleOperationStatusValues returns the possible values for the OperationStatus const type. func PossibleOperationStatusValues() []OperationStatus { return []OperationStatus{ - OperationStatusInProgress, + OperationStatusCreated, OperationStatusFailed, + OperationStatusInProgress, OperationStatusSucceeded, OperationStatusTimedOut, - OperationStatusCreated, } } @@ -1446,21 +1465,21 @@ func PossibleProviderStackOsTypeValues() []ProviderStackOsType { type ProvisioningState string const ( - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateFailed ProvisioningState = "Failed" ProvisioningStateCanceled ProvisioningState = "Canceled" - ProvisioningStateInProgress ProvisioningState = "InProgress" ProvisioningStateDeleting ProvisioningState = "Deleting" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateInProgress ProvisioningState = "InProgress" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" ) // PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type. func PossibleProvisioningStateValues() []ProvisioningState { return []ProvisioningState{ - ProvisioningStateSucceeded, - ProvisioningStateFailed, ProvisioningStateCanceled, - ProvisioningStateInProgress, ProvisioningStateDeleting, + ProvisioningStateFailed, + ProvisioningStateInProgress, + ProvisioningStateSucceeded, } } @@ -1532,21 +1551,21 @@ func PossibleRecurrenceFrequencyValues() []RecurrenceFrequency { type RedundancyMode string const ( - RedundancyModeNone RedundancyMode = "None" - RedundancyModeManual RedundancyMode = "Manual" - RedundancyModeFailover RedundancyMode = "Failover" RedundancyModeActiveActive RedundancyMode = "ActiveActive" + RedundancyModeFailover RedundancyMode = "Failover" RedundancyModeGeoRedundant RedundancyMode = "GeoRedundant" + RedundancyModeManual RedundancyMode = "Manual" + RedundancyModeNone RedundancyMode = "None" ) // PossibleRedundancyModeValues returns the possible values for the RedundancyMode const type. func PossibleRedundancyModeValues() []RedundancyMode { return []RedundancyMode{ - RedundancyModeNone, - RedundancyModeManual, - RedundancyModeFailover, RedundancyModeActiveActive, + RedundancyModeFailover, RedundancyModeGeoRedundant, + RedundancyModeManual, + RedundancyModeNone, } } @@ -1554,94 +1573,94 @@ func PossibleRedundancyModeValues() []RedundancyMode { type RenderingType string const ( - RenderingTypeNoGraph RenderingType = "NoGraph" - RenderingTypeTable RenderingType = "Table" - RenderingTypeTimeSeries RenderingType = "TimeSeries" - RenderingTypeTimeSeriesPerInstance RenderingType = "TimeSeriesPerInstance" - RenderingTypePieChart RenderingType = "PieChart" - RenderingTypeDataSummary RenderingType = "DataSummary" - RenderingTypeEmail RenderingType = "Email" - RenderingTypeInsights RenderingType = "Insights" - RenderingTypeDynamicInsight RenderingType = "DynamicInsight" - RenderingTypeMarkdown RenderingType = "Markdown" - RenderingTypeDetector RenderingType = "Detector" - RenderingTypeDropDown RenderingType = "DropDown" + RenderingTypeAppInsight RenderingType = "AppInsight" + RenderingTypeAppInsightEnablement RenderingType = "AppInsightEnablement" RenderingTypeCard RenderingType = "Card" - RenderingTypeSolution RenderingType = "Solution" - RenderingTypeGuage RenderingType = "Guage" - RenderingTypeForm RenderingType = "Form" - RenderingTypeChangeSets RenderingType = "ChangeSets" RenderingTypeChangeAnalysisOnboarding RenderingType = "ChangeAnalysisOnboarding" + RenderingTypeChangeSets RenderingType = "ChangeSets" RenderingTypeChangesView RenderingType = "ChangesView" - RenderingTypeAppInsight RenderingType = "AppInsight" + RenderingTypeDataSummary RenderingType = "DataSummary" RenderingTypeDependencyGraph RenderingType = "DependencyGraph" + RenderingTypeDetector RenderingType = "Detector" RenderingTypeDownTime RenderingType = "DownTime" - RenderingTypeSummaryCard RenderingType = "SummaryCard" + RenderingTypeDropDown RenderingType = "DropDown" + RenderingTypeDynamicInsight RenderingType = "DynamicInsight" + RenderingTypeEmail RenderingType = "Email" + RenderingTypeForm RenderingType = "Form" + RenderingTypeGuage RenderingType = "Guage" + RenderingTypeInsights RenderingType = "Insights" + RenderingTypeMarkdown RenderingType = "Markdown" + RenderingTypeNoGraph RenderingType = "NoGraph" + RenderingTypePieChart RenderingType = "PieChart" RenderingTypeSearchComponent RenderingType = "SearchComponent" - RenderingTypeAppInsightEnablement RenderingType = "AppInsightEnablement" + RenderingTypeSolution RenderingType = "Solution" + RenderingTypeSummaryCard RenderingType = "SummaryCard" + RenderingTypeTable RenderingType = "Table" + RenderingTypeTimeSeries RenderingType = "TimeSeries" + RenderingTypeTimeSeriesPerInstance RenderingType = "TimeSeriesPerInstance" ) // PossibleRenderingTypeValues returns the possible values for the RenderingType const type. func PossibleRenderingTypeValues() []RenderingType { return []RenderingType{ - RenderingTypeNoGraph, - RenderingTypeTable, - RenderingTypeTimeSeries, - RenderingTypeTimeSeriesPerInstance, - RenderingTypePieChart, - RenderingTypeDataSummary, - RenderingTypeEmail, - RenderingTypeInsights, - RenderingTypeDynamicInsight, - RenderingTypeMarkdown, - RenderingTypeDetector, - RenderingTypeDropDown, + RenderingTypeAppInsight, + RenderingTypeAppInsightEnablement, RenderingTypeCard, - RenderingTypeSolution, - RenderingTypeGuage, - RenderingTypeForm, - RenderingTypeChangeSets, RenderingTypeChangeAnalysisOnboarding, + RenderingTypeChangeSets, RenderingTypeChangesView, - RenderingTypeAppInsight, + RenderingTypeDataSummary, RenderingTypeDependencyGraph, + RenderingTypeDetector, RenderingTypeDownTime, - RenderingTypeSummaryCard, + RenderingTypeDropDown, + RenderingTypeDynamicInsight, + RenderingTypeEmail, + RenderingTypeForm, + RenderingTypeGuage, + RenderingTypeInsights, + RenderingTypeMarkdown, + RenderingTypeNoGraph, + RenderingTypePieChart, RenderingTypeSearchComponent, - RenderingTypeAppInsightEnablement, + RenderingTypeSolution, + RenderingTypeSummaryCard, + RenderingTypeTable, + RenderingTypeTimeSeries, + RenderingTypeTimeSeriesPerInstance, } } type ResolveStatus string const ( + ResolveStatusAccessToKeyVaultDenied ResolveStatus = "AccessToKeyVaultDenied" + ResolveStatusFetchTimedOut ResolveStatus = "FetchTimedOut" ResolveStatusInitialized ResolveStatus = "Initialized" - ResolveStatusResolved ResolveStatus = "Resolved" ResolveStatusInvalidSyntax ResolveStatus = "InvalidSyntax" ResolveStatusMSINotEnabled ResolveStatus = "MSINotEnabled" - ResolveStatusVaultNotFound ResolveStatus = "VaultNotFound" + ResolveStatusOtherReasons ResolveStatus = "OtherReasons" + ResolveStatusResolved ResolveStatus = "Resolved" ResolveStatusSecretNotFound ResolveStatus = "SecretNotFound" ResolveStatusSecretVersionNotFound ResolveStatus = "SecretVersionNotFound" - ResolveStatusAccessToKeyVaultDenied ResolveStatus = "AccessToKeyVaultDenied" - ResolveStatusOtherReasons ResolveStatus = "OtherReasons" - ResolveStatusFetchTimedOut ResolveStatus = "FetchTimedOut" ResolveStatusUnauthorizedClient ResolveStatus = "UnauthorizedClient" + ResolveStatusVaultNotFound ResolveStatus = "VaultNotFound" ) // PossibleResolveStatusValues returns the possible values for the ResolveStatus const type. func PossibleResolveStatusValues() []ResolveStatus { return []ResolveStatus{ + ResolveStatusAccessToKeyVaultDenied, + ResolveStatusFetchTimedOut, ResolveStatusInitialized, - ResolveStatusResolved, ResolveStatusInvalidSyntax, ResolveStatusMSINotEnabled, - ResolveStatusVaultNotFound, + ResolveStatusOtherReasons, + ResolveStatusResolved, ResolveStatusSecretNotFound, ResolveStatusSecretVersionNotFound, - ResolveStatusAccessToKeyVaultDenied, - ResolveStatusOtherReasons, - ResolveStatusFetchTimedOut, ResolveStatusUnauthorizedClient, + ResolveStatusVaultNotFound, } } @@ -1783,16 +1802,16 @@ type SSLState string const ( SSLStateDisabled SSLState = "Disabled" - SSLStateSniEnabled SSLState = "SniEnabled" SSLStateIPBasedEnabled SSLState = "IpBasedEnabled" + SSLStateSniEnabled SSLState = "SniEnabled" ) // PossibleSSLStateValues returns the possible values for the SSLState const type. func PossibleSSLStateValues() []SSLState { return []SSLState{ SSLStateDisabled, - SSLStateSniEnabled, SSLStateIPBasedEnabled, + SSLStateSniEnabled, } } @@ -1840,17 +1859,17 @@ func PossibleScmTypeValues() []ScmType { type SiteAvailabilityState string const ( - SiteAvailabilityStateNormal SiteAvailabilityState = "Normal" - SiteAvailabilityStateLimited SiteAvailabilityState = "Limited" SiteAvailabilityStateDisasterRecoveryMode SiteAvailabilityState = "DisasterRecoveryMode" + SiteAvailabilityStateLimited SiteAvailabilityState = "Limited" + SiteAvailabilityStateNormal SiteAvailabilityState = "Normal" ) // PossibleSiteAvailabilityStateValues returns the possible values for the SiteAvailabilityState const type. func PossibleSiteAvailabilityStateValues() []SiteAvailabilityState { return []SiteAvailabilityState{ - SiteAvailabilityStateNormal, - SiteAvailabilityStateLimited, SiteAvailabilityStateDisasterRecoveryMode, + SiteAvailabilityStateLimited, + SiteAvailabilityStateNormal, } } @@ -1874,23 +1893,23 @@ func PossibleSiteExtensionTypeValues() []SiteExtensionType { type SiteLoadBalancing string const ( - SiteLoadBalancingWeightedRoundRobin SiteLoadBalancing = "WeightedRoundRobin" SiteLoadBalancingLeastRequests SiteLoadBalancing = "LeastRequests" SiteLoadBalancingLeastResponseTime SiteLoadBalancing = "LeastResponseTime" - SiteLoadBalancingWeightedTotalTraffic SiteLoadBalancing = "WeightedTotalTraffic" - SiteLoadBalancingRequestHash SiteLoadBalancing = "RequestHash" SiteLoadBalancingPerSiteRoundRobin SiteLoadBalancing = "PerSiteRoundRobin" + SiteLoadBalancingRequestHash SiteLoadBalancing = "RequestHash" + SiteLoadBalancingWeightedRoundRobin SiteLoadBalancing = "WeightedRoundRobin" + SiteLoadBalancingWeightedTotalTraffic SiteLoadBalancing = "WeightedTotalTraffic" ) // PossibleSiteLoadBalancingValues returns the possible values for the SiteLoadBalancing const type. func PossibleSiteLoadBalancingValues() []SiteLoadBalancing { return []SiteLoadBalancing{ - SiteLoadBalancingWeightedRoundRobin, SiteLoadBalancingLeastRequests, SiteLoadBalancingLeastResponseTime, - SiteLoadBalancingWeightedTotalTraffic, - SiteLoadBalancingRequestHash, SiteLoadBalancingPerSiteRoundRobin, + SiteLoadBalancingRequestHash, + SiteLoadBalancingWeightedRoundRobin, + SiteLoadBalancingWeightedTotalTraffic, } } @@ -1915,17 +1934,17 @@ func PossibleSiteRuntimeStateValues() []SiteRuntimeState { type SolutionType string const ( - SolutionTypeQuickSolution SolutionType = "QuickSolution" - SolutionTypeDeepInvestigation SolutionType = "DeepInvestigation" SolutionTypeBestPractices SolutionType = "BestPractices" + SolutionTypeDeepInvestigation SolutionType = "DeepInvestigation" + SolutionTypeQuickSolution SolutionType = "QuickSolution" ) // PossibleSolutionTypeValues returns the possible values for the SolutionType const type. func PossibleSolutionTypeValues() []SolutionType { return []SolutionType{ - SolutionTypeQuickSolution, - SolutionTypeDeepInvestigation, SolutionTypeBestPractices, + SolutionTypeDeepInvestigation, + SolutionTypeQuickSolution, } } @@ -1933,15 +1952,15 @@ func PossibleSolutionTypeValues() []SolutionType { type StackPreferredOs string const ( - StackPreferredOsWindows StackPreferredOs = "Windows" StackPreferredOsLinux StackPreferredOs = "Linux" + StackPreferredOsWindows StackPreferredOs = "Windows" ) // PossibleStackPreferredOsValues returns the possible values for the StackPreferredOs const type. func PossibleStackPreferredOsValues() []StackPreferredOs { return []StackPreferredOs{ - StackPreferredOsWindows, StackPreferredOsLinux, + StackPreferredOsWindows, } } @@ -1949,15 +1968,15 @@ func PossibleStackPreferredOsValues() []StackPreferredOs { type StagingEnvironmentPolicy string const ( - StagingEnvironmentPolicyEnabled StagingEnvironmentPolicy = "Enabled" StagingEnvironmentPolicyDisabled StagingEnvironmentPolicy = "Disabled" + StagingEnvironmentPolicyEnabled StagingEnvironmentPolicy = "Enabled" ) // PossibleStagingEnvironmentPolicyValues returns the possible values for the StagingEnvironmentPolicy const type. func PossibleStagingEnvironmentPolicyValues() []StagingEnvironmentPolicy { return []StagingEnvironmentPolicy{ - StagingEnvironmentPolicyEnabled, StagingEnvironmentPolicyDisabled, + StagingEnvironmentPolicyEnabled, } } @@ -1965,17 +1984,17 @@ func PossibleStagingEnvironmentPolicyValues() []StagingEnvironmentPolicy { type StatusOptions string const ( - StatusOptionsReady StatusOptions = "Ready" - StatusOptionsPending StatusOptions = "Pending" StatusOptionsCreating StatusOptions = "Creating" + StatusOptionsPending StatusOptions = "Pending" + StatusOptionsReady StatusOptions = "Ready" ) // PossibleStatusOptionsValues returns the possible values for the StatusOptions const type. func PossibleStatusOptionsValues() []StatusOptions { return []StatusOptions{ - StatusOptionsReady, - StatusOptionsPending, StatusOptionsCreating, + StatusOptionsPending, + StatusOptionsReady, } } @@ -2012,6 +2031,52 @@ func PossibleSupportedTLSVersionsValues() []SupportedTLSVersions { } } +// TLSCipherSuites - The minimum strength TLS cipher suite allowed for an application +type TLSCipherSuites string + +const ( + TLSCipherSuitesTLSAES128GCMSHA256 TLSCipherSuites = "TLS_AES_128_GCM_SHA256" + TLSCipherSuitesTLSAES256GCMSHA384 TLSCipherSuites = "TLS_AES_256_GCM_SHA384" + TLSCipherSuitesTLSECDHEECDSAWITHAES128CBCSHA256 TLSCipherSuites = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256" + TLSCipherSuitesTLSECDHEECDSAWITHAES128GCMSHA256 TLSCipherSuites = "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256" + TLSCipherSuitesTLSECDHEECDSAWITHAES256GCMSHA384 TLSCipherSuites = "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" + TLSCipherSuitesTLSECDHERSAWITHAES128CBCSHA TLSCipherSuites = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" + TLSCipherSuitesTLSECDHERSAWITHAES128CBCSHA256 TLSCipherSuites = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" + TLSCipherSuitesTLSECDHERSAWITHAES128GCMSHA256 TLSCipherSuites = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" + TLSCipherSuitesTLSECDHERSAWITHAES256CBCSHA TLSCipherSuites = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" + TLSCipherSuitesTLSECDHERSAWITHAES256CBCSHA384 TLSCipherSuites = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384" + TLSCipherSuitesTLSECDHERSAWITHAES256GCMSHA384 TLSCipherSuites = "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" + TLSCipherSuitesTLSRSAWITHAES128CBCSHA TLSCipherSuites = "TLS_RSA_WITH_AES_128_CBC_SHA" + TLSCipherSuitesTLSRSAWITHAES128CBCSHA256 TLSCipherSuites = "TLS_RSA_WITH_AES_128_CBC_SHA256" + TLSCipherSuitesTLSRSAWITHAES128GCMSHA256 TLSCipherSuites = "TLS_RSA_WITH_AES_128_GCM_SHA256" + TLSCipherSuitesTLSRSAWITHAES256CBCSHA TLSCipherSuites = "TLS_RSA_WITH_AES_256_CBC_SHA" + TLSCipherSuitesTLSRSAWITHAES256CBCSHA256 TLSCipherSuites = "TLS_RSA_WITH_AES_256_CBC_SHA256" + TLSCipherSuitesTLSRSAWITHAES256GCMSHA384 TLSCipherSuites = "TLS_RSA_WITH_AES_256_GCM_SHA384" +) + +// PossibleTLSCipherSuitesValues returns the possible values for the TLSCipherSuites const type. +func PossibleTLSCipherSuitesValues() []TLSCipherSuites { + return []TLSCipherSuites{ + TLSCipherSuitesTLSAES128GCMSHA256, + TLSCipherSuitesTLSAES256GCMSHA384, + TLSCipherSuitesTLSECDHEECDSAWITHAES128CBCSHA256, + TLSCipherSuitesTLSECDHEECDSAWITHAES128GCMSHA256, + TLSCipherSuitesTLSECDHEECDSAWITHAES256GCMSHA384, + TLSCipherSuitesTLSECDHERSAWITHAES128CBCSHA, + TLSCipherSuitesTLSECDHERSAWITHAES128CBCSHA256, + TLSCipherSuitesTLSECDHERSAWITHAES128GCMSHA256, + TLSCipherSuitesTLSECDHERSAWITHAES256CBCSHA, + TLSCipherSuitesTLSECDHERSAWITHAES256CBCSHA384, + TLSCipherSuitesTLSECDHERSAWITHAES256GCMSHA384, + TLSCipherSuitesTLSRSAWITHAES128CBCSHA, + TLSCipherSuitesTLSRSAWITHAES128CBCSHA256, + TLSCipherSuitesTLSRSAWITHAES128GCMSHA256, + TLSCipherSuitesTLSRSAWITHAES256CBCSHA, + TLSCipherSuitesTLSRSAWITHAES256CBCSHA256, + TLSCipherSuitesTLSRSAWITHAES256GCMSHA384, + } +} + // TriggerTypes - The trigger type of the function type TriggerTypes string @@ -2032,17 +2097,17 @@ func PossibleTriggerTypesValues() []TriggerTypes { type TriggeredWebJobStatus string const ( - TriggeredWebJobStatusSuccess TriggeredWebJobStatus = "Success" - TriggeredWebJobStatusFailed TriggeredWebJobStatus = "Failed" TriggeredWebJobStatusError TriggeredWebJobStatus = "Error" + TriggeredWebJobStatusFailed TriggeredWebJobStatus = "Failed" + TriggeredWebJobStatusSuccess TriggeredWebJobStatus = "Success" ) // PossibleTriggeredWebJobStatusValues returns the possible values for the TriggeredWebJobStatus const type. func PossibleTriggeredWebJobStatusValues() []TriggeredWebJobStatus { return []TriggeredWebJobStatus{ - TriggeredWebJobStatusSuccess, - TriggeredWebJobStatusFailed, TriggeredWebJobStatusError, + TriggeredWebJobStatusFailed, + TriggeredWebJobStatusSuccess, } } @@ -2050,15 +2115,15 @@ func PossibleTriggeredWebJobStatusValues() []TriggeredWebJobStatus { type UnauthenticatedClientAction string const ( - UnauthenticatedClientActionRedirectToLoginPage UnauthenticatedClientAction = "RedirectToLoginPage" UnauthenticatedClientActionAllowAnonymous UnauthenticatedClientAction = "AllowAnonymous" + UnauthenticatedClientActionRedirectToLoginPage UnauthenticatedClientAction = "RedirectToLoginPage" ) // PossibleUnauthenticatedClientActionValues returns the possible values for the UnauthenticatedClientAction const type. func PossibleUnauthenticatedClientActionValues() []UnauthenticatedClientAction { return []UnauthenticatedClientAction{ - UnauthenticatedClientActionRedirectToLoginPage, UnauthenticatedClientActionAllowAnonymous, + UnauthenticatedClientActionRedirectToLoginPage, } } @@ -2066,8 +2131,8 @@ func PossibleUnauthenticatedClientActionValues() []UnauthenticatedClientAction { type UnauthenticatedClientActionV2 string const ( - UnauthenticatedClientActionV2RedirectToLoginPage UnauthenticatedClientActionV2 = "RedirectToLoginPage" UnauthenticatedClientActionV2AllowAnonymous UnauthenticatedClientActionV2 = "AllowAnonymous" + UnauthenticatedClientActionV2RedirectToLoginPage UnauthenticatedClientActionV2 = "RedirectToLoginPage" UnauthenticatedClientActionV2Return401 UnauthenticatedClientActionV2 = "Return401" UnauthenticatedClientActionV2Return403 UnauthenticatedClientActionV2 = "Return403" ) @@ -2075,8 +2140,8 @@ const ( // PossibleUnauthenticatedClientActionV2Values returns the possible values for the UnauthenticatedClientActionV2 const type. func PossibleUnauthenticatedClientActionV2Values() []UnauthenticatedClientActionV2 { return []UnauthenticatedClientActionV2{ - UnauthenticatedClientActionV2RedirectToLoginPage, UnauthenticatedClientActionV2AllowAnonymous, + UnauthenticatedClientActionV2RedirectToLoginPage, UnauthenticatedClientActionV2Return401, UnauthenticatedClientActionV2Return403, } @@ -2131,15 +2196,15 @@ func PossibleUpgradePreferenceValues() []UpgradePreference { type UsageState string const ( - UsageStateNormal UsageState = "Normal" UsageStateExceeded UsageState = "Exceeded" + UsageStateNormal UsageState = "Normal" ) // PossibleUsageStateValues returns the possible values for the UsageState const type. func PossibleUsageStateValues() []UsageState { return []UsageState{ - UsageStateNormal, UsageStateExceeded, + UsageStateNormal, } } @@ -2181,35 +2246,35 @@ func PossibleWebJobTypeValues() []WebJobType { type WorkerSizeOptions string const ( - WorkerSizeOptionsSmall WorkerSizeOptions = "Small" - WorkerSizeOptionsMedium WorkerSizeOptions = "Medium" - WorkerSizeOptionsLarge WorkerSizeOptions = "Large" WorkerSizeOptionsD1 WorkerSizeOptions = "D1" WorkerSizeOptionsD2 WorkerSizeOptions = "D2" WorkerSizeOptionsD3 WorkerSizeOptions = "D3" - WorkerSizeOptionsSmallV3 WorkerSizeOptions = "SmallV3" - WorkerSizeOptionsMediumV3 WorkerSizeOptions = "MediumV3" + WorkerSizeOptionsDefault WorkerSizeOptions = "Default" + WorkerSizeOptionsLarge WorkerSizeOptions = "Large" WorkerSizeOptionsLargeV3 WorkerSizeOptions = "LargeV3" + WorkerSizeOptionsMedium WorkerSizeOptions = "Medium" + WorkerSizeOptionsMediumV3 WorkerSizeOptions = "MediumV3" WorkerSizeOptionsNestedSmall WorkerSizeOptions = "NestedSmall" WorkerSizeOptionsNestedSmallLinux WorkerSizeOptions = "NestedSmallLinux" - WorkerSizeOptionsDefault WorkerSizeOptions = "Default" + WorkerSizeOptionsSmall WorkerSizeOptions = "Small" + WorkerSizeOptionsSmallV3 WorkerSizeOptions = "SmallV3" ) // PossibleWorkerSizeOptionsValues returns the possible values for the WorkerSizeOptions const type. func PossibleWorkerSizeOptionsValues() []WorkerSizeOptions { return []WorkerSizeOptions{ - WorkerSizeOptionsSmall, - WorkerSizeOptionsMedium, - WorkerSizeOptionsLarge, WorkerSizeOptionsD1, WorkerSizeOptionsD2, WorkerSizeOptionsD3, - WorkerSizeOptionsSmallV3, - WorkerSizeOptionsMediumV3, + WorkerSizeOptionsDefault, + WorkerSizeOptionsLarge, WorkerSizeOptionsLargeV3, + WorkerSizeOptionsMedium, + WorkerSizeOptionsMediumV3, WorkerSizeOptionsNestedSmall, WorkerSizeOptionsNestedSmallLinux, - WorkerSizeOptionsDefault, + WorkerSizeOptionsSmall, + WorkerSizeOptionsSmallV3, } } @@ -2217,8 +2282,8 @@ func PossibleWorkerSizeOptionsValues() []WorkerSizeOptions { type WorkflowHealthState string const ( - WorkflowHealthStateNotSpecified WorkflowHealthState = "NotSpecified" WorkflowHealthStateHealthy WorkflowHealthState = "Healthy" + WorkflowHealthStateNotSpecified WorkflowHealthState = "NotSpecified" WorkflowHealthStateUnhealthy WorkflowHealthState = "Unhealthy" WorkflowHealthStateUnknown WorkflowHealthState = "Unknown" ) @@ -2226,8 +2291,8 @@ const ( // PossibleWorkflowHealthStateValues returns the possible values for the WorkflowHealthState const type. func PossibleWorkflowHealthStateValues() []WorkflowHealthState { return []WorkflowHealthState{ - WorkflowHealthStateNotSpecified, WorkflowHealthStateHealthy, + WorkflowHealthStateNotSpecified, WorkflowHealthStateUnhealthy, WorkflowHealthStateUnknown, } @@ -2313,26 +2378,26 @@ func PossibleWorkflowSKUNameValues() []WorkflowSKUName { } } -// WorkflowState - Gets or sets the state of the workflow. +// WorkflowState - The workflow state. type WorkflowState string const ( - WorkflowStateNotSpecified WorkflowState = "NotSpecified" WorkflowStateCompleted WorkflowState = "Completed" - WorkflowStateEnabled WorkflowState = "Enabled" - WorkflowStateDisabled WorkflowState = "Disabled" WorkflowStateDeleted WorkflowState = "Deleted" + WorkflowStateDisabled WorkflowState = "Disabled" + WorkflowStateEnabled WorkflowState = "Enabled" + WorkflowStateNotSpecified WorkflowState = "NotSpecified" WorkflowStateSuspended WorkflowState = "Suspended" ) // PossibleWorkflowStateValues returns the possible values for the WorkflowState const type. func PossibleWorkflowStateValues() []WorkflowState { return []WorkflowState{ - WorkflowStateNotSpecified, WorkflowStateCompleted, - WorkflowStateEnabled, - WorkflowStateDisabled, WorkflowStateDeleted, + WorkflowStateDisabled, + WorkflowStateEnabled, + WorkflowStateNotSpecified, WorkflowStateSuspended, } } diff --git a/sdk/resourcemanager/appservice/armappservice/containerapps_client.go b/sdk/resourcemanager/appservice/armappservice/containerapps_client.go index 0a7fb59751b8..4673319ebaa9 100644 --- a/sdk/resourcemanager/appservice/armappservice/containerapps_client.go +++ b/sdk/resourcemanager/appservice/armappservice/containerapps_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappservice @@ -33,7 +32,7 @@ type ContainerAppsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewContainerAppsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ContainerAppsClient, error) { - cl, err := arm.NewClient(moduleName+".ContainerAppsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,7 +46,7 @@ func NewContainerAppsClient(subscriptionID string, credential azcore.TokenCreden // BeginCreateOrUpdate - Description for Create or update a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the Container App. // - options - ContainerAppsClientBeginCreateOrUpdateOptions contains the optional parameters for the ContainerAppsClient.BeginCreateOrUpdate @@ -58,29 +57,40 @@ func (client *ContainerAppsClient) BeginCreateOrUpdate(ctx context.Context, reso if err != nil { return nil, err } - return runtime.NewPoller[ContainerAppsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ContainerAppsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ContainerAppsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ContainerAppsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateOrUpdate - Description for Create or update a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *ContainerAppsClient) createOrUpdate(ctx context.Context, resourceGroupName string, name string, containerAppEnvelope ContainerApp, options *ContainerAppsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "ContainerAppsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, name, containerAppEnvelope, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -103,16 +113,19 @@ func (client *ContainerAppsClient) createOrUpdateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, containerAppEnvelope) + if err := runtime.MarshalAsJSON(req, containerAppEnvelope); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Description for Delete a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the Container App. // - options - ContainerAppsClientBeginDeleteOptions contains the optional parameters for the ContainerAppsClient.BeginDelete @@ -123,29 +136,40 @@ func (client *ContainerAppsClient) BeginDelete(ctx context.Context, resourceGrou if err != nil { return nil, err } - return runtime.NewPoller[ContainerAppsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ContainerAppsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[ContainerAppsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ContainerAppsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Description for Delete a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *ContainerAppsClient) deleteOperation(ctx context.Context, resourceGroupName string, name string, options *ContainerAppsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "ContainerAppsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -168,7 +192,7 @@ func (client *ContainerAppsClient) deleteCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -177,23 +201,30 @@ func (client *ContainerAppsClient) deleteCreateRequest(ctx context.Context, reso // Get - Get the properties of a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the Container App. // - options - ContainerAppsClientGetOptions contains the optional parameters for the ContainerAppsClient.Get method. func (client *ContainerAppsClient) Get(ctx context.Context, resourceGroupName string, name string, options *ContainerAppsClientGetOptions) (ContainerAppsClientGetResponse, error) { + var err error + const operationName = "ContainerAppsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return ContainerAppsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ContainerAppsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ContainerAppsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -216,7 +247,7 @@ func (client *ContainerAppsClient) getCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -233,7 +264,7 @@ func (client *ContainerAppsClient) getHandleResponse(resp *http.Response) (Conta // NewListByResourceGroupPager - Get the Container Apps in a given resource group. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - options - ContainerAppsClientListByResourceGroupOptions contains the optional parameters for the ContainerAppsClient.NewListByResourceGroupPager // method. @@ -243,25 +274,20 @@ func (client *ContainerAppsClient) NewListByResourceGroupPager(resourceGroupName return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ContainerAppsClientListByResourceGroupResponse) (ContainerAppsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ContainerAppsClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return ContainerAppsClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ContainerAppsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -281,7 +307,7 @@ func (client *ContainerAppsClient) listByResourceGroupCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -298,7 +324,7 @@ func (client *ContainerAppsClient) listByResourceGroupHandleResponse(resp *http. // NewListBySubscriptionPager - Get the Container Apps in a given subscription. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - options - ContainerAppsClientListBySubscriptionOptions contains the optional parameters for the ContainerAppsClient.NewListBySubscriptionPager // method. func (client *ContainerAppsClient) NewListBySubscriptionPager(options *ContainerAppsClientListBySubscriptionOptions) *runtime.Pager[ContainerAppsClientListBySubscriptionResponse] { @@ -307,25 +333,20 @@ func (client *ContainerAppsClient) NewListBySubscriptionPager(options *Container return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ContainerAppsClientListBySubscriptionResponse) (ContainerAppsClientListBySubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ContainerAppsClient.NewListBySubscriptionPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBySubscriptionCreateRequest(ctx, options) + }, nil) if err != nil { return ContainerAppsClientListBySubscriptionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ContainerAppsClientListBySubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } return client.listBySubscriptionHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -341,7 +362,7 @@ func (client *ContainerAppsClient) listBySubscriptionCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -359,23 +380,30 @@ func (client *ContainerAppsClient) listBySubscriptionHandleResponse(resp *http.R // ListSecrets - List secrets for a container app // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - name - Name of the Container App. // - options - ContainerAppsClientListSecretsOptions contains the optional parameters for the ContainerAppsClient.ListSecrets // method. func (client *ContainerAppsClient) ListSecrets(ctx context.Context, name string, options *ContainerAppsClientListSecretsOptions) (ContainerAppsClientListSecretsResponse, error) { + var err error + const operationName = "ContainerAppsClient.ListSecrets" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listSecretsCreateRequest(ctx, name, options) if err != nil { return ContainerAppsClientListSecretsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ContainerAppsClientListSecretsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsClientListSecretsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ContainerAppsClientListSecretsResponse{}, err } - return client.listSecretsHandleResponse(resp) + resp, err := client.listSecretsHandleResponse(httpResp) + return resp, err } // listSecretsCreateRequest creates the ListSecrets request. @@ -394,7 +422,7 @@ func (client *ContainerAppsClient) listSecretsCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/containerapps_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/containerapps_client_example_test.go deleted file mode 100644 index b79acfeb1eae..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/containerapps_client_example_test.go +++ /dev/null @@ -1,400 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListContainerAppsBySubscription.json -func ExampleContainerAppsClient_NewListBySubscriptionPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewContainerAppsClient().NewListBySubscriptionPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ContainerAppCollection = armappservice.ContainerAppCollection{ - // Value: []*armappservice.ContainerApp{ - // { - // Name: to.Ptr("testcontainerApp0"), - // Type: to.Ptr("Microsoft.Web/containerApps"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/containerApps/testcontainerApp0"), - // Kind: to.Ptr("containerApp"), - // Location: to.Ptr("East US"), - // Properties: &armappservice.ContainerAppProperties{ - // Configuration: &armappservice.Configuration{ - // Ingress: &armappservice.Ingress{ - // External: to.Ptr(true), - // Fqdn: to.Ptr("testcontainerApp0.demokube-t24clv0g.eastus.containerApps.k4apps.io"), - // TargetPort: to.Ptr[int32](3000), - // Transport: to.Ptr(armappservice.IngressTransportMethodAuto), - // }, - // }, - // KubeEnvironmentID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/kubeEnvironments/demokube"), - // LatestRevisionFqdn: to.Ptr("testcontainerApp0-pjxhsye.demokube-t24clv0g.eastus.containerApps.k4apps.io"), - // ProvisioningState: to.Ptr(armappservice.ContainerAppProvisioningStateSucceeded), - // Template: &armappservice.Template{ - // Containers: []*armappservice.Container{ - // { - // Name: to.Ptr("testcontainerApp0"), - // Image: to.Ptr("repo/testcontainerApp0:v4"), - // Resources: &armappservice.ContainerResources{ - // CPU: to.Ptr[float64](0.2), - // Memory: to.Ptr("100Mi"), - // }, - // }}, - // Dapr: &armappservice.Dapr{ - // AppPort: to.Ptr[int32](3000), - // Enabled: to.Ptr(true), - // }, - // Scale: &armappservice.Scale{ - // MaxReplicas: to.Ptr[int32](5), - // MinReplicas: to.Ptr[int32](1), - // Rules: []*armappservice.ScaleRule{ - // { - // Name: to.Ptr("httpscalingrule"), - // HTTP: &armappservice.HTTPScaleRule{ - // Metadata: map[string]*string{ - // "concurrentRequests": to.Ptr("50"), - // }, - // }, - // }}, - // }, - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListContainerAppsByResourceGroup.json -func ExampleContainerAppsClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewContainerAppsClient().NewListByResourceGroupPager("rg", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ContainerAppCollection = armappservice.ContainerAppCollection{ - // Value: []*armappservice.ContainerApp{ - // { - // Name: to.Ptr("testcontainerApp0"), - // Type: to.Ptr("Microsoft.Web/containerApps"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/containerApps/testcontainerApp0"), - // Kind: to.Ptr("containerApp"), - // Location: to.Ptr("East US"), - // Properties: &armappservice.ContainerAppProperties{ - // Configuration: &armappservice.Configuration{ - // Ingress: &armappservice.Ingress{ - // External: to.Ptr(true), - // Fqdn: to.Ptr("testcontainerApp0.demokube-t24clv0g.eastus.containerApps.k4apps.io"), - // TargetPort: to.Ptr[int32](3000), - // Transport: to.Ptr(armappservice.IngressTransportMethodAuto), - // }, - // }, - // KubeEnvironmentID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/kubeEnvironments/demokube"), - // LatestRevisionFqdn: to.Ptr("testcontainerApp0-pjxhsye.demokube-t24clv0g.eastus.containerApps.k4apps.io"), - // ProvisioningState: to.Ptr(armappservice.ContainerAppProvisioningStateSucceeded), - // Template: &armappservice.Template{ - // Containers: []*armappservice.Container{ - // { - // Name: to.Ptr("testcontainerApp0"), - // Image: to.Ptr("repo/testcontainerApp0:v4"), - // Resources: &armappservice.ContainerResources{ - // CPU: to.Ptr[float64](0.2), - // Memory: to.Ptr("100Mi"), - // }, - // }}, - // Dapr: &armappservice.Dapr{ - // AppPort: to.Ptr[int32](3000), - // Enabled: to.Ptr(true), - // }, - // Scale: &armappservice.Scale{ - // MaxReplicas: to.Ptr[int32](5), - // MinReplicas: to.Ptr[int32](1), - // Rules: []*armappservice.ScaleRule{ - // { - // Name: to.Ptr("httpscalingrule"), - // HTTP: &armappservice.HTTPScaleRule{ - // Metadata: map[string]*string{ - // "concurrentRequests": to.Ptr("50"), - // }, - // }, - // }}, - // }, - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetContainerApp.json -func ExampleContainerAppsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewContainerAppsClient().Get(ctx, "rg", "testcontainerApp0", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ContainerApp = armappservice.ContainerApp{ - // Name: to.Ptr("testcontainerApp0"), - // Type: to.Ptr("Microsoft.Web/containerApps"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/containerApps/testcontainerApp0"), - // Kind: to.Ptr("containerApp"), - // Location: to.Ptr("East US"), - // Properties: &armappservice.ContainerAppProperties{ - // Configuration: &armappservice.Configuration{ - // Ingress: &armappservice.Ingress{ - // External: to.Ptr(true), - // Fqdn: to.Ptr("testcontainerApp0.demokube-t24clv0g.eastus.containerApps.k4apps.io"), - // TargetPort: to.Ptr[int32](3000), - // Transport: to.Ptr(armappservice.IngressTransportMethodAuto), - // }, - // }, - // KubeEnvironmentID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/kubeEnvironments/demokube"), - // LatestRevisionFqdn: to.Ptr("testcontainerApp0-pjxhsye.demokube-t24clv0g.eastus.containerApps.k4apps.io"), - // ProvisioningState: to.Ptr(armappservice.ContainerAppProvisioningStateSucceeded), - // Template: &armappservice.Template{ - // Containers: []*armappservice.Container{ - // { - // Name: to.Ptr("testcontainerApp0"), - // Image: to.Ptr("repo/testcontainerApp0:v4"), - // Resources: &armappservice.ContainerResources{ - // CPU: to.Ptr[float64](0.2), - // Memory: to.Ptr("100Mi"), - // }, - // }}, - // Dapr: &armappservice.Dapr{ - // AppPort: to.Ptr[int32](3000), - // Enabled: to.Ptr(true), - // }, - // Scale: &armappservice.Scale{ - // MaxReplicas: to.Ptr[int32](5), - // MinReplicas: to.Ptr[int32](1), - // Rules: []*armappservice.ScaleRule{ - // { - // Name: to.Ptr("httpscalingrule"), - // HTTP: &armappservice.HTTPScaleRule{ - // Metadata: map[string]*string{ - // "concurrentRequests": to.Ptr("50"), - // }, - // }, - // }}, - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/CreateOrUpdateContainerApp.json -func ExampleContainerAppsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewContainerAppsClient().BeginCreateOrUpdate(ctx, "rg", "testcontainerApp0", armappservice.ContainerApp{ - Kind: to.Ptr("containerApp"), - Location: to.Ptr("East US"), - Properties: &armappservice.ContainerAppProperties{ - Configuration: &armappservice.Configuration{ - Ingress: &armappservice.Ingress{ - External: to.Ptr(true), - TargetPort: to.Ptr[int32](3000), - }, - }, - KubeEnvironmentID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/kubeEnvironments/demokube"), - Template: &armappservice.Template{ - Containers: []*armappservice.Container{ - { - Name: to.Ptr("testcontainerApp0"), - Image: to.Ptr("repo/testcontainerApp0:v1"), - }}, - Dapr: &armappservice.Dapr{ - AppPort: to.Ptr[int32](3000), - Enabled: to.Ptr(true), - }, - Scale: &armappservice.Scale{ - MaxReplicas: to.Ptr[int32](5), - MinReplicas: to.Ptr[int32](1), - Rules: []*armappservice.ScaleRule{ - { - Name: to.Ptr("httpscalingrule"), - Custom: &armappservice.CustomScaleRule{ - Type: to.Ptr("http"), - Metadata: map[string]*string{ - "concurrentRequests": to.Ptr("50"), - }, - }, - }}, - }, - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ContainerApp = armappservice.ContainerApp{ - // Name: to.Ptr("testcontainerApp0"), - // Type: to.Ptr("Microsoft.Web/containerApps"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/containerApps/testcontainerApp0"), - // Kind: to.Ptr("containerApp"), - // Location: to.Ptr("East US"), - // Properties: &armappservice.ContainerAppProperties{ - // Configuration: &armappservice.Configuration{ - // Ingress: &armappservice.Ingress{ - // External: to.Ptr(true), - // Fqdn: to.Ptr("testcontainerApp0.demokube-t24clv0g.eastus.containerApps.k4apps.io"), - // TargetPort: to.Ptr[int32](3000), - // Transport: to.Ptr(armappservice.IngressTransportMethodAuto), - // }, - // }, - // KubeEnvironmentID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/kubeEnvironments/demokube"), - // LatestRevisionFqdn: to.Ptr("testcontainerApp0-pjxhsye.demokube-t24clv0g.eastus.containerApps.k4apps.io"), - // ProvisioningState: to.Ptr(armappservice.ContainerAppProvisioningStateSucceeded), - // Template: &armappservice.Template{ - // Containers: []*armappservice.Container{ - // { - // Name: to.Ptr("testcontainerApp0"), - // Image: to.Ptr("repo/testcontainerApp0:v4"), - // Resources: &armappservice.ContainerResources{ - // CPU: to.Ptr[float64](0.2), - // Memory: to.Ptr("100Mi"), - // }, - // }}, - // Dapr: &armappservice.Dapr{ - // AppPort: to.Ptr[int32](3000), - // Enabled: to.Ptr(true), - // }, - // Scale: &armappservice.Scale{ - // MaxReplicas: to.Ptr[int32](5), - // MinReplicas: to.Ptr[int32](1), - // Rules: []*armappservice.ScaleRule{ - // { - // Name: to.Ptr("httpscalingrule"), - // HTTP: &armappservice.HTTPScaleRule{ - // Metadata: map[string]*string{ - // "concurrentRequests": to.Ptr("50"), - // }, - // }, - // }}, - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/DeleteContainerApp.json -func ExampleContainerAppsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewContainerAppsClient().BeginDelete(ctx, "rg", "testWorkerApp0", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListContainerAppSecrets.json -func ExampleContainerAppsClient_ListSecrets() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewContainerAppsClient().ListSecrets(ctx, "testcontainerApp0", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SecretsCollection = armappservice.SecretsCollection{ - // Value: []*armappservice.ContainerAppSecret{ - // { - // Name: to.Ptr("secret1"), - // Value: to.Ptr("value1"), - // }, - // { - // Name: to.Ptr("secret2"), - // Value: to.Ptr("value2"), - // }}, - // } -} diff --git a/sdk/resourcemanager/appservice/armappservice/containerappsrevisions_client.go b/sdk/resourcemanager/appservice/armappservice/containerappsrevisions_client.go index 089b80e2226c..6035f4620060 100644 --- a/sdk/resourcemanager/appservice/armappservice/containerappsrevisions_client.go +++ b/sdk/resourcemanager/appservice/armappservice/containerappsrevisions_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappservice @@ -33,7 +32,7 @@ type ContainerAppsRevisionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewContainerAppsRevisionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ContainerAppsRevisionsClient, error) { - cl, err := arm.NewClient(moduleName+".ContainerAppsRevisionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,23 +46,29 @@ func NewContainerAppsRevisionsClient(subscriptionID string, credential azcore.To // ActivateRevision - Activates a revision for a Container App // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - containerAppName - Name of the Container App. // - name - Name of the Container App Revision to activate // - options - ContainerAppsRevisionsClientActivateRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.ActivateRevision // method. func (client *ContainerAppsRevisionsClient) ActivateRevision(ctx context.Context, resourceGroupName string, containerAppName string, name string, options *ContainerAppsRevisionsClientActivateRevisionOptions) (ContainerAppsRevisionsClientActivateRevisionResponse, error) { + var err error + const operationName = "ContainerAppsRevisionsClient.ActivateRevision" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.activateRevisionCreateRequest(ctx, resourceGroupName, containerAppName, name, options) if err != nil { return ContainerAppsRevisionsClientActivateRevisionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ContainerAppsRevisionsClientActivateRevisionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsRevisionsClientActivateRevisionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ContainerAppsRevisionsClientActivateRevisionResponse{}, err } return ContainerAppsRevisionsClientActivateRevisionResponse{}, nil } @@ -92,7 +97,7 @@ func (client *ContainerAppsRevisionsClient) activateRevisionCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -101,23 +106,29 @@ func (client *ContainerAppsRevisionsClient) activateRevisionCreateRequest(ctx co // DeactivateRevision - Deactivates a revision for a Container App // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - containerAppName - Name of the Container App. // - name - Name of the Container App Revision to deactivate // - options - ContainerAppsRevisionsClientDeactivateRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.DeactivateRevision // method. func (client *ContainerAppsRevisionsClient) DeactivateRevision(ctx context.Context, resourceGroupName string, containerAppName string, name string, options *ContainerAppsRevisionsClientDeactivateRevisionOptions) (ContainerAppsRevisionsClientDeactivateRevisionResponse, error) { + var err error + const operationName = "ContainerAppsRevisionsClient.DeactivateRevision" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deactivateRevisionCreateRequest(ctx, resourceGroupName, containerAppName, name, options) if err != nil { return ContainerAppsRevisionsClientDeactivateRevisionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ContainerAppsRevisionsClientDeactivateRevisionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsRevisionsClientDeactivateRevisionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ContainerAppsRevisionsClientDeactivateRevisionResponse{}, err } return ContainerAppsRevisionsClientDeactivateRevisionResponse{}, nil } @@ -146,7 +157,7 @@ func (client *ContainerAppsRevisionsClient) deactivateRevisionCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -155,25 +166,32 @@ func (client *ContainerAppsRevisionsClient) deactivateRevisionCreateRequest(ctx // GetRevision - Get a revision of a Container App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - containerAppName - Name of the Container App. // - name - Name of the Container App Revision. // - options - ContainerAppsRevisionsClientGetRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.GetRevision // method. func (client *ContainerAppsRevisionsClient) GetRevision(ctx context.Context, resourceGroupName string, containerAppName string, name string, options *ContainerAppsRevisionsClientGetRevisionOptions) (ContainerAppsRevisionsClientGetRevisionResponse, error) { + var err error + const operationName = "ContainerAppsRevisionsClient.GetRevision" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getRevisionCreateRequest(ctx, resourceGroupName, containerAppName, name, options) if err != nil { return ContainerAppsRevisionsClientGetRevisionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ContainerAppsRevisionsClientGetRevisionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsRevisionsClientGetRevisionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ContainerAppsRevisionsClientGetRevisionResponse{}, err } - return client.getRevisionHandleResponse(resp) + resp, err := client.getRevisionHandleResponse(httpResp) + return resp, err } // getRevisionCreateRequest creates the GetRevision request. @@ -200,7 +218,7 @@ func (client *ContainerAppsRevisionsClient) getRevisionCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -217,7 +235,7 @@ func (client *ContainerAppsRevisionsClient) getRevisionHandleResponse(resp *http // NewListRevisionsPager - Get the Revisions for a given Container App. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - containerAppName - Name of the Container App for which Revisions are needed. // - options - ContainerAppsRevisionsClientListRevisionsOptions contains the optional parameters for the ContainerAppsRevisionsClient.NewListRevisionsPager @@ -228,25 +246,20 @@ func (client *ContainerAppsRevisionsClient) NewListRevisionsPager(resourceGroupN return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ContainerAppsRevisionsClientListRevisionsResponse) (ContainerAppsRevisionsClientListRevisionsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listRevisionsCreateRequest(ctx, resourceGroupName, containerAppName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ContainerAppsRevisionsClientListRevisionsResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ContainerAppsRevisionsClient.NewListRevisionsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listRevisionsCreateRequest(ctx, resourceGroupName, containerAppName, options) + }, nil) if err != nil { return ContainerAppsRevisionsClientListRevisionsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsRevisionsClientListRevisionsResponse{}, runtime.NewResponseError(resp) - } return client.listRevisionsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -270,7 +283,7 @@ func (client *ContainerAppsRevisionsClient) listRevisionsCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -288,23 +301,29 @@ func (client *ContainerAppsRevisionsClient) listRevisionsHandleResponse(resp *ht // RestartRevision - Restarts a revision for a Container App // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - containerAppName - Name of the Container App. // - name - Name of the Container App Revision to restart // - options - ContainerAppsRevisionsClientRestartRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.RestartRevision // method. func (client *ContainerAppsRevisionsClient) RestartRevision(ctx context.Context, resourceGroupName string, containerAppName string, name string, options *ContainerAppsRevisionsClientRestartRevisionOptions) (ContainerAppsRevisionsClientRestartRevisionResponse, error) { + var err error + const operationName = "ContainerAppsRevisionsClient.RestartRevision" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.restartRevisionCreateRequest(ctx, resourceGroupName, containerAppName, name, options) if err != nil { return ContainerAppsRevisionsClientRestartRevisionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ContainerAppsRevisionsClientRestartRevisionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ContainerAppsRevisionsClientRestartRevisionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ContainerAppsRevisionsClientRestartRevisionResponse{}, err } return ContainerAppsRevisionsClientRestartRevisionResponse{}, nil } @@ -333,7 +352,7 @@ func (client *ContainerAppsRevisionsClient) restartRevisionCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/containerappsrevisions_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/containerappsrevisions_client_example_test.go deleted file mode 100644 index efc7e67b4190..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/containerappsrevisions_client_example_test.go +++ /dev/null @@ -1,197 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListRevisions.json -func ExampleContainerAppsRevisionsClient_NewListRevisionsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewContainerAppsRevisionsClient().NewListRevisionsPager("rg", "testcontainerApp0", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.RevisionCollection = armappservice.RevisionCollection{ - // Value: []*armappservice.Revision{ - // { - // Name: to.Ptr("testcontainerApp0-pjxhsye"), - // Type: to.Ptr("Microsoft.Web/containerApps/revisions"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/containerApps/testcontainerApp0/revisions/testcontainerApp0-pjxhsye"), - // Location: to.Ptr("East US"), - // Properties: &armappservice.RevisionProperties{ - // Active: to.Ptr(true), - // CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-24T21:24:22+00:00"); return t}()), - // Fqdn: to.Ptr("testcontainerApp0-pjxhsye.demokube-t24clv0g.eastus.containerapps.k4apps.io"), - // Replicas: to.Ptr[int32](1), - // Template: &armappservice.Template{ - // Containers: []*armappservice.Container{ - // { - // Name: to.Ptr("testcontainerApp0"), - // Image: to.Ptr("repo/testcontainerApp0:v2"), - // Resources: &armappservice.ContainerResources{ - // CPU: to.Ptr[float64](0.2), - // Memory: to.Ptr("100Mi"), - // }, - // }}, - // Dapr: &armappservice.Dapr{ - // AppPort: to.Ptr[int32](3000), - // Enabled: to.Ptr(true), - // }, - // Scale: &armappservice.Scale{ - // MaxReplicas: to.Ptr[int32](5), - // MinReplicas: to.Ptr[int32](1), - // Rules: []*armappservice.ScaleRule{ - // { - // Name: to.Ptr("httpscalingrule"), - // HTTP: &armappservice.HTTPScaleRule{ - // Metadata: map[string]*string{ - // "concurrentRequests": to.Ptr("50"), - // }, - // }, - // }}, - // }, - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetRevision.json -func ExampleContainerAppsRevisionsClient_GetRevision() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewContainerAppsRevisionsClient().GetRevision(ctx, "rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Revision = armappservice.Revision{ - // Name: to.Ptr("testcontainerApp0-pjxhsye"), - // Type: to.Ptr("Microsoft.Web/containerApps/revisions"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.WebcontainerApps/testcontainerApp0/revisions/testcontainerApp0-pjxhsye"), - // Location: to.Ptr("East US"), - // Properties: &armappservice.RevisionProperties{ - // Active: to.Ptr(true), - // CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-24T21:24:22+00:00"); return t}()), - // Fqdn: to.Ptr("testcontainerApp0-pjxhsye.demokube-t24clv0g.eastus.containerApps.k4apps.io"), - // Replicas: to.Ptr[int32](1), - // Template: &armappservice.Template{ - // Containers: []*armappservice.Container{ - // { - // Name: to.Ptr("testcontainerApp0"), - // Image: to.Ptr("repo/testcontainerApp0:v2"), - // Resources: &armappservice.ContainerResources{ - // CPU: to.Ptr[float64](0.2), - // Memory: to.Ptr("100Mi"), - // }, - // }}, - // Dapr: &armappservice.Dapr{ - // AppPort: to.Ptr[int32](3000), - // Enabled: to.Ptr(true), - // }, - // Scale: &armappservice.Scale{ - // MaxReplicas: to.Ptr[int32](5), - // MinReplicas: to.Ptr[int32](1), - // Rules: []*armappservice.ScaleRule{ - // { - // Name: to.Ptr("httpscalingrule"), - // HTTP: &armappservice.HTTPScaleRule{ - // Metadata: map[string]*string{ - // "concurrentRequests": to.Ptr("50"), - // }, - // }, - // }}, - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ActivateRevision.json -func ExampleContainerAppsRevisionsClient_ActivateRevision() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewContainerAppsRevisionsClient().ActivateRevision(ctx, "rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/DeactivateRevision.json -func ExampleContainerAppsRevisionsClient_DeactivateRevision() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewContainerAppsRevisionsClient().DeactivateRevision(ctx, "rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/RestartRevision.json -func ExampleContainerAppsRevisionsClient_RestartRevision() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewContainerAppsRevisionsClient().RestartRevision(ctx, "rg", "testStaticSite0", "testcontainerApp0-pjxhsye", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/appservice/armappservice/deletedwebapps_client.go b/sdk/resourcemanager/appservice/armappservice/deletedwebapps_client.go index b334973c5e81..6a2864f1b57e 100644 --- a/sdk/resourcemanager/appservice/armappservice/deletedwebapps_client.go +++ b/sdk/resourcemanager/appservice/armappservice/deletedwebapps_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappservice @@ -33,7 +32,7 @@ type DeletedWebAppsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDeletedWebAppsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DeletedWebAppsClient, error) { - cl, err := arm.NewClient(moduleName+".DeletedWebAppsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,23 +46,30 @@ func NewDeletedWebAppsClient(subscriptionID string, credential azcore.TokenCrede // GetDeletedWebAppByLocation - Description for Get deleted app for a subscription at location. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - deletedSiteID - The numeric ID of the deleted app, e.g. 12345 // - options - DeletedWebAppsClientGetDeletedWebAppByLocationOptions contains the optional parameters for the DeletedWebAppsClient.GetDeletedWebAppByLocation // method. func (client *DeletedWebAppsClient) GetDeletedWebAppByLocation(ctx context.Context, location string, deletedSiteID string, options *DeletedWebAppsClientGetDeletedWebAppByLocationOptions) (DeletedWebAppsClientGetDeletedWebAppByLocationResponse, error) { + var err error + const operationName = "DeletedWebAppsClient.GetDeletedWebAppByLocation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getDeletedWebAppByLocationCreateRequest(ctx, location, deletedSiteID, options) if err != nil { return DeletedWebAppsClientGetDeletedWebAppByLocationResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DeletedWebAppsClientGetDeletedWebAppByLocationResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DeletedWebAppsClientGetDeletedWebAppByLocationResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DeletedWebAppsClientGetDeletedWebAppByLocationResponse{}, err } - return client.getDeletedWebAppByLocationHandleResponse(resp) + resp, err := client.getDeletedWebAppByLocationHandleResponse(httpResp) + return resp, err } // getDeletedWebAppByLocationCreateRequest creates the GetDeletedWebAppByLocation request. @@ -86,7 +92,7 @@ func (client *DeletedWebAppsClient) getDeletedWebAppByLocationCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -103,7 +109,7 @@ func (client *DeletedWebAppsClient) getDeletedWebAppByLocationHandleResponse(res // NewListPager - Description for Get all deleted apps for a subscription. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - options - DeletedWebAppsClientListOptions contains the optional parameters for the DeletedWebAppsClient.NewListPager method. func (client *DeletedWebAppsClient) NewListPager(options *DeletedWebAppsClientListOptions) *runtime.Pager[DeletedWebAppsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[DeletedWebAppsClientListResponse]{ @@ -111,25 +117,20 @@ func (client *DeletedWebAppsClient) NewListPager(options *DeletedWebAppsClientLi return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *DeletedWebAppsClientListResponse) (DeletedWebAppsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DeletedWebAppsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return DeletedWebAppsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DeletedWebAppsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DeletedWebAppsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -145,7 +146,7 @@ func (client *DeletedWebAppsClient) listCreateRequest(ctx context.Context, optio return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -162,7 +163,7 @@ func (client *DeletedWebAppsClient) listHandleResponse(resp *http.Response) (Del // NewListByLocationPager - Description for Get all deleted apps for a subscription at location // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - options - DeletedWebAppsClientListByLocationOptions contains the optional parameters for the DeletedWebAppsClient.NewListByLocationPager // method. func (client *DeletedWebAppsClient) NewListByLocationPager(location string, options *DeletedWebAppsClientListByLocationOptions) *runtime.Pager[DeletedWebAppsClientListByLocationResponse] { @@ -171,25 +172,20 @@ func (client *DeletedWebAppsClient) NewListByLocationPager(location string, opti return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *DeletedWebAppsClientListByLocationResponse) (DeletedWebAppsClientListByLocationResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByLocationCreateRequest(ctx, location, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DeletedWebAppsClient.NewListByLocationPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByLocationCreateRequest(ctx, location, options) + }, nil) if err != nil { return DeletedWebAppsClientListByLocationResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DeletedWebAppsClientListByLocationResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DeletedWebAppsClientListByLocationResponse{}, runtime.NewResponseError(resp) - } return client.listByLocationHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -209,7 +205,7 @@ func (client *DeletedWebAppsClient) listByLocationCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/deletedwebapps_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/deletedwebapps_client_example_test.go deleted file mode 100644 index 47a58f2aafec..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/deletedwebapps_client_example_test.go +++ /dev/null @@ -1,96 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListDeletedWebAppsByLocation.json -func ExampleDeletedWebAppsClient_NewListByLocationPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDeletedWebAppsClient().NewListByLocationPager("West US 2", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DeletedWebAppCollection = armappservice.DeletedWebAppCollection{ - // Value: []*armappservice.DeletedSite{ - // { - // Name: to.Ptr("wussite6"), - // Type: to.Ptr("Microsoft.Web/locations/deletedSites"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg1/providers/Microsoft.Web/locations/West US 2/deletedwebapps/wussite6"), - // Properties: &armappservice.DeletedSiteProperties{ - // DeletedSiteID: to.Ptr[int32](9), - // DeletedSiteName: to.Ptr("wussite6"), - // DeletedTimestamp: to.Ptr("2019-05-09T22:29:05.1337007"), - // GeoRegionName: to.Ptr("West US 2"), - // Kind: to.Ptr("app"), - // ResourceGroup: to.Ptr("rg1"), - // Slot: to.Ptr("Production"), - // Subscription: to.Ptr("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetDeletedWebAppByLocation.json -func ExampleDeletedWebAppsClient_GetDeletedWebAppByLocation() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDeletedWebAppsClient().GetDeletedWebAppByLocation(ctx, "West US 2", "9", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DeletedSite = armappservice.DeletedSite{ - // Name: to.Ptr("wussite6"), - // Type: to.Ptr("Microsoft.Web/locations/deletedSites"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg1/providers/Microsoft.Web/locations/West US 2/deletedwebapps/wussite6"), - // Properties: &armappservice.DeletedSiteProperties{ - // DeletedSiteID: to.Ptr[int32](9), - // DeletedSiteName: to.Ptr("wussite6"), - // DeletedTimestamp: to.Ptr("2019-05-09T22:29:05.1337007"), - // GeoRegionName: to.Ptr("West US 2"), - // Kind: to.Ptr("app"), - // ResourceGroup: to.Ptr("rg1"), - // Slot: to.Ptr("Production"), - // Subscription: to.Ptr("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"), - // }, - // } -} diff --git a/sdk/resourcemanager/appservice/armappservice/diagnostics_client.go b/sdk/resourcemanager/appservice/armappservice/diagnostics_client.go index 36d751b3142d..ba41332e660d 100644 --- a/sdk/resourcemanager/appservice/armappservice/diagnostics_client.go +++ b/sdk/resourcemanager/appservice/armappservice/diagnostics_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappservice @@ -34,7 +33,7 @@ type DiagnosticsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDiagnosticsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DiagnosticsClient, error) { - cl, err := arm.NewClient(moduleName+".DiagnosticsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,7 +47,7 @@ func NewDiagnosticsClient(subscriptionID string, credential azcore.TokenCredenti // ExecuteSiteAnalysis - Description for Execute Analysis // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - siteName - Site Name // - diagnosticCategory - Category Name @@ -56,18 +55,25 @@ func NewDiagnosticsClient(subscriptionID string, credential azcore.TokenCredenti // - options - DiagnosticsClientExecuteSiteAnalysisOptions contains the optional parameters for the DiagnosticsClient.ExecuteSiteAnalysis // method. func (client *DiagnosticsClient) ExecuteSiteAnalysis(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, analysisName string, options *DiagnosticsClientExecuteSiteAnalysisOptions) (DiagnosticsClientExecuteSiteAnalysisResponse, error) { + var err error + const operationName = "DiagnosticsClient.ExecuteSiteAnalysis" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.executeSiteAnalysisCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, analysisName, options) if err != nil { return DiagnosticsClientExecuteSiteAnalysisResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DiagnosticsClientExecuteSiteAnalysisResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientExecuteSiteAnalysisResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DiagnosticsClientExecuteSiteAnalysisResponse{}, err } - return client.executeSiteAnalysisHandleResponse(resp) + resp, err := client.executeSiteAnalysisHandleResponse(httpResp) + return resp, err } // executeSiteAnalysisCreateRequest creates the ExecuteSiteAnalysis request. @@ -107,7 +113,7 @@ func (client *DiagnosticsClient) executeSiteAnalysisCreateRequest(ctx context.Co if options != nil && options.TimeGrain != nil { reqQP.Set("timeGrain", *options.TimeGrain) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -125,7 +131,7 @@ func (client *DiagnosticsClient) executeSiteAnalysisHandleResponse(resp *http.Re // ExecuteSiteAnalysisSlot - Description for Execute Analysis // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - siteName - Site Name // - diagnosticCategory - Category Name @@ -134,18 +140,25 @@ func (client *DiagnosticsClient) executeSiteAnalysisHandleResponse(resp *http.Re // - options - DiagnosticsClientExecuteSiteAnalysisSlotOptions contains the optional parameters for the DiagnosticsClient.ExecuteSiteAnalysisSlot // method. func (client *DiagnosticsClient) ExecuteSiteAnalysisSlot(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, analysisName string, slot string, options *DiagnosticsClientExecuteSiteAnalysisSlotOptions) (DiagnosticsClientExecuteSiteAnalysisSlotResponse, error) { + var err error + const operationName = "DiagnosticsClient.ExecuteSiteAnalysisSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.executeSiteAnalysisSlotCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, analysisName, slot, options) if err != nil { return DiagnosticsClientExecuteSiteAnalysisSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DiagnosticsClientExecuteSiteAnalysisSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientExecuteSiteAnalysisSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DiagnosticsClientExecuteSiteAnalysisSlotResponse{}, err } - return client.executeSiteAnalysisSlotHandleResponse(resp) + resp, err := client.executeSiteAnalysisSlotHandleResponse(httpResp) + return resp, err } // executeSiteAnalysisSlotCreateRequest creates the ExecuteSiteAnalysisSlot request. @@ -189,7 +202,7 @@ func (client *DiagnosticsClient) executeSiteAnalysisSlotCreateRequest(ctx contex if options != nil && options.TimeGrain != nil { reqQP.Set("timeGrain", *options.TimeGrain) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -207,7 +220,7 @@ func (client *DiagnosticsClient) executeSiteAnalysisSlotHandleResponse(resp *htt // ExecuteSiteDetector - Description for Execute Detector // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - siteName - Site Name // - detectorName - Detector Resource Name @@ -215,18 +228,25 @@ func (client *DiagnosticsClient) executeSiteAnalysisSlotHandleResponse(resp *htt // - options - DiagnosticsClientExecuteSiteDetectorOptions contains the optional parameters for the DiagnosticsClient.ExecuteSiteDetector // method. func (client *DiagnosticsClient) ExecuteSiteDetector(ctx context.Context, resourceGroupName string, siteName string, detectorName string, diagnosticCategory string, options *DiagnosticsClientExecuteSiteDetectorOptions) (DiagnosticsClientExecuteSiteDetectorResponse, error) { + var err error + const operationName = "DiagnosticsClient.ExecuteSiteDetector" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.executeSiteDetectorCreateRequest(ctx, resourceGroupName, siteName, detectorName, diagnosticCategory, options) if err != nil { return DiagnosticsClientExecuteSiteDetectorResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DiagnosticsClientExecuteSiteDetectorResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientExecuteSiteDetectorResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DiagnosticsClientExecuteSiteDetectorResponse{}, err } - return client.executeSiteDetectorHandleResponse(resp) + resp, err := client.executeSiteDetectorHandleResponse(httpResp) + return resp, err } // executeSiteDetectorCreateRequest creates the ExecuteSiteDetector request. @@ -266,7 +286,7 @@ func (client *DiagnosticsClient) executeSiteDetectorCreateRequest(ctx context.Co if options != nil && options.TimeGrain != nil { reqQP.Set("timeGrain", *options.TimeGrain) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -284,7 +304,7 @@ func (client *DiagnosticsClient) executeSiteDetectorHandleResponse(resp *http.Re // ExecuteSiteDetectorSlot - Description for Execute Detector // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - siteName - Site Name // - detectorName - Detector Resource Name @@ -293,18 +313,25 @@ func (client *DiagnosticsClient) executeSiteDetectorHandleResponse(resp *http.Re // - options - DiagnosticsClientExecuteSiteDetectorSlotOptions contains the optional parameters for the DiagnosticsClient.ExecuteSiteDetectorSlot // method. func (client *DiagnosticsClient) ExecuteSiteDetectorSlot(ctx context.Context, resourceGroupName string, siteName string, detectorName string, diagnosticCategory string, slot string, options *DiagnosticsClientExecuteSiteDetectorSlotOptions) (DiagnosticsClientExecuteSiteDetectorSlotResponse, error) { + var err error + const operationName = "DiagnosticsClient.ExecuteSiteDetectorSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.executeSiteDetectorSlotCreateRequest(ctx, resourceGroupName, siteName, detectorName, diagnosticCategory, slot, options) if err != nil { return DiagnosticsClientExecuteSiteDetectorSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DiagnosticsClientExecuteSiteDetectorSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientExecuteSiteDetectorSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DiagnosticsClientExecuteSiteDetectorSlotResponse{}, err } - return client.executeSiteDetectorSlotHandleResponse(resp) + resp, err := client.executeSiteDetectorSlotHandleResponse(httpResp) + return resp, err } // executeSiteDetectorSlotCreateRequest creates the ExecuteSiteDetectorSlot request. @@ -348,7 +375,7 @@ func (client *DiagnosticsClient) executeSiteDetectorSlotCreateRequest(ctx contex if options != nil && options.TimeGrain != nil { reqQP.Set("timeGrain", *options.TimeGrain) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -366,25 +393,32 @@ func (client *DiagnosticsClient) executeSiteDetectorSlotHandleResponse(resp *htt // GetHostingEnvironmentDetectorResponse - Description for Get Hosting Environment Detector Response // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - App Service Environment Name // - detectorName - Detector Resource Name // - options - DiagnosticsClientGetHostingEnvironmentDetectorResponseOptions contains the optional parameters for the DiagnosticsClient.GetHostingEnvironmentDetectorResponse // method. func (client *DiagnosticsClient) GetHostingEnvironmentDetectorResponse(ctx context.Context, resourceGroupName string, name string, detectorName string, options *DiagnosticsClientGetHostingEnvironmentDetectorResponseOptions) (DiagnosticsClientGetHostingEnvironmentDetectorResponseResponse, error) { + var err error + const operationName = "DiagnosticsClient.GetHostingEnvironmentDetectorResponse" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getHostingEnvironmentDetectorResponseCreateRequest(ctx, resourceGroupName, name, detectorName, options) if err != nil { return DiagnosticsClientGetHostingEnvironmentDetectorResponseResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DiagnosticsClientGetHostingEnvironmentDetectorResponseResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientGetHostingEnvironmentDetectorResponseResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DiagnosticsClientGetHostingEnvironmentDetectorResponseResponse{}, err } - return client.getHostingEnvironmentDetectorResponseHandleResponse(resp) + resp, err := client.getHostingEnvironmentDetectorResponseHandleResponse(httpResp) + return resp, err } // getHostingEnvironmentDetectorResponseCreateRequest creates the GetHostingEnvironmentDetectorResponse request. @@ -420,7 +454,7 @@ func (client *DiagnosticsClient) getHostingEnvironmentDetectorResponseCreateRequ if options != nil && options.TimeGrain != nil { reqQP.Set("timeGrain", *options.TimeGrain) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -438,7 +472,7 @@ func (client *DiagnosticsClient) getHostingEnvironmentDetectorResponseHandleResp // GetSiteAnalysis - Description for Get Site Analysis // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - siteName - Site Name // - diagnosticCategory - Diagnostic Category @@ -446,18 +480,25 @@ func (client *DiagnosticsClient) getHostingEnvironmentDetectorResponseHandleResp // - options - DiagnosticsClientGetSiteAnalysisOptions contains the optional parameters for the DiagnosticsClient.GetSiteAnalysis // method. func (client *DiagnosticsClient) GetSiteAnalysis(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, analysisName string, options *DiagnosticsClientGetSiteAnalysisOptions) (DiagnosticsClientGetSiteAnalysisResponse, error) { + var err error + const operationName = "DiagnosticsClient.GetSiteAnalysis" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getSiteAnalysisCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, analysisName, options) if err != nil { return DiagnosticsClientGetSiteAnalysisResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DiagnosticsClientGetSiteAnalysisResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientGetSiteAnalysisResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DiagnosticsClientGetSiteAnalysisResponse{}, err } - return client.getSiteAnalysisHandleResponse(resp) + resp, err := client.getSiteAnalysisHandleResponse(httpResp) + return resp, err } // getSiteAnalysisCreateRequest creates the GetSiteAnalysis request. @@ -488,7 +529,7 @@ func (client *DiagnosticsClient) getSiteAnalysisCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -506,7 +547,7 @@ func (client *DiagnosticsClient) getSiteAnalysisHandleResponse(resp *http.Respon // GetSiteAnalysisSlot - Description for Get Site Analysis // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - siteName - Site Name // - diagnosticCategory - Diagnostic Category @@ -515,18 +556,25 @@ func (client *DiagnosticsClient) getSiteAnalysisHandleResponse(resp *http.Respon // - options - DiagnosticsClientGetSiteAnalysisSlotOptions contains the optional parameters for the DiagnosticsClient.GetSiteAnalysisSlot // method. func (client *DiagnosticsClient) GetSiteAnalysisSlot(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, analysisName string, slot string, options *DiagnosticsClientGetSiteAnalysisSlotOptions) (DiagnosticsClientGetSiteAnalysisSlotResponse, error) { + var err error + const operationName = "DiagnosticsClient.GetSiteAnalysisSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getSiteAnalysisSlotCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, analysisName, slot, options) if err != nil { return DiagnosticsClientGetSiteAnalysisSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DiagnosticsClientGetSiteAnalysisSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientGetSiteAnalysisSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DiagnosticsClientGetSiteAnalysisSlotResponse{}, err } - return client.getSiteAnalysisSlotHandleResponse(resp) + resp, err := client.getSiteAnalysisSlotHandleResponse(httpResp) + return resp, err } // getSiteAnalysisSlotCreateRequest creates the GetSiteAnalysisSlot request. @@ -561,7 +609,7 @@ func (client *DiagnosticsClient) getSiteAnalysisSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -579,7 +627,7 @@ func (client *DiagnosticsClient) getSiteAnalysisSlotHandleResponse(resp *http.Re // GetSiteDetector - Description for Get Detector // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - siteName - Site Name // - diagnosticCategory - Diagnostic Category @@ -587,18 +635,25 @@ func (client *DiagnosticsClient) getSiteAnalysisSlotHandleResponse(resp *http.Re // - options - DiagnosticsClientGetSiteDetectorOptions contains the optional parameters for the DiagnosticsClient.GetSiteDetector // method. func (client *DiagnosticsClient) GetSiteDetector(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, detectorName string, options *DiagnosticsClientGetSiteDetectorOptions) (DiagnosticsClientGetSiteDetectorResponse, error) { + var err error + const operationName = "DiagnosticsClient.GetSiteDetector" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getSiteDetectorCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, detectorName, options) if err != nil { return DiagnosticsClientGetSiteDetectorResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DiagnosticsClientGetSiteDetectorResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientGetSiteDetectorResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DiagnosticsClientGetSiteDetectorResponse{}, err } - return client.getSiteDetectorHandleResponse(resp) + resp, err := client.getSiteDetectorHandleResponse(httpResp) + return resp, err } // getSiteDetectorCreateRequest creates the GetSiteDetector request. @@ -629,7 +684,7 @@ func (client *DiagnosticsClient) getSiteDetectorCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -647,25 +702,32 @@ func (client *DiagnosticsClient) getSiteDetectorHandleResponse(resp *http.Respon // GetSiteDetectorResponse - Description for Get site detector response // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - siteName - Site Name // - detectorName - Detector Resource Name // - options - DiagnosticsClientGetSiteDetectorResponseOptions contains the optional parameters for the DiagnosticsClient.GetSiteDetectorResponse // method. func (client *DiagnosticsClient) GetSiteDetectorResponse(ctx context.Context, resourceGroupName string, siteName string, detectorName string, options *DiagnosticsClientGetSiteDetectorResponseOptions) (DiagnosticsClientGetSiteDetectorResponseResponse, error) { + var err error + const operationName = "DiagnosticsClient.GetSiteDetectorResponse" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getSiteDetectorResponseCreateRequest(ctx, resourceGroupName, siteName, detectorName, options) if err != nil { return DiagnosticsClientGetSiteDetectorResponseResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DiagnosticsClientGetSiteDetectorResponseResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientGetSiteDetectorResponseResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DiagnosticsClientGetSiteDetectorResponseResponse{}, err } - return client.getSiteDetectorResponseHandleResponse(resp) + resp, err := client.getSiteDetectorResponseHandleResponse(httpResp) + return resp, err } // getSiteDetectorResponseCreateRequest creates the GetSiteDetectorResponse request. @@ -701,7 +763,7 @@ func (client *DiagnosticsClient) getSiteDetectorResponseCreateRequest(ctx contex if options != nil && options.TimeGrain != nil { reqQP.Set("timeGrain", *options.TimeGrain) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -719,7 +781,7 @@ func (client *DiagnosticsClient) getSiteDetectorResponseHandleResponse(resp *htt // GetSiteDetectorResponseSlot - Description for Get site detector response // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - siteName - Site Name // - detectorName - Detector Resource Name @@ -727,18 +789,25 @@ func (client *DiagnosticsClient) getSiteDetectorResponseHandleResponse(resp *htt // - options - DiagnosticsClientGetSiteDetectorResponseSlotOptions contains the optional parameters for the DiagnosticsClient.GetSiteDetectorResponseSlot // method. func (client *DiagnosticsClient) GetSiteDetectorResponseSlot(ctx context.Context, resourceGroupName string, siteName string, detectorName string, slot string, options *DiagnosticsClientGetSiteDetectorResponseSlotOptions) (DiagnosticsClientGetSiteDetectorResponseSlotResponse, error) { + var err error + const operationName = "DiagnosticsClient.GetSiteDetectorResponseSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getSiteDetectorResponseSlotCreateRequest(ctx, resourceGroupName, siteName, detectorName, slot, options) if err != nil { return DiagnosticsClientGetSiteDetectorResponseSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DiagnosticsClientGetSiteDetectorResponseSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientGetSiteDetectorResponseSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DiagnosticsClientGetSiteDetectorResponseSlotResponse{}, err } - return client.getSiteDetectorResponseSlotHandleResponse(resp) + resp, err := client.getSiteDetectorResponseSlotHandleResponse(httpResp) + return resp, err } // getSiteDetectorResponseSlotCreateRequest creates the GetSiteDetectorResponseSlot request. @@ -778,7 +847,7 @@ func (client *DiagnosticsClient) getSiteDetectorResponseSlotCreateRequest(ctx co if options != nil && options.TimeGrain != nil { reqQP.Set("timeGrain", *options.TimeGrain) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -796,7 +865,7 @@ func (client *DiagnosticsClient) getSiteDetectorResponseSlotHandleResponse(resp // GetSiteDetectorSlot - Description for Get Detector // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - siteName - Site Name // - diagnosticCategory - Diagnostic Category @@ -805,18 +874,25 @@ func (client *DiagnosticsClient) getSiteDetectorResponseSlotHandleResponse(resp // - options - DiagnosticsClientGetSiteDetectorSlotOptions contains the optional parameters for the DiagnosticsClient.GetSiteDetectorSlot // method. func (client *DiagnosticsClient) GetSiteDetectorSlot(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, detectorName string, slot string, options *DiagnosticsClientGetSiteDetectorSlotOptions) (DiagnosticsClientGetSiteDetectorSlotResponse, error) { + var err error + const operationName = "DiagnosticsClient.GetSiteDetectorSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getSiteDetectorSlotCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, detectorName, slot, options) if err != nil { return DiagnosticsClientGetSiteDetectorSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DiagnosticsClientGetSiteDetectorSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientGetSiteDetectorSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DiagnosticsClientGetSiteDetectorSlotResponse{}, err } - return client.getSiteDetectorSlotHandleResponse(resp) + resp, err := client.getSiteDetectorSlotHandleResponse(httpResp) + return resp, err } // getSiteDetectorSlotCreateRequest creates the GetSiteDetectorSlot request. @@ -851,7 +927,7 @@ func (client *DiagnosticsClient) getSiteDetectorSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -869,25 +945,32 @@ func (client *DiagnosticsClient) getSiteDetectorSlotHandleResponse(resp *http.Re // GetSiteDiagnosticCategory - Description for Get Diagnostics Category // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - siteName - Site Name // - diagnosticCategory - Diagnostic Category // - options - DiagnosticsClientGetSiteDiagnosticCategoryOptions contains the optional parameters for the DiagnosticsClient.GetSiteDiagnosticCategory // method. func (client *DiagnosticsClient) GetSiteDiagnosticCategory(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, options *DiagnosticsClientGetSiteDiagnosticCategoryOptions) (DiagnosticsClientGetSiteDiagnosticCategoryResponse, error) { + var err error + const operationName = "DiagnosticsClient.GetSiteDiagnosticCategory" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getSiteDiagnosticCategoryCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, options) if err != nil { return DiagnosticsClientGetSiteDiagnosticCategoryResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DiagnosticsClientGetSiteDiagnosticCategoryResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientGetSiteDiagnosticCategoryResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DiagnosticsClientGetSiteDiagnosticCategoryResponse{}, err } - return client.getSiteDiagnosticCategoryHandleResponse(resp) + resp, err := client.getSiteDiagnosticCategoryHandleResponse(httpResp) + return resp, err } // getSiteDiagnosticCategoryCreateRequest creates the GetSiteDiagnosticCategory request. @@ -914,7 +997,7 @@ func (client *DiagnosticsClient) getSiteDiagnosticCategoryCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -932,7 +1015,7 @@ func (client *DiagnosticsClient) getSiteDiagnosticCategoryHandleResponse(resp *h // GetSiteDiagnosticCategorySlot - Description for Get Diagnostics Category // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - siteName - Site Name // - diagnosticCategory - Diagnostic Category @@ -940,18 +1023,25 @@ func (client *DiagnosticsClient) getSiteDiagnosticCategoryHandleResponse(resp *h // - options - DiagnosticsClientGetSiteDiagnosticCategorySlotOptions contains the optional parameters for the DiagnosticsClient.GetSiteDiagnosticCategorySlot // method. func (client *DiagnosticsClient) GetSiteDiagnosticCategorySlot(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, slot string, options *DiagnosticsClientGetSiteDiagnosticCategorySlotOptions) (DiagnosticsClientGetSiteDiagnosticCategorySlotResponse, error) { + var err error + const operationName = "DiagnosticsClient.GetSiteDiagnosticCategorySlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getSiteDiagnosticCategorySlotCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, slot, options) if err != nil { return DiagnosticsClientGetSiteDiagnosticCategorySlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DiagnosticsClientGetSiteDiagnosticCategorySlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientGetSiteDiagnosticCategorySlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DiagnosticsClientGetSiteDiagnosticCategorySlotResponse{}, err } - return client.getSiteDiagnosticCategorySlotHandleResponse(resp) + resp, err := client.getSiteDiagnosticCategorySlotHandleResponse(httpResp) + return resp, err } // getSiteDiagnosticCategorySlotCreateRequest creates the GetSiteDiagnosticCategorySlot request. @@ -982,7 +1072,7 @@ func (client *DiagnosticsClient) getSiteDiagnosticCategorySlotCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -999,7 +1089,7 @@ func (client *DiagnosticsClient) getSiteDiagnosticCategorySlotHandleResponse(res // NewListHostingEnvironmentDetectorResponsesPager - Description for List Hosting Environment Detector Responses // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site Name // - options - DiagnosticsClientListHostingEnvironmentDetectorResponsesOptions contains the optional parameters for the DiagnosticsClient.NewListHostingEnvironmentDetectorResponsesPager @@ -1010,25 +1100,20 @@ func (client *DiagnosticsClient) NewListHostingEnvironmentDetectorResponsesPager return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse) (DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listHostingEnvironmentDetectorResponsesCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DiagnosticsClient.NewListHostingEnvironmentDetectorResponsesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listHostingEnvironmentDetectorResponsesCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse{}, runtime.NewResponseError(resp) - } return client.listHostingEnvironmentDetectorResponsesHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -1052,7 +1137,7 @@ func (client *DiagnosticsClient) listHostingEnvironmentDetectorResponsesCreateRe return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1069,7 +1154,7 @@ func (client *DiagnosticsClient) listHostingEnvironmentDetectorResponsesHandleRe // NewListSiteAnalysesPager - Description for Get Site Analyses // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - siteName - Site Name // - diagnosticCategory - Diagnostic Category @@ -1081,25 +1166,20 @@ func (client *DiagnosticsClient) NewListSiteAnalysesPager(resourceGroupName stri return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *DiagnosticsClientListSiteAnalysesResponse) (DiagnosticsClientListSiteAnalysesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSiteAnalysesCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DiagnosticsClientListSiteAnalysesResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DiagnosticsClient.NewListSiteAnalysesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSiteAnalysesCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, options) + }, nil) if err != nil { return DiagnosticsClientListSiteAnalysesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientListSiteAnalysesResponse{}, runtime.NewResponseError(resp) - } return client.listSiteAnalysesHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -1127,7 +1207,7 @@ func (client *DiagnosticsClient) listSiteAnalysesCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1144,7 +1224,7 @@ func (client *DiagnosticsClient) listSiteAnalysesHandleResponse(resp *http.Respo // NewListSiteAnalysesSlotPager - Description for Get Site Analyses // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - siteName - Site Name // - diagnosticCategory - Diagnostic Category @@ -1157,25 +1237,20 @@ func (client *DiagnosticsClient) NewListSiteAnalysesSlotPager(resourceGroupName return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *DiagnosticsClientListSiteAnalysesSlotResponse) (DiagnosticsClientListSiteAnalysesSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSiteAnalysesSlotCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DiagnosticsClientListSiteAnalysesSlotResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DiagnosticsClient.NewListSiteAnalysesSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSiteAnalysesSlotCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, slot, options) + }, nil) if err != nil { return DiagnosticsClientListSiteAnalysesSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientListSiteAnalysesSlotResponse{}, runtime.NewResponseError(resp) - } return client.listSiteAnalysesSlotHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -1207,7 +1282,7 @@ func (client *DiagnosticsClient) listSiteAnalysesSlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1224,7 +1299,7 @@ func (client *DiagnosticsClient) listSiteAnalysesSlotHandleResponse(resp *http.R // NewListSiteDetectorResponsesPager - Description for List Site Detector Responses // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - siteName - Site Name // - options - DiagnosticsClientListSiteDetectorResponsesOptions contains the optional parameters for the DiagnosticsClient.NewListSiteDetectorResponsesPager @@ -1235,25 +1310,20 @@ func (client *DiagnosticsClient) NewListSiteDetectorResponsesPager(resourceGroup return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *DiagnosticsClientListSiteDetectorResponsesResponse) (DiagnosticsClientListSiteDetectorResponsesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSiteDetectorResponsesCreateRequest(ctx, resourceGroupName, siteName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DiagnosticsClient.NewListSiteDetectorResponsesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSiteDetectorResponsesCreateRequest(ctx, resourceGroupName, siteName, options) + }, nil) if err != nil { return DiagnosticsClientListSiteDetectorResponsesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DiagnosticsClientListSiteDetectorResponsesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientListSiteDetectorResponsesResponse{}, runtime.NewResponseError(resp) - } return client.listSiteDetectorResponsesHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -1277,7 +1347,7 @@ func (client *DiagnosticsClient) listSiteDetectorResponsesCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1294,7 +1364,7 @@ func (client *DiagnosticsClient) listSiteDetectorResponsesHandleResponse(resp *h // NewListSiteDetectorResponsesSlotPager - Description for List Site Detector Responses // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - siteName - Site Name // - slot - Slot Name @@ -1306,25 +1376,20 @@ func (client *DiagnosticsClient) NewListSiteDetectorResponsesSlotPager(resourceG return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *DiagnosticsClientListSiteDetectorResponsesSlotResponse) (DiagnosticsClientListSiteDetectorResponsesSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSiteDetectorResponsesSlotCreateRequest(ctx, resourceGroupName, siteName, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DiagnosticsClientListSiteDetectorResponsesSlotResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DiagnosticsClient.NewListSiteDetectorResponsesSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSiteDetectorResponsesSlotCreateRequest(ctx, resourceGroupName, siteName, slot, options) + }, nil) if err != nil { return DiagnosticsClientListSiteDetectorResponsesSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientListSiteDetectorResponsesSlotResponse{}, runtime.NewResponseError(resp) - } return client.listSiteDetectorResponsesSlotHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -1352,7 +1417,7 @@ func (client *DiagnosticsClient) listSiteDetectorResponsesSlotCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1369,7 +1434,7 @@ func (client *DiagnosticsClient) listSiteDetectorResponsesSlotHandleResponse(res // NewListSiteDetectorsPager - Description for Get Detectors // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - siteName - Site Name // - diagnosticCategory - Diagnostic Category @@ -1381,25 +1446,20 @@ func (client *DiagnosticsClient) NewListSiteDetectorsPager(resourceGroupName str return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *DiagnosticsClientListSiteDetectorsResponse) (DiagnosticsClientListSiteDetectorsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSiteDetectorsCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DiagnosticsClientListSiteDetectorsResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DiagnosticsClient.NewListSiteDetectorsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSiteDetectorsCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, options) + }, nil) if err != nil { return DiagnosticsClientListSiteDetectorsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientListSiteDetectorsResponse{}, runtime.NewResponseError(resp) - } return client.listSiteDetectorsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -1427,7 +1487,7 @@ func (client *DiagnosticsClient) listSiteDetectorsCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1444,7 +1504,7 @@ func (client *DiagnosticsClient) listSiteDetectorsHandleResponse(resp *http.Resp // NewListSiteDetectorsSlotPager - Description for Get Detectors // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - siteName - Site Name // - diagnosticCategory - Diagnostic Category @@ -1457,25 +1517,20 @@ func (client *DiagnosticsClient) NewListSiteDetectorsSlotPager(resourceGroupName return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *DiagnosticsClientListSiteDetectorsSlotResponse) (DiagnosticsClientListSiteDetectorsSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSiteDetectorsSlotCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DiagnosticsClient.NewListSiteDetectorsSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSiteDetectorsSlotCreateRequest(ctx, resourceGroupName, siteName, diagnosticCategory, slot, options) + }, nil) if err != nil { return DiagnosticsClientListSiteDetectorsSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DiagnosticsClientListSiteDetectorsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientListSiteDetectorsSlotResponse{}, runtime.NewResponseError(resp) - } return client.listSiteDetectorsSlotHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -1507,7 +1562,7 @@ func (client *DiagnosticsClient) listSiteDetectorsSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1524,7 +1579,7 @@ func (client *DiagnosticsClient) listSiteDetectorsSlotHandleResponse(resp *http. // NewListSiteDiagnosticCategoriesPager - Description for Get Diagnostics Categories // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - siteName - Site Name // - options - DiagnosticsClientListSiteDiagnosticCategoriesOptions contains the optional parameters for the DiagnosticsClient.NewListSiteDiagnosticCategoriesPager @@ -1535,25 +1590,20 @@ func (client *DiagnosticsClient) NewListSiteDiagnosticCategoriesPager(resourceGr return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *DiagnosticsClientListSiteDiagnosticCategoriesResponse) (DiagnosticsClientListSiteDiagnosticCategoriesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSiteDiagnosticCategoriesCreateRequest(ctx, resourceGroupName, siteName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DiagnosticsClientListSiteDiagnosticCategoriesResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DiagnosticsClient.NewListSiteDiagnosticCategoriesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSiteDiagnosticCategoriesCreateRequest(ctx, resourceGroupName, siteName, options) + }, nil) if err != nil { return DiagnosticsClientListSiteDiagnosticCategoriesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientListSiteDiagnosticCategoriesResponse{}, runtime.NewResponseError(resp) - } return client.listSiteDiagnosticCategoriesHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -1577,7 +1627,7 @@ func (client *DiagnosticsClient) listSiteDiagnosticCategoriesCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1594,7 +1644,7 @@ func (client *DiagnosticsClient) listSiteDiagnosticCategoriesHandleResponse(resp // NewListSiteDiagnosticCategoriesSlotPager - Description for Get Diagnostics Categories // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - siteName - Site Name // - slot - Slot Name @@ -1606,25 +1656,20 @@ func (client *DiagnosticsClient) NewListSiteDiagnosticCategoriesSlotPager(resour return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse) (DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSiteDiagnosticCategoriesSlotCreateRequest(ctx, resourceGroupName, siteName, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DiagnosticsClient.NewListSiteDiagnosticCategoriesSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSiteDiagnosticCategoriesSlotCreateRequest(ctx, resourceGroupName, siteName, slot, options) + }, nil) if err != nil { return DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse{}, runtime.NewResponseError(resp) - } return client.listSiteDiagnosticCategoriesSlotHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -1652,7 +1697,7 @@ func (client *DiagnosticsClient) listSiteDiagnosticCategoriesSlotCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/diagnostics_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/diagnostics_client_example_test.go deleted file mode 100644 index 2fde647b2773..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/diagnostics_client_example_test.go +++ /dev/null @@ -1,1474 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/Diagnostics_ListHostingEnvironmentDetectorResponses.json -func ExampleDiagnosticsClient_NewListHostingEnvironmentDetectorResponsesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDiagnosticsClient().NewListHostingEnvironmentDetectorResponsesPager("Sample-WestUSResourceGroup", "SampleAppServiceEnvironment", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DetectorResponseCollection = armappservice.DetectorResponseCollection{ - // Value: []*armappservice.DetectorResponse{ - // { - // Name: to.Ptr("runtimeavailability"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/Sample-WestUSResourceGroup/providers/Microsoft.Web/hostingEnvironments/SampleAppServiceEnvironment/detectors/runtimeavailability"), - // Properties: &armappservice.DetectorResponseProperties{ - // Dataset: []*armappservice.DiagnosticData{ - // }, - // Metadata: &armappservice.DetectorInfo{ - // Description: to.Ptr("This detector analyzes all the requests to all applications running on this app service environment."), - // Category: to.Ptr("Availability and Performance"), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/Diagnostics_GetHostingEnvironmentDetectorResponse.json -func ExampleDiagnosticsClient_GetHostingEnvironmentDetectorResponse() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDiagnosticsClient().GetHostingEnvironmentDetectorResponse(ctx, "Sample-WestUSResourceGroup", "SampleAppServiceEnvironment", "runtimeavailability", &armappservice.DiagnosticsClientGetHostingEnvironmentDetectorResponseOptions{StartTime: nil, - EndTime: nil, - TimeGrain: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DetectorResponse = armappservice.DetectorResponse{ - // Name: to.Ptr("runtimeavailability"), - // ID: to.Ptr("/subscriptions/ef90e930-9d7f-4a60-8a99-748e0eea69de/resourceGroups/Build2015DemoRG/providers/Microsoft.Web/hostingEnvironments/SampleAppServiceEnvironment/detectors/runtimeavailability"), - // Properties: &armappservice.DetectorResponseProperties{ - // Dataset: []*armappservice.DiagnosticData{ - // { - // RenderingProperties: &armappservice.Rendering{ - // Description: to.Ptr("This detector breaks down the number of requests that your apps on this app service environment received for each status code."), - // Title: to.Ptr("Requests by Status Code"), - // }, - // Table: &armappservice.DataTableResponseObject{ - // Columns: []*armappservice.DataTableResponseColumn{ - // { - // ColumnName: to.Ptr("PreciseTimeStamp"), - // ColumnType: to.Ptr("datetime"), - // DataType: to.Ptr("DateTime"), - // }, - // { - // ColumnName: to.Ptr("count_Http2xx"), - // ColumnType: to.Ptr("long"), - // DataType: to.Ptr("Int64"), - // }, - // { - // ColumnName: to.Ptr("count_Http3xx"), - // ColumnType: to.Ptr("long"), - // DataType: to.Ptr("Int64"), - // }, - // { - // ColumnName: to.Ptr("count_Http4xx"), - // ColumnType: to.Ptr("long"), - // DataType: to.Ptr("Int64"), - // }, - // { - // ColumnName: to.Ptr("count_Http5xx"), - // ColumnType: to.Ptr("long"), - // DataType: to.Ptr("Int64"), - // }}, - // Rows: [][]*string{ - // []*string{ - // to.Ptr("2018-03-27T00:25:00Z"), - // to.Ptr("772705"), - // to.Ptr("0"), - // to.Ptr("0"), - // to.Ptr("0")}, - // []*string{ - // to.Ptr("2018-03-27T00:30:00Z"), - // to.Ptr("787069"), - // to.Ptr("0"), - // to.Ptr("0"), - // to.Ptr("0")}, - // []*string{ - // to.Ptr("2018-03-27T00:35:00Z"), - // to.Ptr("781627"), - // to.Ptr("0"), - // to.Ptr("1"), - // to.Ptr("0")}, - // []*string{ - // to.Ptr("2018-03-27T00:40:00Z"), - // to.Ptr("785017"), - // to.Ptr("0"), - // to.Ptr("0"), - // to.Ptr("0")}, - // []*string{ - // to.Ptr("2018-03-27T00:45:00Z"), - // to.Ptr("783518"), - // to.Ptr("0"), - // to.Ptr("0"), - // to.Ptr("0")}, - // []*string{ - // to.Ptr("2018-03-27T00:50:00Z"), - // to.Ptr("785783"), - // to.Ptr("0"), - // to.Ptr("0"), - // to.Ptr("0")}, - // []*string{ - // to.Ptr("2018-03-27T00:55:00Z"), - // to.Ptr("772874"), - // to.Ptr("0"), - // to.Ptr("0"), - // to.Ptr("0")}, - // []*string{ - // to.Ptr("2018-03-27T01:00:00Z"), - // to.Ptr("787162"), - // to.Ptr("0"), - // to.Ptr("0"), - // to.Ptr("0")}, - // []*string{ - // to.Ptr("2018-03-27T01:05:00Z"), - // to.Ptr("782036"), - // to.Ptr("0"), - // to.Ptr("0"), - // to.Ptr("0")}, - // []*string{ - // to.Ptr("2018-03-27T01:10:00Z"), - // to.Ptr("784642"), - // to.Ptr("0"), - // to.Ptr("0"), - // to.Ptr("0")}}, - // TableName: to.Ptr("Table_0"), - // }, - // }}, - // Metadata: &armappservice.DetectorInfo{ - // Description: to.Ptr("This detector analyzes all the requests to all applications running on this app service environment."), - // Category: to.Ptr("Availability and Performance"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/Diagnostics_ListSiteDetectorResponses.json -func ExampleDiagnosticsClient_NewListSiteDetectorResponsesPager_getAppDetectorResponses() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDiagnosticsClient().NewListSiteDetectorResponsesPager("Sample-WestUSResourceGroup", "SampleApp", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DetectorResponseCollection = armappservice.DetectorResponseCollection{ - // Value: []*armappservice.DetectorResponse{ - // { - // Name: to.Ptr("runtimeavailability"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/Sample-WestUSResourceGroup/providers/Microsoft.Web/sites/SampleApp/detectors/runtimeavailability"), - // Properties: &armappservice.DetectorResponseProperties{ - // Dataset: []*armappservice.DiagnosticData{ - // }, - // Metadata: &armappservice.DetectorInfo{ - // Description: to.Ptr("This detector analyzes the requests to your application."), - // Category: to.Ptr("Availability and Performance"), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/Diagnostics_ListSiteDetectorResponsesSlot.json -func ExampleDiagnosticsClient_NewListSiteDetectorResponsesPager_getAppSlotDetectorResponses() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDiagnosticsClient().NewListSiteDetectorResponsesPager("Sample-WestUSResourceGroup", "SampleApp", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DetectorResponseCollection = armappservice.DetectorResponseCollection{ - // Value: []*armappservice.DetectorResponse{ - // { - // Name: to.Ptr("runtimeavailability"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/Sample-WestUSResourceGroup/providers/Microsoft.Web/sites/SampleApp/slots/staging/detectors/runtimeavailability"), - // Properties: &armappservice.DetectorResponseProperties{ - // Dataset: []*armappservice.DiagnosticData{ - // }, - // Metadata: &armappservice.DetectorInfo{ - // Description: to.Ptr("This detector analyzes the requests to your application."), - // Category: to.Ptr("Availability and Performance"), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/Diagnostics_GetSiteDetectorResponse.json -func ExampleDiagnosticsClient_GetSiteDetectorResponse_getAppDetectorResponse() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDiagnosticsClient().GetSiteDetectorResponse(ctx, "Sample-WestUSResourceGroup", "SampleApp", "runtimeavailability", &armappservice.DiagnosticsClientGetSiteDetectorResponseOptions{StartTime: nil, - EndTime: nil, - TimeGrain: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DetectorResponse = armappservice.DetectorResponse{ - // Name: to.Ptr("runtimeavailability"), - // ID: to.Ptr("/subscriptions/ef90e930-9d7f-4a60-8a99-748e0eea69de/resourceGroups/Build2015DemoRG/providers/Microsoft.Web/sites/BuggyBakery/detectors/runtimeavailability"), - // Properties: &armappservice.DetectorResponseProperties{ - // Dataset: []*armappservice.DiagnosticData{ - // { - // RenderingProperties: &armappservice.Rendering{ - // Description: to.Ptr("This detector breaks down the number of requests that your app received for each status code."), - // Title: to.Ptr("Requests by Status Code"), - // }, - // Table: &armappservice.DataTableResponseObject{ - // Columns: []*armappservice.DataTableResponseColumn{ - // { - // ColumnName: to.Ptr("PreciseTimeStamp"), - // ColumnType: to.Ptr("datetime"), - // DataType: to.Ptr("DateTime"), - // }, - // { - // ColumnName: to.Ptr("count_Http2xx"), - // ColumnType: to.Ptr("long"), - // DataType: to.Ptr("Int64"), - // }, - // { - // ColumnName: to.Ptr("count_Http3xx"), - // ColumnType: to.Ptr("long"), - // DataType: to.Ptr("Int64"), - // }, - // { - // ColumnName: to.Ptr("count_Http4xx"), - // ColumnType: to.Ptr("long"), - // DataType: to.Ptr("Int64"), - // }, - // { - // ColumnName: to.Ptr("count_Http5xx"), - // ColumnType: to.Ptr("long"), - // DataType: to.Ptr("Int64"), - // }}, - // Rows: [][]*string{ - // []*string{ - // to.Ptr("2018-03-27T00:25:00Z"), - // to.Ptr("772705"), - // to.Ptr("0"), - // to.Ptr("0"), - // to.Ptr("0")}, - // []*string{ - // to.Ptr("2018-03-27T00:30:00Z"), - // to.Ptr("787069"), - // to.Ptr("0"), - // to.Ptr("0"), - // to.Ptr("0")}, - // []*string{ - // to.Ptr("2018-03-27T00:35:00Z"), - // to.Ptr("781627"), - // to.Ptr("0"), - // to.Ptr("1"), - // to.Ptr("0")}, - // []*string{ - // to.Ptr("2018-03-27T00:40:00Z"), - // to.Ptr("785017"), - // to.Ptr("0"), - // to.Ptr("0"), - // to.Ptr("0")}, - // []*string{ - // to.Ptr("2018-03-27T00:45:00Z"), - // to.Ptr("783518"), - // to.Ptr("0"), - // to.Ptr("0"), - // to.Ptr("0")}, - // []*string{ - // to.Ptr("2018-03-27T00:50:00Z"), - // to.Ptr("785783"), - // to.Ptr("0"), - // to.Ptr("0"), - // to.Ptr("0")}, - // []*string{ - // to.Ptr("2018-03-27T00:55:00Z"), - // to.Ptr("772874"), - // to.Ptr("0"), - // to.Ptr("0"), - // to.Ptr("0")}, - // []*string{ - // to.Ptr("2018-03-27T01:00:00Z"), - // to.Ptr("787162"), - // to.Ptr("0"), - // to.Ptr("0"), - // to.Ptr("0")}, - // []*string{ - // to.Ptr("2018-03-27T01:05:00Z"), - // to.Ptr("782036"), - // to.Ptr("0"), - // to.Ptr("0"), - // to.Ptr("0")}, - // []*string{ - // to.Ptr("2018-03-27T01:10:00Z"), - // to.Ptr("784642"), - // to.Ptr("0"), - // to.Ptr("0"), - // to.Ptr("0")}}, - // TableName: to.Ptr("Table_0"), - // }, - // }}, - // Metadata: &armappservice.DetectorInfo{ - // Description: to.Ptr("This detector analyzes the requests to your application."), - // Category: to.Ptr("Availability and Performance"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json -func ExampleDiagnosticsClient_GetSiteDetectorResponse_getAppSlotDetectorResponse() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDiagnosticsClient().GetSiteDetectorResponse(ctx, "Sample-WestUSResourceGroup", "SampleApp", "runtimeavailability", &armappservice.DiagnosticsClientGetSiteDetectorResponseOptions{StartTime: nil, - EndTime: nil, - TimeGrain: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DetectorResponse = armappservice.DetectorResponse{ - // Name: to.Ptr("runtimeavailability"), - // ID: to.Ptr("/subscriptions/ef90e930-9d7f-4a60-8a99-748e0eea69de/resourceGroups/Build2015DemoRG/providers/Microsoft.Web/sites/BuggyBakery/slots/staging/detectors/runtimeavailability"), - // Properties: &armappservice.DetectorResponseProperties{ - // Dataset: []*armappservice.DiagnosticData{ - // { - // RenderingProperties: &armappservice.Rendering{ - // Description: to.Ptr("This detector breaks down the number of requests that your app received for each status code."), - // Title: to.Ptr("Requests by Status Code"), - // }, - // Table: &armappservice.DataTableResponseObject{ - // Columns: []*armappservice.DataTableResponseColumn{ - // { - // ColumnName: to.Ptr("PreciseTimeStamp"), - // ColumnType: to.Ptr("datetime"), - // DataType: to.Ptr("DateTime"), - // }, - // { - // ColumnName: to.Ptr("count_Http2xx"), - // ColumnType: to.Ptr("long"), - // DataType: to.Ptr("Int64"), - // }, - // { - // ColumnName: to.Ptr("count_Http3xx"), - // ColumnType: to.Ptr("long"), - // DataType: to.Ptr("Int64"), - // }, - // { - // ColumnName: to.Ptr("count_Http4xx"), - // ColumnType: to.Ptr("long"), - // DataType: to.Ptr("Int64"), - // }, - // { - // ColumnName: to.Ptr("count_Http5xx"), - // ColumnType: to.Ptr("long"), - // DataType: to.Ptr("Int64"), - // }}, - // Rows: [][]*string{ - // []*string{ - // to.Ptr("2018-03-27T00:25:00Z"), - // to.Ptr("772705"), - // to.Ptr("0"), - // to.Ptr("0"), - // to.Ptr("0")}, - // []*string{ - // to.Ptr("2018-03-27T00:30:00Z"), - // to.Ptr("787069"), - // to.Ptr("0"), - // to.Ptr("0"), - // to.Ptr("0")}, - // []*string{ - // to.Ptr("2018-03-27T00:35:00Z"), - // to.Ptr("781627"), - // to.Ptr("0"), - // to.Ptr("1"), - // to.Ptr("0")}, - // []*string{ - // to.Ptr("2018-03-27T00:40:00Z"), - // to.Ptr("785017"), - // to.Ptr("0"), - // to.Ptr("0"), - // to.Ptr("0")}, - // []*string{ - // to.Ptr("2018-03-27T00:45:00Z"), - // to.Ptr("783518"), - // to.Ptr("0"), - // to.Ptr("0"), - // to.Ptr("0")}, - // []*string{ - // to.Ptr("2018-03-27T00:50:00Z"), - // to.Ptr("785783"), - // to.Ptr("0"), - // to.Ptr("0"), - // to.Ptr("0")}, - // []*string{ - // to.Ptr("2018-03-27T00:55:00Z"), - // to.Ptr("772874"), - // to.Ptr("0"), - // to.Ptr("0"), - // to.Ptr("0")}, - // []*string{ - // to.Ptr("2018-03-27T01:00:00Z"), - // to.Ptr("787162"), - // to.Ptr("0"), - // to.Ptr("0"), - // to.Ptr("0")}, - // []*string{ - // to.Ptr("2018-03-27T01:05:00Z"), - // to.Ptr("782036"), - // to.Ptr("0"), - // to.Ptr("0"), - // to.Ptr("0")}, - // []*string{ - // to.Ptr("2018-03-27T01:10:00Z"), - // to.Ptr("784642"), - // to.Ptr("0"), - // to.Ptr("0"), - // to.Ptr("0")}}, - // TableName: to.Ptr("Table_0"), - // }, - // }}, - // Metadata: &armappservice.DetectorInfo{ - // Description: to.Ptr("This detector analyzes the requests to your application."), - // Category: to.Ptr("Availability and Performance"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/Diagnostics_ListSiteDiagnosticCategories.json -func ExampleDiagnosticsClient_NewListSiteDiagnosticCategoriesPager_listAppDiagnosticCategories() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDiagnosticsClient().NewListSiteDiagnosticCategoriesPager("Sample-WestUSResourceGroup", "SampleApp", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DiagnosticCategoryCollection = armappservice.DiagnosticCategoryCollection{ - // Value: []*armappservice.DiagnosticCategory{ - // { - // Name: to.Ptr("availability"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/Sample-WestUSResourceGroup/providers/Microsoft.Web/sites/SampleApp/diagnostics/availability"), - // Properties: &armappservice.DiagnosticCategoryProperties{ - // Description: to.Ptr("Availability and Perfomance Diagnostics"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/Diagnostics_ListSiteDiagnosticCategoriesSlot.json -func ExampleDiagnosticsClient_NewListSiteDiagnosticCategoriesPager_listAppSlotDiagnosticCategories() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDiagnosticsClient().NewListSiteDiagnosticCategoriesPager("Sample-WestUSResourceGroup", "SampleApp", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DiagnosticCategoryCollection = armappservice.DiagnosticCategoryCollection{ - // Value: []*armappservice.DiagnosticCategory{ - // { - // Name: to.Ptr("availability"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/Sample-WestUSResourceGroup/providers/Microsoft.Web/sites/SampleApp/slots/staging/diagnostics/availability"), - // Properties: &armappservice.DiagnosticCategoryProperties{ - // Description: to.Ptr("Availability and Perfomance Diagnostics"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/Diagnostics_GetSiteDiagnosticCategory.json -func ExampleDiagnosticsClient_GetSiteDiagnosticCategory_getAppDiagnosticCategory() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDiagnosticsClient().GetSiteDiagnosticCategory(ctx, "Sample-WestUSResourceGroup", "SampleApp", "availability", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DiagnosticCategory = armappservice.DiagnosticCategory{ - // Name: to.Ptr("availability"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/Sample-WestUSResourceGroup/providers/Microsoft.Web/sites/SampleApp/diagnostics/availability"), - // Properties: &armappservice.DiagnosticCategoryProperties{ - // Description: to.Ptr("Availability and Perfomance Diagnostics"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json -func ExampleDiagnosticsClient_GetSiteDiagnosticCategory_getAppSlotDiagnosticCategory() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDiagnosticsClient().GetSiteDiagnosticCategory(ctx, "Sample-WestUSResourceGroup", "SampleApp", "availability", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DiagnosticCategory = armappservice.DiagnosticCategory{ - // Name: to.Ptr("availability"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/Sample-WestUSResourceGroup/providers/Microsoft.Web/sites/SampleApp/diagnostics/availability"), - // Properties: &armappservice.DiagnosticCategoryProperties{ - // Description: to.Ptr("Availability and Perfomance Diagnostics"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/Diagnostics_ListSiteAnalyses.json -func ExampleDiagnosticsClient_NewListSiteAnalysesPager_listAppAnalyses() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDiagnosticsClient().NewListSiteAnalysesPager("Sample-WestUSResourceGroup", "SampleApp", "availability", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DiagnosticAnalysisCollection = armappservice.DiagnosticAnalysisCollection{ - // Value: []*armappservice.AnalysisDefinition{ - // { - // Name: to.Ptr("appanalysis"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/Sample-WestUSResourceGroup/providers/Microsoft.Web/sites/SampleApp/diagnostics/availability/analyses/appanalysis"), - // Properties: &armappservice.AnalysisDefinitionProperties{ - // Description: to.Ptr("Determine causes of availability loss as well as solutions for these problems"), - // }, - // }, - // { - // Name: to.Ptr("apprestartanalysis"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/Sample-WestUSResourceGroup/providers/Microsoft.Web/sites/SampleApp/diagnostics/availability/analyses/apprestartanalyses"), - // Properties: &armappservice.AnalysisDefinitionProperties{ - // Description: to.Ptr("Find the reasons that your app restarted"), - // }, - // }, - // { - // Name: to.Ptr("memoryanalysis"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/Sample-WestUSResourceGroup/providers/Microsoft.Web/sites/SampleApp/diagnostics/availability/analyses/memoryanalysis"), - // Properties: &armappservice.AnalysisDefinitionProperties{ - // Description: to.Ptr("Detect issues with memory as well as suggest ways to troubleshoot memory problems"), - // }, - // }, - // { - // Name: to.Ptr("tcpconnectionsanalysis"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/Sample-WestUSResourceGroup/providers/Microsoft.Web/sites/SampleApp/diagnostics/availability/analyses/tcpconnectionsanalysis"), - // Properties: &armappservice.AnalysisDefinitionProperties{ - // Description: to.Ptr("Analyze port usage and find out if a high number of connections is causing problems for your web app"), - // }, - // }, - // { - // Name: to.Ptr("perfanalysis"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/Sample-WestUSResourceGroup/providers/Microsoft.Web/sites/SampleApp/diagnostics/availability/analyses/perfanalysis"), - // Properties: &armappservice.AnalysisDefinitionProperties{ - // Description: to.Ptr("Determine causes of performance degredation as well as solutions for these problems"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/Diagnostics_ListSiteAnalysesSlot.json -func ExampleDiagnosticsClient_NewListSiteAnalysesPager_listAppSlotAnalyses() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDiagnosticsClient().NewListSiteAnalysesPager("Sample-WestUSResourceGroup", "SampleApp", "availability", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DiagnosticAnalysisCollection = armappservice.DiagnosticAnalysisCollection{ - // Value: []*armappservice.AnalysisDefinition{ - // { - // Name: to.Ptr("appanalysis"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/Sample-WestUSResourceGroup/providers/Microsoft.Web/sites/SampleApp/slots/staging/diagnostics/availability/analyses/appanalysis"), - // Properties: &armappservice.AnalysisDefinitionProperties{ - // Description: to.Ptr("Determine causes of availability loss as well as solutions for these problems"), - // }, - // }, - // { - // Name: to.Ptr("apprestartanalysis"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/Sample-WestUSResourceGroup/providers/Microsoft.Web/sites/SampleApp/slots/staging/diagnostics/availability/analyses/apprestartanalyses"), - // Properties: &armappservice.AnalysisDefinitionProperties{ - // Description: to.Ptr("Find the reasons that your app restarted"), - // }, - // }, - // { - // Name: to.Ptr("memoryanalysis"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/Sample-WestUSResourceGroup/providers/Microsoft.Web/sites/SampleApp/slots/staging/diagnostics/availability/analyses/memoryanalysis"), - // Properties: &armappservice.AnalysisDefinitionProperties{ - // Description: to.Ptr("Detect issues with memory as well as suggest ways to troubleshoot memory problems"), - // }, - // }, - // { - // Name: to.Ptr("tcpconnectionsanalysis"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/Sample-WestUSResourceGroup/providers/Microsoft.Web/sites/SampleApp/slots/staging/diagnostics/availability/analyses/tcpconnectionsanalysis"), - // Properties: &armappservice.AnalysisDefinitionProperties{ - // Description: to.Ptr("Analyze port usage and find out if a high number of connections is causing problems for your web app"), - // }, - // }, - // { - // Name: to.Ptr("perfanalysis"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/Sample-WestUSResourceGroup/providers/Microsoft.Web/sites/SampleApp/slots/staging/diagnostics/availability/analyses/perfanalysis"), - // Properties: &armappservice.AnalysisDefinitionProperties{ - // Description: to.Ptr("Determine causes of performance degredation as well as solutions for these problems"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/Diagnostics_GetSiteAnalysis.json -func ExampleDiagnosticsClient_GetSiteAnalysis_getAppAnalysis() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDiagnosticsClient().GetSiteAnalysis(ctx, "Sample-WestUSResourceGroup", "SampleApp", "availability", "appanalysis", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.AnalysisDefinition = armappservice.AnalysisDefinition{ - // Name: to.Ptr("appanalysis"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/Sample-WestUSResourceGroup/providers/Microsoft.Web/sites/SampleApp/slots/staging/diagnostics/availability/analyses/appanalysis"), - // Properties: &armappservice.AnalysisDefinitionProperties{ - // Description: to.Ptr("Determine causes of availability loss as well as solutions for these problems"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/Diagnostics_GetSiteAnalysisSlot.json -func ExampleDiagnosticsClient_GetSiteAnalysis_getAppSlotAnalysis() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDiagnosticsClient().GetSiteAnalysis(ctx, "Sample-WestUSResourceGroup", "SampleApp", "availability", "appanalysis", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.AnalysisDefinition = armappservice.AnalysisDefinition{ - // Name: to.Ptr("appanalysis"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/Sample-WestUSResourceGroup/providers/Microsoft.Web/sites/SampleApp/slots/staging/diagnostics/availability/analyses/appanalysis"), - // Properties: &armappservice.AnalysisDefinitionProperties{ - // Description: to.Ptr("Determine causes of availability loss as well as solutions for these problems"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/Diagnostics_ExecuteSiteAnalysis.json -func ExampleDiagnosticsClient_ExecuteSiteAnalysis_executeSiteAnalysis() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDiagnosticsClient().ExecuteSiteAnalysis(ctx, "Sample-WestUSResourceGroup", "SampleApp", "availability", "apprestartanalyses", &armappservice.DiagnosticsClientExecuteSiteAnalysisOptions{StartTime: nil, - EndTime: nil, - TimeGrain: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DiagnosticAnalysis = armappservice.DiagnosticAnalysis{ - // Name: to.Ptr("apprestartanalysis"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/Sample-WestUSResourceGroup/providers/Microsoft.Web/sites/SampleApp/diagnostics/availability/analyses/apprestartanalyses"), - // Properties: &armappservice.DiagnosticAnalysisProperties{ - // AbnormalTimePeriods: []*armappservice.AbnormalTimePeriod{ - // { - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-06T22:50:00Z"); return t}()), - // Events: []*armappservice.DetectorAbnormalTimePeriod{ - // { - // Type: to.Ptr(armappservice.IssueTypeServiceIncident), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-06T22:21:48Z"); return t}()), - // Message: to.Ptr("Your application process was restarted as application environment variables changed. This can most likely occur due to update in app settings or swap operation. This event occurred multiple times during the day."), - // MetaData: [][]*armappservice.NameValuePair{ - // []*armappservice.NameValuePair{ - // { - // Name: to.Ptr("feature"), - // Value: to.Ptr("auditlogs"), - // }, - // { - // Name: to.Ptr("displayedName"), - // Value: to.Ptr("Check Audit Logs"), - // }}}, - // Priority: to.Ptr[float64](0), - // Solutions: []*armappservice.Solution{ - // }, - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-06T22:21:50Z"); return t}()), - // }}, - // Solutions: []*armappservice.Solution{ - // }, - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-05T22:50:00Z"); return t}()), - // }}, - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-06T22:50:00Z"); return t}()), - // NonCorrelatedDetectors: []*armappservice.DetectorDefinition{ - // }, - // Payload: []*armappservice.AnalysisData{ - // { - // Data: [][]*armappservice.NameValuePair{ - // }, - // Metrics: []*armappservice.DiagnosticMetricSet{ - // { - // Name: to.Ptr("All Application Stop Events"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-06T22:50:00Z"); return t}()), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-05T22:50:00Z"); return t}()), - // TimeGrain: to.Ptr("00:05:00"), - // Values: []*armappservice.DiagnosticMetricSample{ - // { - // RoleInstance: to.Ptr("RD00155D3C15BE"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-06T00:00:00Z"); return t}()), - // Total: to.Ptr[float64](2), - // }, - // { - // IsAggregated: to.Ptr(true), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-06T00:00:00Z"); return t}()), - // Total: to.Ptr[float64](2), - // }, - // { - // RoleInstance: to.Ptr("RD00155D3C15C1"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-06T00:10:00Z"); return t}()), - // Total: to.Ptr[float64](2), - // }, - // { - // RoleInstance: to.Ptr("RD00155D3BE0FB"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-06T00:10:00Z"); return t}()), - // Total: to.Ptr[float64](2), - // }, - // { - // IsAggregated: to.Ptr(true), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-06T00:10:00Z"); return t}()), - // Total: to.Ptr[float64](4), - // }}, - // }, - // { - // Name: to.Ptr("User Events"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-06T22:50:00Z"); return t}()), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-05T22:50:00Z"); return t}()), - // TimeGrain: to.Ptr("00:05:00"), - // Unit: to.Ptr(""), - // Values: []*armappservice.DiagnosticMetricSample{ - // { - // IsAggregated: to.Ptr(true), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-06T22:20:00Z"); return t}()), - // Total: to.Ptr[float64](3), - // }, - // { - // RoleInstance: to.Ptr("RD00155D3C09FC"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-06T22:20:00Z"); return t}()), - // Total: to.Ptr[float64](1), - // }, - // { - // RoleInstance: to.Ptr("RD00155D3C2ADC"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-06T22:20:00Z"); return t}()), - // Total: to.Ptr[float64](1), - // }, - // { - // RoleInstance: to.Ptr("RD00155D3C214E"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-06T22:20:00Z"); return t}()), - // Total: to.Ptr[float64](1), - // }}, - // }}, - // Source: to.Ptr("workerprocessrecycle"), - // }}, - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-05T22:50:00Z"); return t}()), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/Diagnostics_ExecuteSiteAnalysisSlot.json -func ExampleDiagnosticsClient_ExecuteSiteAnalysis_executeSiteSlotAnalysis() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDiagnosticsClient().ExecuteSiteAnalysis(ctx, "Sample-WestUSResourceGroup", "SampleApp", "availability", "apprestartanalyses", &armappservice.DiagnosticsClientExecuteSiteAnalysisOptions{StartTime: nil, - EndTime: nil, - TimeGrain: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DiagnosticAnalysis = armappservice.DiagnosticAnalysis{ - // Name: to.Ptr("apprestartanalysis"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/Sample-WestUSResourceGroup/providers/Microsoft.Web/sites/SampleApp/slots/staging/diagnostics/availability/analyses/apprestartanalyses"), - // Properties: &armappservice.DiagnosticAnalysisProperties{ - // AbnormalTimePeriods: []*armappservice.AbnormalTimePeriod{ - // { - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-06T22:50:00Z"); return t}()), - // Events: []*armappservice.DetectorAbnormalTimePeriod{ - // { - // Type: to.Ptr(armappservice.IssueTypeServiceIncident), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-06T22:21:48Z"); return t}()), - // Message: to.Ptr("Your application process was restarted as application environment variables changed. This can most likely occur due to update in app settings or swap operation. This event occurred multiple times during the day."), - // MetaData: [][]*armappservice.NameValuePair{ - // []*armappservice.NameValuePair{ - // { - // Name: to.Ptr("feature"), - // Value: to.Ptr("auditlogs"), - // }, - // { - // Name: to.Ptr("displayedName"), - // Value: to.Ptr("Check Audit Logs"), - // }}}, - // Priority: to.Ptr[float64](0), - // Solutions: []*armappservice.Solution{ - // }, - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-06T22:21:50Z"); return t}()), - // }}, - // Solutions: []*armappservice.Solution{ - // }, - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-05T22:50:00Z"); return t}()), - // }}, - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-06T22:50:00Z"); return t}()), - // NonCorrelatedDetectors: []*armappservice.DetectorDefinition{ - // }, - // Payload: []*armappservice.AnalysisData{ - // { - // Data: [][]*armappservice.NameValuePair{ - // }, - // Metrics: []*armappservice.DiagnosticMetricSet{ - // { - // Name: to.Ptr("All Application Stop Events"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-06T22:50:00Z"); return t}()), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-05T22:50:00Z"); return t}()), - // TimeGrain: to.Ptr("00:05:00"), - // Values: []*armappservice.DiagnosticMetricSample{ - // { - // RoleInstance: to.Ptr("RD00155D3C15BE"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-06T00:00:00Z"); return t}()), - // Total: to.Ptr[float64](2), - // }, - // { - // IsAggregated: to.Ptr(true), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-06T00:00:00Z"); return t}()), - // Total: to.Ptr[float64](2), - // }, - // { - // RoleInstance: to.Ptr("RD00155D3C15C1"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-06T00:10:00Z"); return t}()), - // Total: to.Ptr[float64](2), - // }, - // { - // RoleInstance: to.Ptr("RD00155D3BE0FB"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-06T00:10:00Z"); return t}()), - // Total: to.Ptr[float64](2), - // }, - // { - // IsAggregated: to.Ptr(true), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-06T00:10:00Z"); return t}()), - // Total: to.Ptr[float64](4), - // }}, - // }, - // { - // Name: to.Ptr("User Events"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-06T22:50:00Z"); return t}()), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-05T22:50:00Z"); return t}()), - // TimeGrain: to.Ptr("00:05:00"), - // Unit: to.Ptr(""), - // Values: []*armappservice.DiagnosticMetricSample{ - // { - // IsAggregated: to.Ptr(true), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-06T22:20:00Z"); return t}()), - // Total: to.Ptr[float64](3), - // }, - // { - // RoleInstance: to.Ptr("RD00155D3C09FC"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-06T22:20:00Z"); return t}()), - // Total: to.Ptr[float64](1), - // }, - // { - // RoleInstance: to.Ptr("RD00155D3C2ADC"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-06T22:20:00Z"); return t}()), - // Total: to.Ptr[float64](1), - // }, - // { - // RoleInstance: to.Ptr("RD00155D3C214E"), - // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-06T22:20:00Z"); return t}()), - // Total: to.Ptr[float64](1), - // }}, - // }}, - // Source: to.Ptr("workerprocessrecycle"), - // }}, - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-05T22:50:00Z"); return t}()), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/Diagnostics_ListSiteDetectors.json -func ExampleDiagnosticsClient_NewListSiteDetectorsPager_listAppDetectors() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDiagnosticsClient().NewListSiteDetectorsPager("Sample-WestUSResourceGroup", "SampleApp", "availability", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DiagnosticDetectorCollection = armappservice.DiagnosticDetectorCollection{ - // Value: []*armappservice.DetectorDefinitionResource{ - // { - // Name: to.Ptr("servicehealth"), - // ID: to.Ptr("/subscriptions/ef90e930-9d7f-4a60-8a99-748e0eea69de/resourceGroups/Build2015DemoRG/providers/Microsoft.Web/sites/BuggyBakery/diagnostics/availability/detectors/servicehealth"), - // Properties: &armappservice.DetectorDefinition{ - // DisplayName: to.Ptr("Service Health"), - // IsEnabled: to.Ptr(true), - // Rank: to.Ptr[float64](1), - // }, - // }, - // { - // Name: to.Ptr("siteswap"), - // ID: to.Ptr("/subscriptions/ef90e930-9d7f-4a60-8a99-748e0eea69de/resourceGroups/Build2015DemoRG/providers/Microsoft.Web/sites/BuggyBakery/diagnostics/availability/detectors/siteswap"), - // Properties: &armappservice.DetectorDefinition{ - // DisplayName: to.Ptr("Site Swap Operations"), - // IsEnabled: to.Ptr(true), - // Rank: to.Ptr[float64](8), - // }, - // }, - // { - // Name: to.Ptr("sitecrashes"), - // ID: to.Ptr("/subscriptions/ef90e930-9d7f-4a60-8a99-748e0eea69de/resourceGroups/Build2015DemoRG/providers/Microsoft.Web/sites/BuggyBakery/diagnostics/availability/detectors/sitecrashes"), - // Properties: &armappservice.DetectorDefinition{ - // DisplayName: to.Ptr("Site Crash Events"), - // IsEnabled: to.Ptr(true), - // Rank: to.Ptr[float64](9), - // }, - // }, - // { - // Name: to.Ptr("deployment"), - // ID: to.Ptr("/subscriptions/ef90e930-9d7f-4a60-8a99-748e0eea69de/resourceGroups/Build2015DemoRG/providers/Microsoft.Web/sites/BuggyBakery/diagnostics/availability/detectors/deployment"), - // Properties: &armappservice.DetectorDefinition{ - // DisplayName: to.Ptr("Site Deployments"), - // IsEnabled: to.Ptr(true), - // Rank: to.Ptr[float64](7), - // }, - // }, - // { - // Name: to.Ptr("sitecpuanalysis"), - // ID: to.Ptr("/subscriptions/ef90e930-9d7f-4a60-8a99-748e0eea69de/resourceGroups/Build2015DemoRG/providers/Microsoft.Web/sites/BuggyBakery/diagnostics/availability/detectors/sitecpuanalysis"), - // Properties: &armappservice.DetectorDefinition{ - // DisplayName: to.Ptr("CPU Analysis"), - // IsEnabled: to.Ptr(true), - // Rank: to.Ptr[float64](3), - // }, - // }, - // { - // Name: to.Ptr("sitememoryanalysis"), - // ID: to.Ptr("/subscriptions/ef90e930-9d7f-4a60-8a99-748e0eea69de/resourceGroups/Build2015DemoRG/providers/Microsoft.Web/sites/BuggyBakery/diagnostics/availability/detectors/sitememoryanalysis"), - // Properties: &armappservice.DetectorDefinition{ - // DisplayName: to.Ptr("Physical Memory Analysis"), - // IsEnabled: to.Ptr(true), - // Rank: to.Ptr[float64](3), - // }, - // }, - // { - // Name: to.Ptr("committedmemoryusage"), - // ID: to.Ptr("/subscriptions/ef90e930-9d7f-4a60-8a99-748e0eea69de/resourceGroups/Build2015DemoRG/providers/Microsoft.Web/sites/BuggyBakery/diagnostics/availability/detectors/committedmemoryusage"), - // Properties: &armappservice.DetectorDefinition{ - // DisplayName: to.Ptr("Committed Memory Usage"), - // IsEnabled: to.Ptr(true), - // Rank: to.Ptr[float64](7), - // }, - // }, - // { - // Name: to.Ptr("pagefileoperations"), - // ID: to.Ptr("/subscriptions/ef90e930-9d7f-4a60-8a99-748e0eea69de/resourceGroups/Build2015DemoRG/providers/Microsoft.Web/sites/BuggyBakery/diagnostics/availability/detectors/pagefileoperations"), - // Properties: &armappservice.DetectorDefinition{ - // DisplayName: to.Ptr("Page File Operations"), - // IsEnabled: to.Ptr(true), - // Rank: to.Ptr[float64](3), - // }, - // }, - // { - // Name: to.Ptr("siterestartuserinitiated"), - // ID: to.Ptr("/subscriptions/ef90e930-9d7f-4a60-8a99-748e0eea69de/resourceGroups/Build2015DemoRG/providers/Microsoft.Web/sites/BuggyBakery/diagnostics/availability/detectors/siterestartuserinitiated"), - // Properties: &armappservice.DetectorDefinition{ - // DisplayName: to.Ptr("User Initiated Site Restarts"), - // IsEnabled: to.Ptr(true), - // Rank: to.Ptr[float64](14), - // }, - // }, - // { - // Name: to.Ptr("siterestartsettingupdate"), - // ID: to.Ptr("/subscriptions/ef90e930-9d7f-4a60-8a99-748e0eea69de/resourceGroups/Build2015DemoRG/providers/Microsoft.Web/sites/BuggyBakery/diagnostics/availability/detectors/siterestartsettingupdate"), - // Properties: &armappservice.DetectorDefinition{ - // DisplayName: to.Ptr("Config Update Site Restarts"), - // IsEnabled: to.Ptr(true), - // Rank: to.Ptr[float64](12), - // }, - // }, - // { - // Name: to.Ptr("frebanalysis"), - // ID: to.Ptr("/subscriptions/ef90e930-9d7f-4a60-8a99-748e0eea69de/resourceGroups/Build2015DemoRG/providers/Microsoft.Web/sites/BuggyBakery/diagnostics/availability/detectors/frebanalysis"), - // Properties: &armappservice.DetectorDefinition{ - // DisplayName: to.Ptr("Freb Logs Analysis"), - // IsEnabled: to.Ptr(true), - // Rank: to.Ptr[float64](6), - // }, - // }, - // { - // Name: to.Ptr("workeravailability"), - // ID: to.Ptr("/subscriptions/ef90e930-9d7f-4a60-8a99-748e0eea69de/resourceGroups/Build2015DemoRG/providers/Microsoft.Web/sites/BuggyBakery/diagnostics/availability/detectors/workeravailability"), - // Properties: &armappservice.DetectorDefinition{ - // DisplayName: to.Ptr("Worker Availability"), - // IsEnabled: to.Ptr(true), - // Rank: to.Ptr[float64](11), - // }, - // }, - // { - // Name: to.Ptr("sitelatency"), - // ID: to.Ptr("/subscriptions/ef90e930-9d7f-4a60-8a99-748e0eea69de/resourceGroups/Build2015DemoRG/providers/Microsoft.Web/sites/BuggyBakery/diagnostics/availability/detectors/sitelatency"), - // Properties: &armappservice.DetectorDefinition{ - // DisplayName: to.Ptr("Site Latency"), - // IsEnabled: to.Ptr(false), - // Rank: to.Ptr[float64](1005), - // }, - // }, - // { - // Name: to.Ptr("threadcount"), - // ID: to.Ptr("/subscriptions/ef90e930-9d7f-4a60-8a99-748e0eea69de/resourceGroups/Build2015DemoRG/providers/Microsoft.Web/sites/BuggyBakery/diagnostics/availability/detectors/threadcount"), - // Properties: &armappservice.DetectorDefinition{ - // DisplayName: to.Ptr("Thread Count"), - // IsEnabled: to.Ptr(true), - // Rank: to.Ptr[float64](23), - // }, - // }, - // { - // Name: to.Ptr("failedrequestsperuri"), - // ID: to.Ptr("/subscriptions/ef90e930-9d7f-4a60-8a99-748e0eea69de/resourceGroups/Build2015DemoRG/providers/Microsoft.Web/sites/BuggyBakery/diagnostics/availability/detectors/failedrequestsperuri"), - // Properties: &armappservice.DetectorDefinition{ - // DisplayName: to.Ptr("Failed Requests Per URI"), - // IsEnabled: to.Ptr(true), - // Rank: to.Ptr[float64](998), - // }, - // }, - // { - // Name: to.Ptr("autoheal"), - // ID: to.Ptr("/subscriptions/ef90e930-9d7f-4a60-8a99-748e0eea69de/resourceGroups/Build2015DemoRG/providers/Microsoft.Web/sites/BuggyBakery/diagnostics/availability/detectors/autoheal"), - // Properties: &armappservice.DetectorDefinition{ - // DisplayName: to.Ptr("AutoHeal"), - // IsEnabled: to.Ptr(true), - // Rank: to.Ptr[float64](21), - // }, - // }, - // { - // Name: to.Ptr("loganalyzer"), - // ID: to.Ptr("/subscriptions/ef90e930-9d7f-4a60-8a99-748e0eea69de/resourceGroups/Build2015DemoRG/providers/Microsoft.Web/sites/BuggyBakery/diagnostics/availability/detectors/loganalyzer"), - // Properties: &armappservice.DetectorDefinition{ - // DisplayName: to.Ptr("PHP Log Analyzer"), - // IsEnabled: to.Ptr(true), - // Rank: to.Ptr[float64](26), - // }, - // }, - // { - // Name: to.Ptr("aspnetcore"), - // ID: to.Ptr("/subscriptions/ef90e930-9d7f-4a60-8a99-748e0eea69de/resourceGroups/Build2015DemoRG/providers/Microsoft.Web/sites/BuggyBakery/diagnostics/availability/detectors/aspnetcore"), - // Properties: &armappservice.DetectorDefinition{ - // DisplayName: to.Ptr("ASP.NET Core"), - // IsEnabled: to.Ptr(true), - // Rank: to.Ptr[float64](5), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/Diagnostics_ListSiteDetectorsSlot.json -func ExampleDiagnosticsClient_NewListSiteDetectorsPager_listAppSlotDetectors() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDiagnosticsClient().NewListSiteDetectorsPager("Sample-WestUSResourceGroup", "SampleApp", "availability", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DiagnosticDetectorCollection = armappservice.DiagnosticDetectorCollection{ - // Value: []*armappservice.DetectorDefinitionResource{ - // { - // Name: to.Ptr("servicehealth"), - // ID: to.Ptr("/subscriptions/ef90e930-9d7f-4a60-8a99-748e0eea69de/resourceGroups/Build2015DemoRG/providers/Microsoft.Web/sites/BuggyBakery/slots/staging/diagnostics/availability/detectors/servicehealth"), - // Properties: &armappservice.DetectorDefinition{ - // DisplayName: to.Ptr("Service Health"), - // IsEnabled: to.Ptr(true), - // Rank: to.Ptr[float64](1), - // }, - // }, - // { - // Name: to.Ptr("siteswap"), - // ID: to.Ptr("/subscriptions/ef90e930-9d7f-4a60-8a99-748e0eea69de/resourceGroups/Build2015DemoRG/providers/Microsoft.Web/sites/BuggyBakery/slots/staging/diagnostics/availability/detectors/siteswap"), - // Properties: &armappservice.DetectorDefinition{ - // DisplayName: to.Ptr("Site Swap Operations"), - // IsEnabled: to.Ptr(true), - // Rank: to.Ptr[float64](8), - // }, - // }, - // { - // Name: to.Ptr("sitecrashes"), - // ID: to.Ptr("/subscriptions/ef90e930-9d7f-4a60-8a99-748e0eea69de/resourceGroups/Build2015DemoRG/providers/Microsoft.Web/sites/BuggyBakery/slots/staging/diagnostics/availability/detectors/sitecrashes"), - // Properties: &armappservice.DetectorDefinition{ - // DisplayName: to.Ptr("Site Crash Events"), - // IsEnabled: to.Ptr(true), - // Rank: to.Ptr[float64](9), - // }, - // }, - // { - // Name: to.Ptr("deployment"), - // ID: to.Ptr("/subscriptions/ef90e930-9d7f-4a60-8a99-748e0eea69de/resourceGroups/Build2015DemoRG/providers/Microsoft.Web/sites/BuggyBakery/slots/staging/diagnostics/availability/detectors/deployment"), - // Properties: &armappservice.DetectorDefinition{ - // DisplayName: to.Ptr("Site Deployments"), - // IsEnabled: to.Ptr(true), - // Rank: to.Ptr[float64](7), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/Diagnostics_GetSiteDetector.json -func ExampleDiagnosticsClient_GetSiteDetector_getAppDetector() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDiagnosticsClient().GetSiteDetector(ctx, "Sample-WestUSResourceGroup", "SampleApp", "availability", "sitecrashes", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DetectorDefinitionResource = armappservice.DetectorDefinitionResource{ - // Name: to.Ptr("sitecrashes"), - // ID: to.Ptr("/subscriptions/ef90e930-9d7f-4a60-8a99-748e0eea69de/resourceGroups/Build2015DemoRG/providers/Microsoft.Web/sites/BuggyBakery/diagnostics/availability/detectors/sitecrashes"), - // Properties: &armappservice.DetectorDefinition{ - // DisplayName: to.Ptr("Site Crash Events"), - // IsEnabled: to.Ptr(true), - // Rank: to.Ptr[float64](9), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/Diagnostics_GetSiteDetectorSlot.json -func ExampleDiagnosticsClient_GetSiteDetector_getAppSlotDetector() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDiagnosticsClient().GetSiteDetector(ctx, "Sample-WestUSResourceGroup", "SampleApp", "availability", "sitecrashes", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DetectorDefinitionResource = armappservice.DetectorDefinitionResource{ - // Name: to.Ptr("sitecrashes"), - // ID: to.Ptr("/subscriptions/ef90e930-9d7f-4a60-8a99-748e0eea69de/resourceGroups/Build2015DemoRG/providers/Microsoft.Web/sites/BuggyBakery/slots/staging/diagnostics/availability/detectors/sitecrashes"), - // Properties: &armappservice.DetectorDefinition{ - // DisplayName: to.Ptr("Site Crash Events"), - // IsEnabled: to.Ptr(true), - // Rank: to.Ptr[float64](9), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/Diagnostics_ExecuteSiteDetector.json -func ExampleDiagnosticsClient_ExecuteSiteDetector_executeSiteDetector() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDiagnosticsClient().ExecuteSiteDetector(ctx, "Sample-WestUSResourceGroup", "SampleApp", "sitecrashes", "availability", &armappservice.DiagnosticsClientExecuteSiteDetectorOptions{StartTime: nil, - EndTime: nil, - TimeGrain: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DiagnosticDetectorResponse = armappservice.DiagnosticDetectorResponse{ - // Name: to.Ptr("sitecrashes"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/Sample-WestUSResourceGroup/providers/Microsoft.Web/sites/SampleApp/diagnostics/availability/detectors/sitecrashes"), - // Properties: &armappservice.DiagnosticDetectorResponseProperties{ - // AbnormalTimePeriods: []*armappservice.DetectorAbnormalTimePeriod{ - // { - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-06T22:50:00Z"); return t}()), - // Solutions: []*armappservice.Solution{ - // }, - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-05T22:50:00Z"); return t}()), - // }}, - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-06T22:50:00Z"); return t}()), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-05T22:50:00Z"); return t}()), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/Diagnostics_ExecuteSiteDetectorSlot.json -func ExampleDiagnosticsClient_ExecuteSiteDetector_executeSiteSlotDetector() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDiagnosticsClient().ExecuteSiteDetector(ctx, "Sample-WestUSResourceGroup", "SampleApp", "sitecrashes", "availability", &armappservice.DiagnosticsClientExecuteSiteDetectorOptions{StartTime: nil, - EndTime: nil, - TimeGrain: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DiagnosticDetectorResponse = armappservice.DiagnosticDetectorResponse{ - // Name: to.Ptr("sitecrashes"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/Sample-WestUSResourceGroup/providers/Microsoft.Web/sites/SampleApp/slots/staging/diagnostics/availability/detectors/sitecrashes"), - // Properties: &armappservice.DiagnosticDetectorResponseProperties{ - // AbnormalTimePeriods: []*armappservice.DetectorAbnormalTimePeriod{ - // { - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-06T22:50:00Z"); return t}()), - // Solutions: []*armappservice.Solution{ - // }, - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-05T22:50:00Z"); return t}()), - // }}, - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-06T22:50:00Z"); return t}()), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-05T22:50:00Z"); return t}()), - // }, - // } -} diff --git a/sdk/resourcemanager/appservice/armappservice/domainregistrationprovider_client.go b/sdk/resourcemanager/appservice/armappservice/domainregistrationprovider_client.go index 45a348d12683..f39e7ecd56ba 100644 --- a/sdk/resourcemanager/appservice/armappservice/domainregistrationprovider_client.go +++ b/sdk/resourcemanager/appservice/armappservice/domainregistrationprovider_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappservice @@ -28,7 +27,7 @@ type DomainRegistrationProviderClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDomainRegistrationProviderClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*DomainRegistrationProviderClient, error) { - cl, err := arm.NewClient(moduleName+".DomainRegistrationProviderClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -41,7 +40,7 @@ func NewDomainRegistrationProviderClient(credential azcore.TokenCredential, opti // NewListOperationsPager - Description for Implements Csm operations Api to exposes the list of available Csm Apis under // the resource provider // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - options - DomainRegistrationProviderClientListOperationsOptions contains the optional parameters for the DomainRegistrationProviderClient.NewListOperationsPager // method. func (client *DomainRegistrationProviderClient) NewListOperationsPager(options *DomainRegistrationProviderClientListOperationsOptions) *runtime.Pager[DomainRegistrationProviderClientListOperationsResponse] { @@ -50,25 +49,20 @@ func (client *DomainRegistrationProviderClient) NewListOperationsPager(options * return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *DomainRegistrationProviderClientListOperationsResponse) (DomainRegistrationProviderClientListOperationsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listOperationsCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DomainRegistrationProviderClient.NewListOperationsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listOperationsCreateRequest(ctx, options) + }, nil) if err != nil { return DomainRegistrationProviderClientListOperationsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DomainRegistrationProviderClientListOperationsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DomainRegistrationProviderClientListOperationsResponse{}, runtime.NewResponseError(resp) - } return client.listOperationsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -80,7 +74,7 @@ func (client *DomainRegistrationProviderClient) listOperationsCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/domainregistrationprovider_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/domainregistrationprovider_client_example_test.go deleted file mode 100644 index a7cb577a2320..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/domainregistrationprovider_client_example_test.go +++ /dev/null @@ -1,136 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.DomainRegistration/stable/2022-09-01/examples/ListOperations.json -func ExampleDomainRegistrationProviderClient_NewListOperationsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDomainRegistrationProviderClient().NewListOperationsPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.CsmOperationCollection = armappservice.CsmOperationCollection{ - // Value: []*armappservice.CsmOperationDescription{ - // { - // Name: to.Ptr("Microsoft.DomainRegistration/domains/Read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get the list of domains"), - // Operation: to.Ptr("Get Domains"), - // Provider: to.Ptr("Microsoft Domains"), - // Resource: to.Ptr("Domain"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.DomainRegistration/domains/Write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Add a new Domain or update an existing one"), - // Operation: to.Ptr("Add or Update Domain"), - // Provider: to.Ptr("Microsoft Domains"), - // Resource: to.Ptr("Domain"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.DomainRegistration/domains/Delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete an existing domain."), - // Operation: to.Ptr("Delete Domain"), - // Provider: to.Ptr("Microsoft Domains"), - // Resource: to.Ptr("Domain"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.DomainRegistration/domains/operationresults/Read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get a domain operation"), - // Operation: to.Ptr("Get Domain Operation"), - // Provider: to.Ptr("Microsoft Domains"), - // Resource: to.Ptr("Domain operation"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.DomainRegistration/generateSsoRequest/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Generate a request for signing into domain control center."), - // Operation: to.Ptr("Generate Domain Control Center Single Sign On Request"), - // Provider: to.Ptr("Microsoft Domains"), - // Resource: to.Ptr("Domain Control Center Single Sign On Request"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.DomainRegistration/validateDomainRegistrationInformation/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Validate domain purchase object without submitting it"), - // Operation: to.Ptr("Domain Purchase Info Validation"), - // Provider: to.Ptr("Microsoft Domains"), - // Resource: to.Ptr("Domain Validation"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.DomainRegistration/checkDomainAvailability/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Check if a domain is available for purchase"), - // Operation: to.Ptr("Check Domain Availability"), - // Provider: to.Ptr("Microsoft Domains"), - // Resource: to.Ptr("Domain Availability Result"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.DomainRegistration/listDomainRecommendations/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Retrieve the list domain recommendations based on keywords"), - // Operation: to.Ptr("Retrieve Domain Recommendations"), - // Provider: to.Ptr("Microsoft Domains"), - // Resource: to.Ptr("Domain Recommendations"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.DomainRegistration/register/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Register the Microsoft Domains resource provider for the subscription"), - // Operation: to.Ptr("Register Microsoft Domains resource provider"), - // Provider: to.Ptr("Microsoft Domains"), - // Resource: to.Ptr("Microsoft Domains resource provider"), - // }, - // Origin: to.Ptr("user,system"), - // }}, - // } - } -} diff --git a/sdk/resourcemanager/appservice/armappservice/domains_client.go b/sdk/resourcemanager/appservice/armappservice/domains_client.go index ed36a4f6def2..918aeee6b30e 100644 --- a/sdk/resourcemanager/appservice/armappservice/domains_client.go +++ b/sdk/resourcemanager/appservice/armappservice/domains_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappservice @@ -34,7 +33,7 @@ type DomainsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewDomainsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DomainsClient, error) { - cl, err := arm.NewClient(moduleName+".DomainsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,23 +47,30 @@ func NewDomainsClient(subscriptionID string, credential azcore.TokenCredential, // CheckAvailability - Description for Check if a domain is available for registration. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - identifier - Name of the domain. // - options - DomainsClientCheckAvailabilityOptions contains the optional parameters for the DomainsClient.CheckAvailability // method. func (client *DomainsClient) CheckAvailability(ctx context.Context, identifier NameIdentifier, options *DomainsClientCheckAvailabilityOptions) (DomainsClientCheckAvailabilityResponse, error) { + var err error + const operationName = "DomainsClient.CheckAvailability" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.checkAvailabilityCreateRequest(ctx, identifier, options) if err != nil { return DomainsClientCheckAvailabilityResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DomainsClientCheckAvailabilityResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DomainsClientCheckAvailabilityResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DomainsClientCheckAvailabilityResponse{}, err } - return client.checkAvailabilityHandleResponse(resp) + resp, err := client.checkAvailabilityHandleResponse(httpResp) + return resp, err } // checkAvailabilityCreateRequest creates the CheckAvailability request. @@ -79,10 +85,13 @@ func (client *DomainsClient) checkAvailabilityCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, identifier) + if err := runtime.MarshalAsJSON(req, identifier); err != nil { + return nil, err + } + return req, nil } // checkAvailabilityHandleResponse handles the CheckAvailability response. @@ -97,7 +106,7 @@ func (client *DomainsClient) checkAvailabilityHandleResponse(resp *http.Response // BeginCreateOrUpdate - Description for Creates or updates a domain. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - domainName - Name of the domain. // - domain - Domain registration information. @@ -109,29 +118,40 @@ func (client *DomainsClient) BeginCreateOrUpdate(ctx context.Context, resourceGr if err != nil { return nil, err } - return runtime.NewPoller[DomainsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[DomainsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[DomainsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[DomainsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateOrUpdate - Description for Creates or updates a domain. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *DomainsClient) createOrUpdate(ctx context.Context, resourceGroupName string, domainName string, domain Domain, options *DomainsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "DomainsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, domainName, domain, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -154,17 +174,20 @@ func (client *DomainsClient) createOrUpdateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, domain) + if err := runtime.MarshalAsJSON(req, domain); err != nil { + return nil, err + } + return req, nil } // CreateOrUpdateOwnershipIdentifier - Description for Creates an ownership identifier for a domain or updates identifier // details for an existing identifier // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - domainName - Name of domain. // - name - Name of identifier. @@ -172,18 +195,25 @@ func (client *DomainsClient) createOrUpdateCreateRequest(ctx context.Context, re // - options - DomainsClientCreateOrUpdateOwnershipIdentifierOptions contains the optional parameters for the DomainsClient.CreateOrUpdateOwnershipIdentifier // method. func (client *DomainsClient) CreateOrUpdateOwnershipIdentifier(ctx context.Context, resourceGroupName string, domainName string, name string, domainOwnershipIdentifier DomainOwnershipIdentifier, options *DomainsClientCreateOrUpdateOwnershipIdentifierOptions) (DomainsClientCreateOrUpdateOwnershipIdentifierResponse, error) { + var err error + const operationName = "DomainsClient.CreateOrUpdateOwnershipIdentifier" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateOwnershipIdentifierCreateRequest(ctx, resourceGroupName, domainName, name, domainOwnershipIdentifier, options) if err != nil { return DomainsClientCreateOrUpdateOwnershipIdentifierResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DomainsClientCreateOrUpdateOwnershipIdentifierResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DomainsClientCreateOrUpdateOwnershipIdentifierResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DomainsClientCreateOrUpdateOwnershipIdentifierResponse{}, err } - return client.createOrUpdateOwnershipIdentifierHandleResponse(resp) + resp, err := client.createOrUpdateOwnershipIdentifierHandleResponse(httpResp) + return resp, err } // createOrUpdateOwnershipIdentifierCreateRequest creates the CreateOrUpdateOwnershipIdentifier request. @@ -210,10 +240,13 @@ func (client *DomainsClient) createOrUpdateOwnershipIdentifierCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, domainOwnershipIdentifier) + if err := runtime.MarshalAsJSON(req, domainOwnershipIdentifier); err != nil { + return nil, err + } + return req, nil } // createOrUpdateOwnershipIdentifierHandleResponse handles the CreateOrUpdateOwnershipIdentifier response. @@ -228,21 +261,27 @@ func (client *DomainsClient) createOrUpdateOwnershipIdentifierHandleResponse(res // Delete - Description for Delete a domain. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - domainName - Name of the domain. // - options - DomainsClientDeleteOptions contains the optional parameters for the DomainsClient.Delete method. func (client *DomainsClient) Delete(ctx context.Context, resourceGroupName string, domainName string, options *DomainsClientDeleteOptions) (DomainsClientDeleteResponse, error) { + var err error + const operationName = "DomainsClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, domainName, options) if err != nil { return DomainsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DomainsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return DomainsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return DomainsClientDeleteResponse{}, err } return DomainsClientDeleteResponse{}, nil } @@ -270,7 +309,7 @@ func (client *DomainsClient) deleteCreateRequest(ctx context.Context, resourceGr if options != nil && options.ForceHardDeleteDomain != nil { reqQP.Set("forceHardDeleteDomain", strconv.FormatBool(*options.ForceHardDeleteDomain)) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -279,23 +318,29 @@ func (client *DomainsClient) deleteCreateRequest(ctx context.Context, resourceGr // DeleteOwnershipIdentifier - Description for Delete ownership identifier for domain // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - domainName - Name of domain. // - name - Name of identifier. // - options - DomainsClientDeleteOwnershipIdentifierOptions contains the optional parameters for the DomainsClient.DeleteOwnershipIdentifier // method. func (client *DomainsClient) DeleteOwnershipIdentifier(ctx context.Context, resourceGroupName string, domainName string, name string, options *DomainsClientDeleteOwnershipIdentifierOptions) (DomainsClientDeleteOwnershipIdentifierResponse, error) { + var err error + const operationName = "DomainsClient.DeleteOwnershipIdentifier" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteOwnershipIdentifierCreateRequest(ctx, resourceGroupName, domainName, name, options) if err != nil { return DomainsClientDeleteOwnershipIdentifierResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DomainsClientDeleteOwnershipIdentifierResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return DomainsClientDeleteOwnershipIdentifierResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return DomainsClientDeleteOwnershipIdentifierResponse{}, err } return DomainsClientDeleteOwnershipIdentifierResponse{}, nil } @@ -324,7 +369,7 @@ func (client *DomainsClient) deleteOwnershipIdentifierCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -333,23 +378,30 @@ func (client *DomainsClient) deleteOwnershipIdentifierCreateRequest(ctx context. // Get - Description for Get a domain. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - domainName - Name of the domain. // - options - DomainsClientGetOptions contains the optional parameters for the DomainsClient.Get method. func (client *DomainsClient) Get(ctx context.Context, resourceGroupName string, domainName string, options *DomainsClientGetOptions) (DomainsClientGetResponse, error) { + var err error + const operationName = "DomainsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, domainName, options) if err != nil { return DomainsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DomainsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DomainsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DomainsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -372,7 +424,7 @@ func (client *DomainsClient) getCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -390,22 +442,29 @@ func (client *DomainsClient) getHandleResponse(resp *http.Response) (DomainsClie // GetControlCenterSsoRequest - Description for Generate a single sign-on request for the domain management portal. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - options - DomainsClientGetControlCenterSsoRequestOptions contains the optional parameters for the DomainsClient.GetControlCenterSsoRequest // method. func (client *DomainsClient) GetControlCenterSsoRequest(ctx context.Context, options *DomainsClientGetControlCenterSsoRequestOptions) (DomainsClientGetControlCenterSsoRequestResponse, error) { + var err error + const operationName = "DomainsClient.GetControlCenterSsoRequest" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getControlCenterSsoRequestCreateRequest(ctx, options) if err != nil { return DomainsClientGetControlCenterSsoRequestResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DomainsClientGetControlCenterSsoRequestResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DomainsClientGetControlCenterSsoRequestResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DomainsClientGetControlCenterSsoRequestResponse{}, err } - return client.getControlCenterSsoRequestHandleResponse(resp) + resp, err := client.getControlCenterSsoRequestHandleResponse(httpResp) + return resp, err } // getControlCenterSsoRequestCreateRequest creates the GetControlCenterSsoRequest request. @@ -420,7 +479,7 @@ func (client *DomainsClient) getControlCenterSsoRequestCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -438,25 +497,32 @@ func (client *DomainsClient) getControlCenterSsoRequestHandleResponse(resp *http // GetOwnershipIdentifier - Description for Get ownership identifier for domain // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - domainName - Name of domain. // - name - Name of identifier. // - options - DomainsClientGetOwnershipIdentifierOptions contains the optional parameters for the DomainsClient.GetOwnershipIdentifier // method. func (client *DomainsClient) GetOwnershipIdentifier(ctx context.Context, resourceGroupName string, domainName string, name string, options *DomainsClientGetOwnershipIdentifierOptions) (DomainsClientGetOwnershipIdentifierResponse, error) { + var err error + const operationName = "DomainsClient.GetOwnershipIdentifier" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getOwnershipIdentifierCreateRequest(ctx, resourceGroupName, domainName, name, options) if err != nil { return DomainsClientGetOwnershipIdentifierResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DomainsClientGetOwnershipIdentifierResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DomainsClientGetOwnershipIdentifierResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DomainsClientGetOwnershipIdentifierResponse{}, err } - return client.getOwnershipIdentifierHandleResponse(resp) + resp, err := client.getOwnershipIdentifierHandleResponse(httpResp) + return resp, err } // getOwnershipIdentifierCreateRequest creates the GetOwnershipIdentifier request. @@ -483,7 +549,7 @@ func (client *DomainsClient) getOwnershipIdentifierCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -500,7 +566,7 @@ func (client *DomainsClient) getOwnershipIdentifierHandleResponse(resp *http.Res // NewListPager - Description for Get all domains in a subscription. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - options - DomainsClientListOptions contains the optional parameters for the DomainsClient.NewListPager method. func (client *DomainsClient) NewListPager(options *DomainsClientListOptions) *runtime.Pager[DomainsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[DomainsClientListResponse]{ @@ -508,25 +574,20 @@ func (client *DomainsClient) NewListPager(options *DomainsClientListOptions) *ru return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *DomainsClientListResponse) (DomainsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DomainsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return DomainsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DomainsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DomainsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -542,7 +603,7 @@ func (client *DomainsClient) listCreateRequest(ctx context.Context, options *Dom return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -559,7 +620,7 @@ func (client *DomainsClient) listHandleResponse(resp *http.Response) (DomainsCli // NewListByResourceGroupPager - Description for Get all domains in a resource group. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - options - DomainsClientListByResourceGroupOptions contains the optional parameters for the DomainsClient.NewListByResourceGroupPager // method. @@ -569,25 +630,20 @@ func (client *DomainsClient) NewListByResourceGroupPager(resourceGroupName strin return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *DomainsClientListByResourceGroupResponse) (DomainsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DomainsClientListByResourceGroupResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DomainsClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return DomainsClientListByResourceGroupResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DomainsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -607,7 +663,7 @@ func (client *DomainsClient) listByResourceGroupCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -624,7 +680,7 @@ func (client *DomainsClient) listByResourceGroupHandleResponse(resp *http.Respon // NewListOwnershipIdentifiersPager - Description for Lists domain ownership identifiers. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - domainName - Name of domain. // - options - DomainsClientListOwnershipIdentifiersOptions contains the optional parameters for the DomainsClient.NewListOwnershipIdentifiersPager @@ -635,25 +691,20 @@ func (client *DomainsClient) NewListOwnershipIdentifiersPager(resourceGroupName return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *DomainsClientListOwnershipIdentifiersResponse) (DomainsClientListOwnershipIdentifiersResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listOwnershipIdentifiersCreateRequest(ctx, resourceGroupName, domainName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return DomainsClientListOwnershipIdentifiersResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DomainsClient.NewListOwnershipIdentifiersPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listOwnershipIdentifiersCreateRequest(ctx, resourceGroupName, domainName, options) + }, nil) if err != nil { return DomainsClientListOwnershipIdentifiersResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DomainsClientListOwnershipIdentifiersResponse{}, runtime.NewResponseError(resp) - } return client.listOwnershipIdentifiersHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -677,7 +728,7 @@ func (client *DomainsClient) listOwnershipIdentifiersCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -694,7 +745,7 @@ func (client *DomainsClient) listOwnershipIdentifiersHandleResponse(resp *http.R // NewListRecommendationsPager - Description for Get domain name recommendations based on keywords. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - parameters - Search parameters for domain name recommendations. // - options - DomainsClientListRecommendationsOptions contains the optional parameters for the DomainsClient.NewListRecommendationsPager // method. @@ -704,25 +755,20 @@ func (client *DomainsClient) NewListRecommendationsPager(parameters DomainRecomm return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *DomainsClientListRecommendationsResponse) (DomainsClientListRecommendationsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listRecommendationsCreateRequest(ctx, parameters, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "DomainsClient.NewListRecommendationsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listRecommendationsCreateRequest(ctx, parameters, options) + }, nil) if err != nil { return DomainsClientListRecommendationsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return DomainsClientListRecommendationsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DomainsClientListRecommendationsResponse{}, runtime.NewResponseError(resp) - } return client.listRecommendationsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -738,10 +784,13 @@ func (client *DomainsClient) listRecommendationsCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // listRecommendationsHandleResponse handles the ListRecommendations response. @@ -756,21 +805,27 @@ func (client *DomainsClient) listRecommendationsHandleResponse(resp *http.Respon // Renew - Description for Renew a domain. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - domainName - Name of the domain. // - options - DomainsClientRenewOptions contains the optional parameters for the DomainsClient.Renew method. func (client *DomainsClient) Renew(ctx context.Context, resourceGroupName string, domainName string, options *DomainsClientRenewOptions) (DomainsClientRenewResponse, error) { + var err error + const operationName = "DomainsClient.Renew" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.renewCreateRequest(ctx, resourceGroupName, domainName, options) if err != nil { return DomainsClientRenewResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DomainsClientRenewResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return DomainsClientRenewResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return DomainsClientRenewResponse{}, err } return DomainsClientRenewResponse{}, nil } @@ -795,7 +850,7 @@ func (client *DomainsClient) renewCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -804,23 +859,30 @@ func (client *DomainsClient) renewCreateRequest(ctx context.Context, resourceGro // TransferOut - Transfer out domain to another registrar // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - domainName - Name of domain. // - options - DomainsClientTransferOutOptions contains the optional parameters for the DomainsClient.TransferOut method. func (client *DomainsClient) TransferOut(ctx context.Context, resourceGroupName string, domainName string, options *DomainsClientTransferOutOptions) (DomainsClientTransferOutResponse, error) { + var err error + const operationName = "DomainsClient.TransferOut" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.transferOutCreateRequest(ctx, resourceGroupName, domainName, options) if err != nil { return DomainsClientTransferOutResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DomainsClientTransferOutResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DomainsClientTransferOutResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DomainsClientTransferOutResponse{}, err } - return client.transferOutHandleResponse(resp) + resp, err := client.transferOutHandleResponse(httpResp) + return resp, err } // transferOutCreateRequest creates the TransferOut request. @@ -843,7 +905,7 @@ func (client *DomainsClient) transferOutCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -861,24 +923,31 @@ func (client *DomainsClient) transferOutHandleResponse(resp *http.Response) (Dom // Update - Description for Creates or updates a domain. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - domainName - Name of the domain. // - domain - Domain registration information. // - options - DomainsClientUpdateOptions contains the optional parameters for the DomainsClient.Update method. func (client *DomainsClient) Update(ctx context.Context, resourceGroupName string, domainName string, domain DomainPatchResource, options *DomainsClientUpdateOptions) (DomainsClientUpdateResponse, error) { + var err error + const operationName = "DomainsClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, domainName, domain, options) if err != nil { return DomainsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DomainsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return DomainsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return DomainsClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -901,10 +970,13 @@ func (client *DomainsClient) updateCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, domain) + if err := runtime.MarshalAsJSON(req, domain); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. @@ -920,7 +992,7 @@ func (client *DomainsClient) updateHandleResponse(resp *http.Response) (DomainsC // for an existing identifier // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - domainName - Name of domain. // - name - Name of identifier. @@ -928,18 +1000,25 @@ func (client *DomainsClient) updateHandleResponse(resp *http.Response) (DomainsC // - options - DomainsClientUpdateOwnershipIdentifierOptions contains the optional parameters for the DomainsClient.UpdateOwnershipIdentifier // method. func (client *DomainsClient) UpdateOwnershipIdentifier(ctx context.Context, resourceGroupName string, domainName string, name string, domainOwnershipIdentifier DomainOwnershipIdentifier, options *DomainsClientUpdateOwnershipIdentifierOptions) (DomainsClientUpdateOwnershipIdentifierResponse, error) { + var err error + const operationName = "DomainsClient.UpdateOwnershipIdentifier" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateOwnershipIdentifierCreateRequest(ctx, resourceGroupName, domainName, name, domainOwnershipIdentifier, options) if err != nil { return DomainsClientUpdateOwnershipIdentifierResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return DomainsClientUpdateOwnershipIdentifierResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return DomainsClientUpdateOwnershipIdentifierResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return DomainsClientUpdateOwnershipIdentifierResponse{}, err } - return client.updateOwnershipIdentifierHandleResponse(resp) + resp, err := client.updateOwnershipIdentifierHandleResponse(httpResp) + return resp, err } // updateOwnershipIdentifierCreateRequest creates the UpdateOwnershipIdentifier request. @@ -966,10 +1045,13 @@ func (client *DomainsClient) updateOwnershipIdentifierCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, domainOwnershipIdentifier) + if err := runtime.MarshalAsJSON(req, domainOwnershipIdentifier); err != nil { + return nil, err + } + return req, nil } // updateOwnershipIdentifierHandleResponse handles the UpdateOwnershipIdentifier response. diff --git a/sdk/resourcemanager/appservice/armappservice/domains_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/domains_client_example_test.go deleted file mode 100644 index 4b303638bf48..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/domains_client_example_test.go +++ /dev/null @@ -1,1196 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappservice_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.DomainRegistration/stable/2022-09-01/examples/CheckDomainAvailability.json -func ExampleDomainsClient_CheckAvailability() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDomainsClient().CheckAvailability(ctx, armappservice.NameIdentifier{ - Name: to.Ptr("abcd.com"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DomainAvailabilityCheckResult = armappservice.DomainAvailabilityCheckResult{ - // Name: to.Ptr("abcd.com"), - // Available: to.Ptr(true), - // DomainType: to.Ptr(armappservice.DomainTypeRegular), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.DomainRegistration/stable/2022-09-01/examples/ListDomainsBySubscription.json -func ExampleDomainsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDomainsClient().NewListPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DomainCollection = armappservice.DomainCollection{ - // Value: []*armappservice.Domain{ - // { - // Name: to.Ptr("example.com"), - // Type: to.Ptr("Microsoft.DomainRegistration/domains"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.DomainRegistration/domains/example.com"), - // Location: to.Ptr("global"), - // Tags: map[string]*string{ - // }, - // Properties: &armappservice.DomainProperties{ - // AuthCode: to.Ptr("exampleAuthCode"), - // AutoRenew: to.Ptr(true), - // Consent: &armappservice.DomainPurchaseConsent{ - // AgreedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-10T19:30:53Z"); return t}()), - // AgreedBy: to.Ptr("192.0.2.1"), - // AgreementKeys: []*string{ - // to.Ptr("agreementKey1")}, - // }, - // ContactAdmin: &armappservice.Contact{ - // AddressMailing: &armappservice.Address{ - // Address1: to.Ptr("3400 State St"), - // City: to.Ptr("Chicago"), - // Country: to.Ptr("United States"), - // PostalCode: to.Ptr("67098"), - // State: to.Ptr("IL"), - // }, - // Email: to.Ptr("admin@email.com"), - // Fax: to.Ptr("1-245-534-2242"), - // JobTitle: to.Ptr("Admin"), - // NameFirst: to.Ptr("John"), - // NameLast: to.Ptr("Doe"), - // NameMiddle: to.Ptr(""), - // Organization: to.Ptr("Microsoft Inc."), - // Phone: to.Ptr("1-245-534-2242"), - // }, - // ContactBilling: &armappservice.Contact{ - // AddressMailing: &armappservice.Address{ - // Address1: to.Ptr("3400 State St"), - // City: to.Ptr("Chicago"), - // Country: to.Ptr("United States"), - // PostalCode: to.Ptr("67098"), - // State: to.Ptr("IL"), - // }, - // Email: to.Ptr("billing@email.com"), - // Fax: to.Ptr("1-245-534-2242"), - // JobTitle: to.Ptr("Billing"), - // NameFirst: to.Ptr("John"), - // NameLast: to.Ptr("Doe"), - // NameMiddle: to.Ptr(""), - // Organization: to.Ptr("Microsoft Inc."), - // Phone: to.Ptr("1-245-534-2242"), - // }, - // ContactRegistrant: &armappservice.Contact{ - // AddressMailing: &armappservice.Address{ - // Address1: to.Ptr("3400 State St"), - // City: to.Ptr("Chicago"), - // Country: to.Ptr("United States"), - // PostalCode: to.Ptr("67098"), - // State: to.Ptr("IL"), - // }, - // Email: to.Ptr("registrant@email.com"), - // Fax: to.Ptr("1-245-534-2242"), - // JobTitle: to.Ptr("Registrant"), - // NameFirst: to.Ptr("John"), - // NameLast: to.Ptr("Doe"), - // NameMiddle: to.Ptr(""), - // Organization: to.Ptr("Microsoft Inc."), - // Phone: to.Ptr("1-245-534-2242"), - // }, - // ContactTech: &armappservice.Contact{ - // AddressMailing: &armappservice.Address{ - // Address1: to.Ptr("3400 State St"), - // City: to.Ptr("Chicago"), - // Country: to.Ptr("United States"), - // PostalCode: to.Ptr("67098"), - // State: to.Ptr("IL"), - // }, - // Email: to.Ptr("tech@email.com"), - // Fax: to.Ptr("1-245-534-2242"), - // JobTitle: to.Ptr("Tech"), - // NameFirst: to.Ptr("John"), - // NameLast: to.Ptr("Doe"), - // NameMiddle: to.Ptr(""), - // Organization: to.Ptr("Microsoft Inc."), - // Phone: to.Ptr("1-245-534-2242"), - // }, - // CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-10T19:30:53Z"); return t}()), - // DNSType: to.Ptr(armappservice.DNSTypeDefaultDomainRegistrarDNS), - // DomainNotRenewableReasons: []*armappservice.ResourceNotRenewableReason{ - // to.Ptr(armappservice.ResourceNotRenewableReasonExpirationNotInRenewalTimeRange)}, - // ExpirationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-10T19:30:53Z"); return t}()), - // ManagedHostNames: []*armappservice.HostName{ - // }, - // NameServers: []*string{ - // to.Ptr("ns01.ote.domaincontrol.com"), - // to.Ptr("ns02.ote.domaincontrol.com")}, - // Privacy: to.Ptr(false), - // ProvisioningState: to.Ptr(armappservice.ProvisioningStateSucceeded), - // ReadyForDNSRecordManagement: to.Ptr(true), - // RegistrationStatus: to.Ptr(armappservice.DomainStatusActive), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.DomainRegistration/stable/2022-09-01/examples/GetDomainControlCenterSsoRequest.json -func ExampleDomainsClient_GetControlCenterSsoRequest() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDomainsClient().GetControlCenterSsoRequest(ctx, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DomainControlCenterSsoRequest = armappservice.DomainControlCenterSsoRequest{ - // PostParameterKey: to.Ptr("saml"), - // PostParameterValue: to.Ptr("1242sds|k1340"), - // URL: to.Ptr("https://Reseller.provider.com/?xRequestId=sdsdsds&app=dcc"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.DomainRegistration/stable/2022-09-01/examples/ListDomainRecommendations.json -func ExampleDomainsClient_NewListRecommendationsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDomainsClient().NewListRecommendationsPager(armappservice.DomainRecommendationSearchParameters{ - Keywords: to.Ptr("example1"), - MaxDomainRecommendations: to.Ptr[int32](10), - }, nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.NameIdentifierCollection = armappservice.NameIdentifierCollection{ - // Value: []*armappservice.NameIdentifier{ - // { - // Name: to.Ptr("domainnamesuggestion1"), - // }, - // { - // Name: to.Ptr("domainnamesuggestion2"), - // }, - // { - // Name: to.Ptr("domainnamesuggestion3"), - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.DomainRegistration/stable/2022-09-01/examples/ListDomainsByResourceGroup.json -func ExampleDomainsClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDomainsClient().NewListByResourceGroupPager("testrg123", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DomainCollection = armappservice.DomainCollection{ - // Value: []*armappservice.Domain{ - // { - // Name: to.Ptr("example.com"), - // Type: to.Ptr("Microsoft.DomainRegistration/domains"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.DomainRegistration/domains/example.com"), - // Location: to.Ptr("global"), - // Tags: map[string]*string{ - // }, - // Properties: &armappservice.DomainProperties{ - // AuthCode: to.Ptr("exampleAuthCode"), - // AutoRenew: to.Ptr(true), - // Consent: &armappservice.DomainPurchaseConsent{ - // AgreedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-10T19:30:53Z"); return t}()), - // AgreedBy: to.Ptr("192.0.2.1"), - // AgreementKeys: []*string{ - // to.Ptr("agreementKey1")}, - // }, - // ContactAdmin: &armappservice.Contact{ - // AddressMailing: &armappservice.Address{ - // Address1: to.Ptr("3400 State St"), - // City: to.Ptr("Chicago"), - // Country: to.Ptr("United States"), - // PostalCode: to.Ptr("67098"), - // State: to.Ptr("IL"), - // }, - // Email: to.Ptr("admin@email.com"), - // Fax: to.Ptr("1-245-534-2242"), - // JobTitle: to.Ptr("Admin"), - // NameFirst: to.Ptr("John"), - // NameLast: to.Ptr("Doe"), - // NameMiddle: to.Ptr(""), - // Organization: to.Ptr("Microsoft Inc."), - // Phone: to.Ptr("1-245-534-2242"), - // }, - // ContactBilling: &armappservice.Contact{ - // AddressMailing: &armappservice.Address{ - // Address1: to.Ptr("3400 State St"), - // City: to.Ptr("Chicago"), - // Country: to.Ptr("United States"), - // PostalCode: to.Ptr("67098"), - // State: to.Ptr("IL"), - // }, - // Email: to.Ptr("billing@email.com"), - // Fax: to.Ptr("1-245-534-2242"), - // JobTitle: to.Ptr("Billing"), - // NameFirst: to.Ptr("John"), - // NameLast: to.Ptr("Doe"), - // NameMiddle: to.Ptr(""), - // Organization: to.Ptr("Microsoft Inc."), - // Phone: to.Ptr("1-245-534-2242"), - // }, - // ContactRegistrant: &armappservice.Contact{ - // AddressMailing: &armappservice.Address{ - // Address1: to.Ptr("3400 State St"), - // City: to.Ptr("Chicago"), - // Country: to.Ptr("United States"), - // PostalCode: to.Ptr("67098"), - // State: to.Ptr("IL"), - // }, - // Email: to.Ptr("registrant@email.com"), - // Fax: to.Ptr("1-245-534-2242"), - // JobTitle: to.Ptr("Registrant"), - // NameFirst: to.Ptr("John"), - // NameLast: to.Ptr("Doe"), - // NameMiddle: to.Ptr(""), - // Organization: to.Ptr("Microsoft Inc."), - // Phone: to.Ptr("1-245-534-2242"), - // }, - // ContactTech: &armappservice.Contact{ - // AddressMailing: &armappservice.Address{ - // Address1: to.Ptr("3400 State St"), - // City: to.Ptr("Chicago"), - // Country: to.Ptr("United States"), - // PostalCode: to.Ptr("67098"), - // State: to.Ptr("IL"), - // }, - // Email: to.Ptr("tech@email.com"), - // Fax: to.Ptr("1-245-534-2242"), - // JobTitle: to.Ptr("Tech"), - // NameFirst: to.Ptr("John"), - // NameLast: to.Ptr("Doe"), - // NameMiddle: to.Ptr(""), - // Organization: to.Ptr("Microsoft Inc."), - // Phone: to.Ptr("1-245-534-2242"), - // }, - // CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-10T19:30:53Z"); return t}()), - // DNSType: to.Ptr(armappservice.DNSTypeDefaultDomainRegistrarDNS), - // DomainNotRenewableReasons: []*armappservice.ResourceNotRenewableReason{ - // to.Ptr(armappservice.ResourceNotRenewableReasonExpirationNotInRenewalTimeRange)}, - // ExpirationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-10T19:30:53Z"); return t}()), - // ManagedHostNames: []*armappservice.HostName{ - // }, - // NameServers: []*string{ - // to.Ptr("ns01.ote.domaincontrol.com"), - // to.Ptr("ns02.ote.domaincontrol.com")}, - // Privacy: to.Ptr(false), - // ProvisioningState: to.Ptr(armappservice.ProvisioningStateSucceeded), - // ReadyForDNSRecordManagement: to.Ptr(true), - // RegistrationStatus: to.Ptr(armappservice.DomainStatusActive), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.DomainRegistration/stable/2022-09-01/examples/GetDomain.json -func ExampleDomainsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDomainsClient().Get(ctx, "testrg123", "example.com", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Domain = armappservice.Domain{ - // Name: to.Ptr("example.com"), - // Type: to.Ptr("Microsoft.DomainRegistration/domains"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.DomainRegistration/domains/example.com"), - // Location: to.Ptr("global"), - // Tags: map[string]*string{ - // }, - // Properties: &armappservice.DomainProperties{ - // AuthCode: to.Ptr("exampleAuthCode"), - // AutoRenew: to.Ptr(true), - // Consent: &armappservice.DomainPurchaseConsent{ - // AgreedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-10T19:30:53Z"); return t}()), - // AgreedBy: to.Ptr("192.0.2.1"), - // AgreementKeys: []*string{ - // to.Ptr("agreementKey1")}, - // }, - // ContactAdmin: &armappservice.Contact{ - // AddressMailing: &armappservice.Address{ - // Address1: to.Ptr("3400 State St"), - // City: to.Ptr("Chicago"), - // Country: to.Ptr("United States"), - // PostalCode: to.Ptr("67098"), - // State: to.Ptr("IL"), - // }, - // Email: to.Ptr("admin@email.com"), - // Fax: to.Ptr("1-245-534-2242"), - // JobTitle: to.Ptr("Admin"), - // NameFirst: to.Ptr("John"), - // NameLast: to.Ptr("Doe"), - // NameMiddle: to.Ptr(""), - // Organization: to.Ptr("Microsoft Inc."), - // Phone: to.Ptr("1-245-534-2242"), - // }, - // ContactBilling: &armappservice.Contact{ - // AddressMailing: &armappservice.Address{ - // Address1: to.Ptr("3400 State St"), - // City: to.Ptr("Chicago"), - // Country: to.Ptr("United States"), - // PostalCode: to.Ptr("67098"), - // State: to.Ptr("IL"), - // }, - // Email: to.Ptr("billing@email.com"), - // Fax: to.Ptr("1-245-534-2242"), - // JobTitle: to.Ptr("Billing"), - // NameFirst: to.Ptr("John"), - // NameLast: to.Ptr("Doe"), - // NameMiddle: to.Ptr(""), - // Organization: to.Ptr("Microsoft Inc."), - // Phone: to.Ptr("1-245-534-2242"), - // }, - // ContactRegistrant: &armappservice.Contact{ - // AddressMailing: &armappservice.Address{ - // Address1: to.Ptr("3400 State St"), - // City: to.Ptr("Chicago"), - // Country: to.Ptr("United States"), - // PostalCode: to.Ptr("67098"), - // State: to.Ptr("IL"), - // }, - // Email: to.Ptr("registrant@email.com"), - // Fax: to.Ptr("1-245-534-2242"), - // JobTitle: to.Ptr("Registrant"), - // NameFirst: to.Ptr("John"), - // NameLast: to.Ptr("Doe"), - // NameMiddle: to.Ptr(""), - // Organization: to.Ptr("Microsoft Inc."), - // Phone: to.Ptr("1-245-534-2242"), - // }, - // ContactTech: &armappservice.Contact{ - // AddressMailing: &armappservice.Address{ - // Address1: to.Ptr("3400 State St"), - // City: to.Ptr("Chicago"), - // Country: to.Ptr("United States"), - // PostalCode: to.Ptr("67098"), - // State: to.Ptr("IL"), - // }, - // Email: to.Ptr("tech@email.com"), - // Fax: to.Ptr("1-245-534-2242"), - // JobTitle: to.Ptr("Tech"), - // NameFirst: to.Ptr("John"), - // NameLast: to.Ptr("Doe"), - // NameMiddle: to.Ptr(""), - // Organization: to.Ptr("Microsoft Inc."), - // Phone: to.Ptr("1-245-534-2242"), - // }, - // CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-10T19:30:53Z"); return t}()), - // DNSType: to.Ptr(armappservice.DNSTypeDefaultDomainRegistrarDNS), - // DomainNotRenewableReasons: []*armappservice.ResourceNotRenewableReason{ - // to.Ptr(armappservice.ResourceNotRenewableReasonExpirationNotInRenewalTimeRange)}, - // ExpirationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-10T19:30:53Z"); return t}()), - // ManagedHostNames: []*armappservice.HostName{ - // }, - // NameServers: []*string{ - // to.Ptr("ns01.ote.domaincontrol.com"), - // to.Ptr("ns02.ote.domaincontrol.com")}, - // Privacy: to.Ptr(false), - // ProvisioningState: to.Ptr(armappservice.ProvisioningStateSucceeded), - // ReadyForDNSRecordManagement: to.Ptr(true), - // RegistrationStatus: to.Ptr(armappservice.DomainStatusActive), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.DomainRegistration/stable/2022-09-01/examples/CreateAppServiceDomain.json -func ExampleDomainsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewDomainsClient().BeginCreateOrUpdate(ctx, "testrg123", "example.com", armappservice.Domain{ - Location: to.Ptr("global"), - Tags: map[string]*string{}, - Properties: &armappservice.DomainProperties{ - AuthCode: to.Ptr("exampleAuthCode"), - AutoRenew: to.Ptr(true), - Consent: &armappservice.DomainPurchaseConsent{ - AgreedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-10T19:30:53Z"); return t }()), - AgreedBy: to.Ptr("192.0.2.1"), - AgreementKeys: []*string{ - to.Ptr("agreementKey1")}, - }, - ContactAdmin: &armappservice.Contact{ - AddressMailing: &armappservice.Address{ - Address1: to.Ptr("3400 State St"), - City: to.Ptr("Chicago"), - Country: to.Ptr("United States"), - PostalCode: to.Ptr("67098"), - State: to.Ptr("IL"), - }, - Email: to.Ptr("admin@email.com"), - Fax: to.Ptr("1-245-534-2242"), - JobTitle: to.Ptr("Admin"), - NameFirst: to.Ptr("John"), - NameLast: to.Ptr("Doe"), - NameMiddle: to.Ptr(""), - Organization: to.Ptr("Microsoft Inc."), - Phone: to.Ptr("1-245-534-2242"), - }, - ContactBilling: &armappservice.Contact{ - AddressMailing: &armappservice.Address{ - Address1: to.Ptr("3400 State St"), - City: to.Ptr("Chicago"), - Country: to.Ptr("United States"), - PostalCode: to.Ptr("67098"), - State: to.Ptr("IL"), - }, - Email: to.Ptr("billing@email.com"), - Fax: to.Ptr("1-245-534-2242"), - JobTitle: to.Ptr("Billing"), - NameFirst: to.Ptr("John"), - NameLast: to.Ptr("Doe"), - NameMiddle: to.Ptr(""), - Organization: to.Ptr("Microsoft Inc."), - Phone: to.Ptr("1-245-534-2242"), - }, - ContactRegistrant: &armappservice.Contact{ - AddressMailing: &armappservice.Address{ - Address1: to.Ptr("3400 State St"), - City: to.Ptr("Chicago"), - Country: to.Ptr("United States"), - PostalCode: to.Ptr("67098"), - State: to.Ptr("IL"), - }, - Email: to.Ptr("registrant@email.com"), - Fax: to.Ptr("1-245-534-2242"), - JobTitle: to.Ptr("Registrant"), - NameFirst: to.Ptr("John"), - NameLast: to.Ptr("Doe"), - NameMiddle: to.Ptr(""), - Organization: to.Ptr("Microsoft Inc."), - Phone: to.Ptr("1-245-534-2242"), - }, - ContactTech: &armappservice.Contact{ - AddressMailing: &armappservice.Address{ - Address1: to.Ptr("3400 State St"), - City: to.Ptr("Chicago"), - Country: to.Ptr("United States"), - PostalCode: to.Ptr("67098"), - State: to.Ptr("IL"), - }, - Email: to.Ptr("tech@email.com"), - Fax: to.Ptr("1-245-534-2242"), - JobTitle: to.Ptr("Tech"), - NameFirst: to.Ptr("John"), - NameLast: to.Ptr("Doe"), - NameMiddle: to.Ptr(""), - Organization: to.Ptr("Microsoft Inc."), - Phone: to.Ptr("1-245-534-2242"), - }, - DNSType: to.Ptr(armappservice.DNSTypeDefaultDomainRegistrarDNS), - Privacy: to.Ptr(false), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Domain = armappservice.Domain{ - // Name: to.Ptr("example.com"), - // Type: to.Ptr("Microsoft.DomainRegistration/domains"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.DomainRegistration/domains/example.com"), - // Location: to.Ptr("global"), - // Tags: map[string]*string{ - // }, - // Properties: &armappservice.DomainProperties{ - // AuthCode: to.Ptr("exampleAuthCode"), - // AutoRenew: to.Ptr(true), - // Consent: &armappservice.DomainPurchaseConsent{ - // AgreedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-10T19:30:53Z"); return t}()), - // AgreedBy: to.Ptr("192.0.2.1"), - // AgreementKeys: []*string{ - // to.Ptr("agreementKey1")}, - // }, - // ContactAdmin: &armappservice.Contact{ - // AddressMailing: &armappservice.Address{ - // Address1: to.Ptr("3400 State St"), - // City: to.Ptr("Chicago"), - // Country: to.Ptr("United States"), - // PostalCode: to.Ptr("67098"), - // State: to.Ptr("IL"), - // }, - // Email: to.Ptr("admin@email.com"), - // Fax: to.Ptr("1-245-534-2242"), - // JobTitle: to.Ptr("Admin"), - // NameFirst: to.Ptr("John"), - // NameLast: to.Ptr("Doe"), - // NameMiddle: to.Ptr(""), - // Organization: to.Ptr("Microsoft Inc."), - // Phone: to.Ptr("1-245-534-2242"), - // }, - // ContactBilling: &armappservice.Contact{ - // AddressMailing: &armappservice.Address{ - // Address1: to.Ptr("3400 State St"), - // City: to.Ptr("Chicago"), - // Country: to.Ptr("United States"), - // PostalCode: to.Ptr("67098"), - // State: to.Ptr("IL"), - // }, - // Email: to.Ptr("billing@email.com"), - // Fax: to.Ptr("1-245-534-2242"), - // JobTitle: to.Ptr("Billing"), - // NameFirst: to.Ptr("John"), - // NameLast: to.Ptr("Doe"), - // NameMiddle: to.Ptr(""), - // Organization: to.Ptr("Microsoft Inc."), - // Phone: to.Ptr("1-245-534-2242"), - // }, - // ContactRegistrant: &armappservice.Contact{ - // AddressMailing: &armappservice.Address{ - // Address1: to.Ptr("3400 State St"), - // City: to.Ptr("Chicago"), - // Country: to.Ptr("United States"), - // PostalCode: to.Ptr("67098"), - // State: to.Ptr("IL"), - // }, - // Email: to.Ptr("registrant@email.com"), - // Fax: to.Ptr("1-245-534-2242"), - // JobTitle: to.Ptr("Registrant"), - // NameFirst: to.Ptr("John"), - // NameLast: to.Ptr("Doe"), - // NameMiddle: to.Ptr(""), - // Organization: to.Ptr("Microsoft Inc."), - // Phone: to.Ptr("1-245-534-2242"), - // }, - // ContactTech: &armappservice.Contact{ - // AddressMailing: &armappservice.Address{ - // Address1: to.Ptr("3400 State St"), - // City: to.Ptr("Chicago"), - // Country: to.Ptr("United States"), - // PostalCode: to.Ptr("67098"), - // State: to.Ptr("IL"), - // }, - // Email: to.Ptr("tech@email.com"), - // Fax: to.Ptr("1-245-534-2242"), - // JobTitle: to.Ptr("Tech"), - // NameFirst: to.Ptr("John"), - // NameLast: to.Ptr("Doe"), - // NameMiddle: to.Ptr(""), - // Organization: to.Ptr("Microsoft Inc."), - // Phone: to.Ptr("1-245-534-2242"), - // }, - // CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-10T19:30:53Z"); return t}()), - // DNSType: to.Ptr(armappservice.DNSTypeDefaultDomainRegistrarDNS), - // DomainNotRenewableReasons: []*armappservice.ResourceNotRenewableReason{ - // to.Ptr(armappservice.ResourceNotRenewableReasonExpirationNotInRenewalTimeRange)}, - // ExpirationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-10T19:30:53Z"); return t}()), - // ManagedHostNames: []*armappservice.HostName{ - // }, - // NameServers: []*string{ - // to.Ptr("ns01.ote.domaincontrol.com"), - // to.Ptr("ns02.ote.domaincontrol.com")}, - // Privacy: to.Ptr(false), - // ProvisioningState: to.Ptr(armappservice.ProvisioningStateSucceeded), - // ReadyForDNSRecordManagement: to.Ptr(true), - // RegistrationStatus: to.Ptr(armappservice.DomainStatusActive), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.DomainRegistration/stable/2022-09-01/examples/DeleteAppServiceDomain.json -func ExampleDomainsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewDomainsClient().Delete(ctx, "testrg123", "example.com", &armappservice.DomainsClientDeleteOptions{ForceHardDeleteDomain: to.Ptr(true)}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.DomainRegistration/stable/2022-09-01/examples/UpdateAppServiceDomain.json -func ExampleDomainsClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDomainsClient().Update(ctx, "testrg123", "example.com", armappservice.DomainPatchResource{ - Properties: &armappservice.DomainPatchResourceProperties{ - AuthCode: to.Ptr("exampleAuthCode"), - AutoRenew: to.Ptr(true), - Consent: &armappservice.DomainPurchaseConsent{ - AgreedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-10T19:30:53Z"); return t }()), - AgreedBy: to.Ptr("192.0.2.1"), - AgreementKeys: []*string{ - to.Ptr("agreementKey1")}, - }, - ContactAdmin: &armappservice.Contact{ - AddressMailing: &armappservice.Address{ - Address1: to.Ptr("3400 State St"), - City: to.Ptr("Chicago"), - Country: to.Ptr("United States"), - PostalCode: to.Ptr("67098"), - State: to.Ptr("IL"), - }, - Email: to.Ptr("admin@email.com"), - Fax: to.Ptr("1-245-534-2242"), - JobTitle: to.Ptr("Admin"), - NameFirst: to.Ptr("John"), - NameLast: to.Ptr("Doe"), - NameMiddle: to.Ptr(""), - Organization: to.Ptr("Microsoft Inc."), - Phone: to.Ptr("1-245-534-2242"), - }, - ContactBilling: &armappservice.Contact{ - AddressMailing: &armappservice.Address{ - Address1: to.Ptr("3400 State St"), - City: to.Ptr("Chicago"), - Country: to.Ptr("United States"), - PostalCode: to.Ptr("67098"), - State: to.Ptr("IL"), - }, - Email: to.Ptr("billing@email.com"), - Fax: to.Ptr("1-245-534-2242"), - JobTitle: to.Ptr("Billing"), - NameFirst: to.Ptr("John"), - NameLast: to.Ptr("Doe"), - NameMiddle: to.Ptr(""), - Organization: to.Ptr("Microsoft Inc."), - Phone: to.Ptr("1-245-534-2242"), - }, - ContactRegistrant: &armappservice.Contact{ - AddressMailing: &armappservice.Address{ - Address1: to.Ptr("3400 State St"), - City: to.Ptr("Chicago"), - Country: to.Ptr("United States"), - PostalCode: to.Ptr("67098"), - State: to.Ptr("IL"), - }, - Email: to.Ptr("registrant@email.com"), - Fax: to.Ptr("1-245-534-2242"), - JobTitle: to.Ptr("Registrant"), - NameFirst: to.Ptr("John"), - NameLast: to.Ptr("Doe"), - NameMiddle: to.Ptr(""), - Organization: to.Ptr("Microsoft Inc."), - Phone: to.Ptr("1-245-534-2242"), - }, - ContactTech: &armappservice.Contact{ - AddressMailing: &armappservice.Address{ - Address1: to.Ptr("3400 State St"), - City: to.Ptr("Chicago"), - Country: to.Ptr("United States"), - PostalCode: to.Ptr("67098"), - State: to.Ptr("IL"), - }, - Email: to.Ptr("tech@email.com"), - Fax: to.Ptr("1-245-534-2242"), - JobTitle: to.Ptr("Tech"), - NameFirst: to.Ptr("John"), - NameLast: to.Ptr("Doe"), - NameMiddle: to.Ptr(""), - Organization: to.Ptr("Microsoft Inc."), - Phone: to.Ptr("1-245-534-2242"), - }, - DNSType: to.Ptr(armappservice.DNSTypeDefaultDomainRegistrarDNS), - Privacy: to.Ptr(false), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Domain = armappservice.Domain{ - // Name: to.Ptr("example.com"), - // Type: to.Ptr("Microsoft.DomainRegistration/domains"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.DomainRegistration/domains/example.com"), - // Location: to.Ptr("global"), - // Tags: map[string]*string{ - // }, - // Properties: &armappservice.DomainProperties{ - // AuthCode: to.Ptr("exampleAuthCode"), - // AutoRenew: to.Ptr(true), - // Consent: &armappservice.DomainPurchaseConsent{ - // AgreedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-10T19:30:53Z"); return t}()), - // AgreedBy: to.Ptr("192.0.2.1"), - // AgreementKeys: []*string{ - // to.Ptr("agreementKey1")}, - // }, - // ContactAdmin: &armappservice.Contact{ - // AddressMailing: &armappservice.Address{ - // Address1: to.Ptr("3400 State St"), - // City: to.Ptr("Chicago"), - // Country: to.Ptr("United States"), - // PostalCode: to.Ptr("67098"), - // State: to.Ptr("IL"), - // }, - // Email: to.Ptr("admin@email.com"), - // Fax: to.Ptr("1-245-534-2242"), - // JobTitle: to.Ptr("Admin"), - // NameFirst: to.Ptr("John"), - // NameLast: to.Ptr("Doe"), - // NameMiddle: to.Ptr(""), - // Organization: to.Ptr("Microsoft Inc."), - // Phone: to.Ptr("1-245-534-2242"), - // }, - // ContactBilling: &armappservice.Contact{ - // AddressMailing: &armappservice.Address{ - // Address1: to.Ptr("3400 State St"), - // City: to.Ptr("Chicago"), - // Country: to.Ptr("United States"), - // PostalCode: to.Ptr("67098"), - // State: to.Ptr("IL"), - // }, - // Email: to.Ptr("billing@email.com"), - // Fax: to.Ptr("1-245-534-2242"), - // JobTitle: to.Ptr("Billing"), - // NameFirst: to.Ptr("John"), - // NameLast: to.Ptr("Doe"), - // NameMiddle: to.Ptr(""), - // Organization: to.Ptr("Microsoft Inc."), - // Phone: to.Ptr("1-245-534-2242"), - // }, - // ContactRegistrant: &armappservice.Contact{ - // AddressMailing: &armappservice.Address{ - // Address1: to.Ptr("3400 State St"), - // City: to.Ptr("Chicago"), - // Country: to.Ptr("United States"), - // PostalCode: to.Ptr("67098"), - // State: to.Ptr("IL"), - // }, - // Email: to.Ptr("registrant@email.com"), - // Fax: to.Ptr("1-245-534-2242"), - // JobTitle: to.Ptr("Registrant"), - // NameFirst: to.Ptr("John"), - // NameLast: to.Ptr("Doe"), - // NameMiddle: to.Ptr(""), - // Organization: to.Ptr("Microsoft Inc."), - // Phone: to.Ptr("1-245-534-2242"), - // }, - // ContactTech: &armappservice.Contact{ - // AddressMailing: &armappservice.Address{ - // Address1: to.Ptr("3400 State St"), - // City: to.Ptr("Chicago"), - // Country: to.Ptr("United States"), - // PostalCode: to.Ptr("67098"), - // State: to.Ptr("IL"), - // }, - // Email: to.Ptr("tech@email.com"), - // Fax: to.Ptr("1-245-534-2242"), - // JobTitle: to.Ptr("Tech"), - // NameFirst: to.Ptr("John"), - // NameLast: to.Ptr("Doe"), - // NameMiddle: to.Ptr(""), - // Organization: to.Ptr("Microsoft Inc."), - // Phone: to.Ptr("1-245-534-2242"), - // }, - // CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-10T19:30:53Z"); return t}()), - // DNSType: to.Ptr(armappservice.DNSTypeDefaultDomainRegistrarDNS), - // DomainNotRenewableReasons: []*armappservice.ResourceNotRenewableReason{ - // to.Ptr(armappservice.ResourceNotRenewableReasonExpirationNotInRenewalTimeRange)}, - // ExpirationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-10T19:30:53Z"); return t}()), - // ManagedHostNames: []*armappservice.HostName{ - // }, - // NameServers: []*string{ - // to.Ptr("ns01.ote.domaincontrol.com"), - // to.Ptr("ns02.ote.domaincontrol.com")}, - // Privacy: to.Ptr(false), - // ProvisioningState: to.Ptr(armappservice.ProvisioningStateSucceeded), - // ReadyForDNSRecordManagement: to.Ptr(true), - // RegistrationStatus: to.Ptr(armappservice.DomainStatusActive), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.DomainRegistration/stable/2022-09-01/examples/ListDomainOwnershipIdentifiers.json -func ExampleDomainsClient_NewListOwnershipIdentifiersPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewDomainsClient().NewListOwnershipIdentifiersPager("testrg123", "example.com", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DomainOwnershipIdentifierCollection = armappservice.DomainOwnershipIdentifierCollection{ - // Value: []*armappservice.DomainOwnershipIdentifier{ - // { - // Name: to.Ptr("SampleOwnershipId"), - // Type: to.Ptr("Microsoft.DomainRegistration/domains/domainownershipidentifiers"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.DomainRegistration/domains/example.com/domainownershipidentifiers/SampleOwnershipId"), - // Properties: &armappservice.DomainOwnershipIdentifierProperties{ - // OwnershipID: to.Ptr("SampleOwnershipId"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.DomainRegistration/stable/2022-09-01/examples/GetDomainOwnershipIdentifier.json -func ExampleDomainsClient_GetOwnershipIdentifier() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDomainsClient().GetOwnershipIdentifier(ctx, "testrg123", "example.com", "SampleOwnershipId", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DomainOwnershipIdentifier = armappservice.DomainOwnershipIdentifier{ - // Name: to.Ptr("SampleOwnershipId"), - // Type: to.Ptr("Microsoft.DomainRegistration/domains/domainownershipidentifiers"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.DomainRegistration/domains/example.com/domainownershipidentifiers/SampleOwnershipId"), - // Properties: &armappservice.DomainOwnershipIdentifierProperties{ - // OwnershipID: to.Ptr("SampleOwnershipId"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.DomainRegistration/stable/2022-09-01/examples/CreateAppServiceDomainOwnershipIdentifier.json -func ExampleDomainsClient_CreateOrUpdateOwnershipIdentifier() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDomainsClient().CreateOrUpdateOwnershipIdentifier(ctx, "testrg123", "example.com", "SampleOwnershipId", armappservice.DomainOwnershipIdentifier{ - Properties: &armappservice.DomainOwnershipIdentifierProperties{ - OwnershipID: to.Ptr("SampleOwnershipId"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DomainOwnershipIdentifier = armappservice.DomainOwnershipIdentifier{ - // Name: to.Ptr("SampleOwnershipId"), - // Type: to.Ptr("Microsoft.DomainRegistration/domains/domainownershipidentifiers"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.DomainRegistration/domains/example.com/domainownershipidentifiers/SampleOwnershipId"), - // Properties: &armappservice.DomainOwnershipIdentifierProperties{ - // OwnershipID: to.Ptr("SampleOwnershipId"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.DomainRegistration/stable/2022-09-01/examples/DeleteAppServiceDomainOwnershipIdentifier.json -func ExampleDomainsClient_DeleteOwnershipIdentifier() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewDomainsClient().DeleteOwnershipIdentifier(ctx, "testrg123", "example.com", "ownershipIdentifier", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.DomainRegistration/stable/2022-09-01/examples/UpdateAppServiceDomainOwnershipIdentifier.json -func ExampleDomainsClient_UpdateOwnershipIdentifier() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDomainsClient().UpdateOwnershipIdentifier(ctx, "testrg123", "example.com", "SampleOwnershipId", armappservice.DomainOwnershipIdentifier{ - Properties: &armappservice.DomainOwnershipIdentifierProperties{ - OwnershipID: to.Ptr("SampleOwnershipId"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DomainOwnershipIdentifier = armappservice.DomainOwnershipIdentifier{ - // Name: to.Ptr("SampleOwnershipId"), - // Type: to.Ptr("Microsoft.DomainRegistration/domains/domainownershipidentifiers"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.DomainRegistration/domains/example.com/domainownershipidentifiers/SampleOwnershipId"), - // Properties: &armappservice.DomainOwnershipIdentifierProperties{ - // OwnershipID: to.Ptr("SampleOwnershipId"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.DomainRegistration/stable/2022-09-01/examples/RenewDomain.json -func ExampleDomainsClient_Renew() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewDomainsClient().Renew(ctx, "RG", "example.com", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.DomainRegistration/stable/2022-09-01/examples/TransferOutDomain.json -func ExampleDomainsClient_TransferOut() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewDomainsClient().TransferOut(ctx, "testrg123", "example.com", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Domain = armappservice.Domain{ - // Name: to.Ptr("example.com"), - // Type: to.Ptr("Microsoft.DomainRegistration/domains"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.DomainRegistration/domains/example.com"), - // Location: to.Ptr("global"), - // Tags: map[string]*string{ - // }, - // Properties: &armappservice.DomainProperties{ - // AuthCode: to.Ptr("exampleAuthCode"), - // AutoRenew: to.Ptr(true), - // Consent: &armappservice.DomainPurchaseConsent{ - // AgreedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-10T19:30:53Z"); return t}()), - // AgreedBy: to.Ptr("192.0.2.1"), - // AgreementKeys: []*string{ - // to.Ptr("agreementKey1")}, - // }, - // ContactAdmin: &armappservice.Contact{ - // AddressMailing: &armappservice.Address{ - // Address1: to.Ptr("3400 State St"), - // City: to.Ptr("Chicago"), - // Country: to.Ptr("United States"), - // PostalCode: to.Ptr("67098"), - // State: to.Ptr("IL"), - // }, - // Email: to.Ptr("admin@email.com"), - // Fax: to.Ptr("1-245-534-2242"), - // JobTitle: to.Ptr("Admin"), - // NameFirst: to.Ptr("John"), - // NameLast: to.Ptr("Doe"), - // NameMiddle: to.Ptr(""), - // Organization: to.Ptr("Microsoft Inc."), - // Phone: to.Ptr("1-245-534-2242"), - // }, - // ContactBilling: &armappservice.Contact{ - // AddressMailing: &armappservice.Address{ - // Address1: to.Ptr("3400 State St"), - // City: to.Ptr("Chicago"), - // Country: to.Ptr("United States"), - // PostalCode: to.Ptr("67098"), - // State: to.Ptr("IL"), - // }, - // Email: to.Ptr("billing@email.com"), - // Fax: to.Ptr("1-245-534-2242"), - // JobTitle: to.Ptr("Billing"), - // NameFirst: to.Ptr("John"), - // NameLast: to.Ptr("Doe"), - // NameMiddle: to.Ptr(""), - // Organization: to.Ptr("Microsoft Inc."), - // Phone: to.Ptr("1-245-534-2242"), - // }, - // ContactRegistrant: &armappservice.Contact{ - // AddressMailing: &armappservice.Address{ - // Address1: to.Ptr("3400 State St"), - // City: to.Ptr("Chicago"), - // Country: to.Ptr("United States"), - // PostalCode: to.Ptr("67098"), - // State: to.Ptr("IL"), - // }, - // Email: to.Ptr("registrant@email.com"), - // Fax: to.Ptr("1-245-534-2242"), - // JobTitle: to.Ptr("Registrant"), - // NameFirst: to.Ptr("John"), - // NameLast: to.Ptr("Doe"), - // NameMiddle: to.Ptr(""), - // Organization: to.Ptr("Microsoft Inc."), - // Phone: to.Ptr("1-245-534-2242"), - // }, - // ContactTech: &armappservice.Contact{ - // AddressMailing: &armappservice.Address{ - // Address1: to.Ptr("3400 State St"), - // City: to.Ptr("Chicago"), - // Country: to.Ptr("United States"), - // PostalCode: to.Ptr("67098"), - // State: to.Ptr("IL"), - // }, - // Email: to.Ptr("tech@email.com"), - // Fax: to.Ptr("1-245-534-2242"), - // JobTitle: to.Ptr("Tech"), - // NameFirst: to.Ptr("John"), - // NameLast: to.Ptr("Doe"), - // NameMiddle: to.Ptr(""), - // Organization: to.Ptr("Microsoft Inc."), - // Phone: to.Ptr("1-245-534-2242"), - // }, - // CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-10T19:30:53Z"); return t}()), - // DNSType: to.Ptr(armappservice.DNSTypeDefaultDomainRegistrarDNS), - // DomainNotRenewableReasons: []*armappservice.ResourceNotRenewableReason{ - // to.Ptr(armappservice.ResourceNotRenewableReasonExpirationNotInRenewalTimeRange)}, - // ExpirationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-10T19:30:53Z"); return t}()), - // ManagedHostNames: []*armappservice.HostName{ - // }, - // NameServers: []*string{ - // to.Ptr("ns01.ote.domaincontrol.com"), - // to.Ptr("ns02.ote.domaincontrol.com")}, - // Privacy: to.Ptr(false), - // ProvisioningState: to.Ptr(armappservice.ProvisioningStateSucceeded), - // ReadyForDNSRecordManagement: to.Ptr(true), - // RegistrationStatus: to.Ptr(armappservice.DomainStatusActive), - // }, - // } -} diff --git a/sdk/resourcemanager/appservice/armappservice/environments_client.go b/sdk/resourcemanager/appservice/armappservice/environments_client.go index dd2e02f66222..239f65f221b8 100644 --- a/sdk/resourcemanager/appservice/armappservice/environments_client.go +++ b/sdk/resourcemanager/appservice/armappservice/environments_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappservice @@ -34,7 +33,7 @@ type EnvironmentsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewEnvironmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EnvironmentsClient, error) { - cl, err := arm.NewClient(moduleName+".EnvironmentsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,7 +47,7 @@ func NewEnvironmentsClient(subscriptionID string, credential azcore.TokenCredent // BeginApproveOrRejectPrivateEndpointConnection - Description for Approves or rejects a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - options - EnvironmentsClientBeginApproveOrRejectPrivateEndpointConnectionOptions contains the optional parameters for the @@ -59,29 +58,40 @@ func (client *EnvironmentsClient) BeginApproveOrRejectPrivateEndpointConnection( if err != nil { return nil, err } - return runtime.NewPoller[EnvironmentsClientApproveOrRejectPrivateEndpointConnectionResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[EnvironmentsClientApproveOrRejectPrivateEndpointConnectionResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[EnvironmentsClientApproveOrRejectPrivateEndpointConnectionResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[EnvironmentsClientApproveOrRejectPrivateEndpointConnectionResponse]{ + Tracer: client.internal.Tracer(), + }) } } // ApproveOrRejectPrivateEndpointConnection - Description for Approves or rejects a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *EnvironmentsClient) approveOrRejectPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper PrivateLinkConnectionApprovalRequestResource, options *EnvironmentsClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*http.Response, error) { + var err error + const operationName = "EnvironmentsClient.BeginApproveOrRejectPrivateEndpointConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.approveOrRejectPrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // approveOrRejectPrivateEndpointConnectionCreateRequest creates the ApproveOrRejectPrivateEndpointConnection request. @@ -108,15 +118,18 @@ func (client *EnvironmentsClient) approveOrRejectPrivateEndpointConnectionCreate return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, privateEndpointWrapper) + if err := runtime.MarshalAsJSON(req, privateEndpointWrapper); err != nil { + return nil, err + } + return req, nil } // BeginChangeVnet - Description for Move an App Service Environment to a different VNET. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - vnetInfo - Details for the new virtual network. @@ -128,51 +141,57 @@ func (client *EnvironmentsClient) BeginChangeVnet(ctx context.Context, resourceG return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *EnvironmentsClientChangeVnetResponse) (EnvironmentsClientChangeVnetResponse, error) { - req, err := runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.BeginChangeVnet") + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), *page.NextLink, func(ctx context.Context) (*policy.Request, error) { + return client.changeVnetCreateRequest(ctx, resourceGroupName, name, vnetInfo, options) + }, nil) if err != nil { return EnvironmentsClientChangeVnetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return EnvironmentsClientChangeVnetResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientChangeVnetResponse{}, runtime.NewResponseError(resp) - } return client.changeVnetHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) if options == nil || options.ResumeToken == "" { resp, err := client.changeVnet(ctx, resourceGroupName, name, vnetInfo, options) if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[*runtime.Pager[EnvironmentsClientChangeVnetResponse]]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[*runtime.Pager[EnvironmentsClientChangeVnetResponse]]{ Response: &pager, + Tracer: client.internal.Tracer(), }) + return poller, err } else { return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[*runtime.Pager[EnvironmentsClientChangeVnetResponse]]{ Response: &pager, + Tracer: client.internal.Tracer(), }) } } // ChangeVnet - Description for Move an App Service Environment to a different VNET. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *EnvironmentsClient) changeVnet(ctx context.Context, resourceGroupName string, name string, vnetInfo VirtualNetworkProfile, options *EnvironmentsClientBeginChangeVnetOptions) (*http.Response, error) { + var err error + const operationName = "EnvironmentsClient.BeginChangeVnet" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.changeVnetCreateRequest(ctx, resourceGroupName, name, vnetInfo, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // changeVnetCreateRequest creates the ChangeVnet request. @@ -195,10 +214,13 @@ func (client *EnvironmentsClient) changeVnetCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, vnetInfo) + if err := runtime.MarshalAsJSON(req, vnetInfo); err != nil { + return nil, err + } + return req, nil } // changeVnetHandleResponse handles the ChangeVnet response. @@ -213,7 +235,7 @@ func (client *EnvironmentsClient) changeVnetHandleResponse(resp *http.Response) // BeginCreateOrUpdate - Description for Create or update an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - hostingEnvironmentEnvelope - Configuration details of the App Service Environment. @@ -225,29 +247,40 @@ func (client *EnvironmentsClient) BeginCreateOrUpdate(ctx context.Context, resou if err != nil { return nil, err } - return runtime.NewPoller[EnvironmentsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[EnvironmentsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[EnvironmentsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[EnvironmentsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateOrUpdate - Description for Create or update an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *EnvironmentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, name string, hostingEnvironmentEnvelope EnvironmentResource, options *EnvironmentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "EnvironmentsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, name, hostingEnvironmentEnvelope, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -270,16 +303,19 @@ func (client *EnvironmentsClient) createOrUpdateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, hostingEnvironmentEnvelope) + if err := runtime.MarshalAsJSON(req, hostingEnvironmentEnvelope); err != nil { + return nil, err + } + return req, nil } // BeginCreateOrUpdateMultiRolePool - Description for Create or update a multi-role pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - multiRolePoolEnvelope - Properties of the multi-role pool. @@ -291,29 +327,40 @@ func (client *EnvironmentsClient) BeginCreateOrUpdateMultiRolePool(ctx context.C if err != nil { return nil, err } - return runtime.NewPoller[EnvironmentsClientCreateOrUpdateMultiRolePoolResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[EnvironmentsClientCreateOrUpdateMultiRolePoolResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[EnvironmentsClientCreateOrUpdateMultiRolePoolResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[EnvironmentsClientCreateOrUpdateMultiRolePoolResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateOrUpdateMultiRolePool - Description for Create or update a multi-role pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *EnvironmentsClient) createOrUpdateMultiRolePool(ctx context.Context, resourceGroupName string, name string, multiRolePoolEnvelope WorkerPoolResource, options *EnvironmentsClientBeginCreateOrUpdateMultiRolePoolOptions) (*http.Response, error) { + var err error + const operationName = "EnvironmentsClient.BeginCreateOrUpdateMultiRolePool" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateMultiRolePoolCreateRequest(ctx, resourceGroupName, name, multiRolePoolEnvelope, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateMultiRolePoolCreateRequest creates the CreateOrUpdateMultiRolePool request. @@ -336,16 +383,19 @@ func (client *EnvironmentsClient) createOrUpdateMultiRolePoolCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, multiRolePoolEnvelope) + if err := runtime.MarshalAsJSON(req, multiRolePoolEnvelope); err != nil { + return nil, err + } + return req, nil } // BeginCreateOrUpdateWorkerPool - Description for Create or update a worker pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - workerPoolName - Name of the worker pool. @@ -358,29 +408,40 @@ func (client *EnvironmentsClient) BeginCreateOrUpdateWorkerPool(ctx context.Cont if err != nil { return nil, err } - return runtime.NewPoller[EnvironmentsClientCreateOrUpdateWorkerPoolResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[EnvironmentsClientCreateOrUpdateWorkerPoolResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[EnvironmentsClientCreateOrUpdateWorkerPoolResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[EnvironmentsClientCreateOrUpdateWorkerPoolResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateOrUpdateWorkerPool - Description for Create or update a worker pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *EnvironmentsClient) createOrUpdateWorkerPool(ctx context.Context, resourceGroupName string, name string, workerPoolName string, workerPoolEnvelope WorkerPoolResource, options *EnvironmentsClientBeginCreateOrUpdateWorkerPoolOptions) (*http.Response, error) { + var err error + const operationName = "EnvironmentsClient.BeginCreateOrUpdateWorkerPool" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateWorkerPoolCreateRequest(ctx, resourceGroupName, name, workerPoolName, workerPoolEnvelope, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateWorkerPoolCreateRequest creates the CreateOrUpdateWorkerPool request. @@ -407,16 +468,19 @@ func (client *EnvironmentsClient) createOrUpdateWorkerPoolCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, workerPoolEnvelope) + if err := runtime.MarshalAsJSON(req, workerPoolEnvelope); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Description for Delete an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - options - EnvironmentsClientBeginDeleteOptions contains the optional parameters for the EnvironmentsClient.BeginDelete @@ -427,29 +491,40 @@ func (client *EnvironmentsClient) BeginDelete(ctx context.Context, resourceGroup if err != nil { return nil, err } - return runtime.NewPoller[EnvironmentsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[EnvironmentsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[EnvironmentsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[EnvironmentsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Description for Delete an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *EnvironmentsClient) deleteOperation(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "EnvironmentsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -475,7 +550,7 @@ func (client *EnvironmentsClient) deleteCreateRequest(ctx context.Context, resou if options != nil && options.ForceDelete != nil { reqQP.Set("forceDelete", strconv.FormatBool(*options.ForceDelete)) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -484,24 +559,31 @@ func (client *EnvironmentsClient) deleteCreateRequest(ctx context.Context, resou // DeleteAseCustomDNSSuffixConfiguration - Delete Custom Dns Suffix configuration of an App Service Environment // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - options - EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationOptions contains the optional parameters for the EnvironmentsClient.DeleteAseCustomDNSSuffixConfiguration // method. func (client *EnvironmentsClient) DeleteAseCustomDNSSuffixConfiguration(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationOptions) (EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationResponse, error) { + var err error + const operationName = "EnvironmentsClient.DeleteAseCustomDNSSuffixConfiguration" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteAseCustomDNSSuffixConfigurationCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationResponse{}, err } - return client.deleteAseCustomDNSSuffixConfigurationHandleResponse(resp) + resp, err := client.deleteAseCustomDNSSuffixConfigurationHandleResponse(httpResp) + return resp, err } // deleteAseCustomDNSSuffixConfigurationCreateRequest creates the DeleteAseCustomDNSSuffixConfiguration request. @@ -524,7 +606,7 @@ func (client *EnvironmentsClient) deleteAseCustomDNSSuffixConfigurationCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -542,7 +624,7 @@ func (client *EnvironmentsClient) deleteAseCustomDNSSuffixConfigurationHandleRes // BeginDeletePrivateEndpointConnection - Description for Deletes a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - options - EnvironmentsClientBeginDeletePrivateEndpointConnectionOptions contains the optional parameters for the EnvironmentsClient.BeginDeletePrivateEndpointConnection @@ -553,29 +635,40 @@ func (client *EnvironmentsClient) BeginDeletePrivateEndpointConnection(ctx conte if err != nil { return nil, err } - return runtime.NewPoller[EnvironmentsClientDeletePrivateEndpointConnectionResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[EnvironmentsClientDeletePrivateEndpointConnectionResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[EnvironmentsClientDeletePrivateEndpointConnectionResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[EnvironmentsClientDeletePrivateEndpointConnectionResponse]{ + Tracer: client.internal.Tracer(), + }) } } // DeletePrivateEndpointConnection - Description for Deletes a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *EnvironmentsClient) deletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *EnvironmentsClientBeginDeletePrivateEndpointConnectionOptions) (*http.Response, error) { + var err error + const operationName = "EnvironmentsClient.BeginDeletePrivateEndpointConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deletePrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deletePrivateEndpointConnectionCreateRequest creates the DeletePrivateEndpointConnection request. @@ -602,7 +695,7 @@ func (client *EnvironmentsClient) deletePrivateEndpointConnectionCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -611,23 +704,30 @@ func (client *EnvironmentsClient) deletePrivateEndpointConnectionCreateRequest(c // Get - Description for Get the properties of an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - options - EnvironmentsClientGetOptions contains the optional parameters for the EnvironmentsClient.Get method. func (client *EnvironmentsClient) Get(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientGetOptions) (EnvironmentsClientGetResponse, error) { + var err error + const operationName = "EnvironmentsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return EnvironmentsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EnvironmentsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -650,7 +750,7 @@ func (client *EnvironmentsClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -668,24 +768,31 @@ func (client *EnvironmentsClient) getHandleResponse(resp *http.Response) (Enviro // GetAseCustomDNSSuffixConfiguration - Get Custom Dns Suffix configuration of an App Service Environment // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - options - EnvironmentsClientGetAseCustomDNSSuffixConfigurationOptions contains the optional parameters for the EnvironmentsClient.GetAseCustomDNSSuffixConfiguration // method. func (client *EnvironmentsClient) GetAseCustomDNSSuffixConfiguration(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientGetAseCustomDNSSuffixConfigurationOptions) (EnvironmentsClientGetAseCustomDNSSuffixConfigurationResponse, error) { + var err error + const operationName = "EnvironmentsClient.GetAseCustomDNSSuffixConfiguration" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getAseCustomDNSSuffixConfigurationCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return EnvironmentsClientGetAseCustomDNSSuffixConfigurationResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EnvironmentsClientGetAseCustomDNSSuffixConfigurationResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientGetAseCustomDNSSuffixConfigurationResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientGetAseCustomDNSSuffixConfigurationResponse{}, err } - return client.getAseCustomDNSSuffixConfigurationHandleResponse(resp) + resp, err := client.getAseCustomDNSSuffixConfigurationHandleResponse(httpResp) + return resp, err } // getAseCustomDNSSuffixConfigurationCreateRequest creates the GetAseCustomDNSSuffixConfiguration request. @@ -708,7 +815,7 @@ func (client *EnvironmentsClient) getAseCustomDNSSuffixConfigurationCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -726,24 +833,31 @@ func (client *EnvironmentsClient) getAseCustomDNSSuffixConfigurationHandleRespon // GetAseV3NetworkingConfiguration - Description for Get networking configuration of an App Service Environment // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - options - EnvironmentsClientGetAseV3NetworkingConfigurationOptions contains the optional parameters for the EnvironmentsClient.GetAseV3NetworkingConfiguration // method. func (client *EnvironmentsClient) GetAseV3NetworkingConfiguration(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientGetAseV3NetworkingConfigurationOptions) (EnvironmentsClientGetAseV3NetworkingConfigurationResponse, error) { + var err error + const operationName = "EnvironmentsClient.GetAseV3NetworkingConfiguration" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getAseV3NetworkingConfigurationCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return EnvironmentsClientGetAseV3NetworkingConfigurationResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EnvironmentsClientGetAseV3NetworkingConfigurationResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientGetAseV3NetworkingConfigurationResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientGetAseV3NetworkingConfigurationResponse{}, err } - return client.getAseV3NetworkingConfigurationHandleResponse(resp) + resp, err := client.getAseV3NetworkingConfigurationHandleResponse(httpResp) + return resp, err } // getAseV3NetworkingConfigurationCreateRequest creates the GetAseV3NetworkingConfiguration request. @@ -766,7 +880,7 @@ func (client *EnvironmentsClient) getAseV3NetworkingConfigurationCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -784,25 +898,32 @@ func (client *EnvironmentsClient) getAseV3NetworkingConfigurationHandleResponse( // GetDiagnosticsItem - Description for Get a diagnostics item for an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - diagnosticsName - Name of the diagnostics item. // - options - EnvironmentsClientGetDiagnosticsItemOptions contains the optional parameters for the EnvironmentsClient.GetDiagnosticsItem // method. func (client *EnvironmentsClient) GetDiagnosticsItem(ctx context.Context, resourceGroupName string, name string, diagnosticsName string, options *EnvironmentsClientGetDiagnosticsItemOptions) (EnvironmentsClientGetDiagnosticsItemResponse, error) { + var err error + const operationName = "EnvironmentsClient.GetDiagnosticsItem" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getDiagnosticsItemCreateRequest(ctx, resourceGroupName, name, diagnosticsName, options) if err != nil { return EnvironmentsClientGetDiagnosticsItemResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EnvironmentsClientGetDiagnosticsItemResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientGetDiagnosticsItemResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientGetDiagnosticsItemResponse{}, err } - return client.getDiagnosticsItemHandleResponse(resp) + resp, err := client.getDiagnosticsItemHandleResponse(httpResp) + return resp, err } // getDiagnosticsItemCreateRequest creates the GetDiagnosticsItem request. @@ -829,7 +950,7 @@ func (client *EnvironmentsClient) getDiagnosticsItemCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -847,7 +968,7 @@ func (client *EnvironmentsClient) getDiagnosticsItemHandleResponse(resp *http.Re // NewGetInboundNetworkDependenciesEndpointsPager - Description for Get the network endpoints of all inbound dependencies // of an App Service Environment. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - options - EnvironmentsClientGetInboundNetworkDependenciesEndpointsOptions contains the optional parameters for the EnvironmentsClient.NewGetInboundNetworkDependenciesEndpointsPager @@ -858,25 +979,20 @@ func (client *EnvironmentsClient) NewGetInboundNetworkDependenciesEndpointsPager return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse) (EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getInboundNetworkDependenciesEndpointsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewGetInboundNetworkDependenciesEndpointsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getInboundNetworkDependenciesEndpointsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse{}, runtime.NewResponseError(resp) - } return client.getInboundNetworkDependenciesEndpointsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -900,7 +1016,7 @@ func (client *EnvironmentsClient) getInboundNetworkDependenciesEndpointsCreateRe return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -918,24 +1034,31 @@ func (client *EnvironmentsClient) getInboundNetworkDependenciesEndpointsHandleRe // GetMultiRolePool - Description for Get properties of a multi-role pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - options - EnvironmentsClientGetMultiRolePoolOptions contains the optional parameters for the EnvironmentsClient.GetMultiRolePool // method. func (client *EnvironmentsClient) GetMultiRolePool(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientGetMultiRolePoolOptions) (EnvironmentsClientGetMultiRolePoolResponse, error) { + var err error + const operationName = "EnvironmentsClient.GetMultiRolePool" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getMultiRolePoolCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return EnvironmentsClientGetMultiRolePoolResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EnvironmentsClientGetMultiRolePoolResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientGetMultiRolePoolResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientGetMultiRolePoolResponse{}, err } - return client.getMultiRolePoolHandleResponse(resp) + resp, err := client.getMultiRolePoolHandleResponse(httpResp) + return resp, err } // getMultiRolePoolCreateRequest creates the GetMultiRolePool request. @@ -958,7 +1081,7 @@ func (client *EnvironmentsClient) getMultiRolePoolCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -976,7 +1099,7 @@ func (client *EnvironmentsClient) getMultiRolePoolHandleResponse(resp *http.Resp // NewGetOutboundNetworkDependenciesEndpointsPager - Description for Get the network endpoints of all outbound dependencies // of an App Service Environment. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - options - EnvironmentsClientGetOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the EnvironmentsClient.NewGetOutboundNetworkDependenciesEndpointsPager @@ -987,25 +1110,20 @@ func (client *EnvironmentsClient) NewGetOutboundNetworkDependenciesEndpointsPage return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse) (EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getOutboundNetworkDependenciesEndpointsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewGetOutboundNetworkDependenciesEndpointsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getOutboundNetworkDependenciesEndpointsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse{}, runtime.NewResponseError(resp) - } return client.getOutboundNetworkDependenciesEndpointsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -1029,7 +1147,7 @@ func (client *EnvironmentsClient) getOutboundNetworkDependenciesEndpointsCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1047,25 +1165,32 @@ func (client *EnvironmentsClient) getOutboundNetworkDependenciesEndpointsHandleR // GetPrivateEndpointConnection - Description for Gets a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - privateEndpointConnectionName - Name of the private endpoint connection. // - options - EnvironmentsClientGetPrivateEndpointConnectionOptions contains the optional parameters for the EnvironmentsClient.GetPrivateEndpointConnection // method. func (client *EnvironmentsClient) GetPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *EnvironmentsClientGetPrivateEndpointConnectionOptions) (EnvironmentsClientGetPrivateEndpointConnectionResponse, error) { + var err error + const operationName = "EnvironmentsClient.GetPrivateEndpointConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getPrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, options) if err != nil { return EnvironmentsClientGetPrivateEndpointConnectionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EnvironmentsClientGetPrivateEndpointConnectionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientGetPrivateEndpointConnectionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientGetPrivateEndpointConnectionResponse{}, err } - return client.getPrivateEndpointConnectionHandleResponse(resp) + resp, err := client.getPrivateEndpointConnectionHandleResponse(httpResp) + return resp, err } // getPrivateEndpointConnectionCreateRequest creates the GetPrivateEndpointConnection request. @@ -1092,7 +1217,7 @@ func (client *EnvironmentsClient) getPrivateEndpointConnectionCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1110,7 +1235,7 @@ func (client *EnvironmentsClient) getPrivateEndpointConnectionHandleResponse(res // NewGetPrivateEndpointConnectionListPager - Description for Gets the list of private endpoints associated with a hosting // environment // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - options - EnvironmentsClientGetPrivateEndpointConnectionListOptions contains the optional parameters for the EnvironmentsClient.NewGetPrivateEndpointConnectionListPager @@ -1121,25 +1246,20 @@ func (client *EnvironmentsClient) NewGetPrivateEndpointConnectionListPager(resou return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *EnvironmentsClientGetPrivateEndpointConnectionListResponse) (EnvironmentsClientGetPrivateEndpointConnectionListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getPrivateEndpointConnectionListCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewGetPrivateEndpointConnectionListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getPrivateEndpointConnectionListCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return EnvironmentsClientGetPrivateEndpointConnectionListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return EnvironmentsClientGetPrivateEndpointConnectionListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientGetPrivateEndpointConnectionListResponse{}, runtime.NewResponseError(resp) - } return client.getPrivateEndpointConnectionListHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -1163,7 +1283,7 @@ func (client *EnvironmentsClient) getPrivateEndpointConnectionListCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1181,24 +1301,31 @@ func (client *EnvironmentsClient) getPrivateEndpointConnectionListHandleResponse // GetPrivateLinkResources - Description for Gets the private link resources // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - options - EnvironmentsClientGetPrivateLinkResourcesOptions contains the optional parameters for the EnvironmentsClient.GetPrivateLinkResources // method. func (client *EnvironmentsClient) GetPrivateLinkResources(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientGetPrivateLinkResourcesOptions) (EnvironmentsClientGetPrivateLinkResourcesResponse, error) { + var err error + const operationName = "EnvironmentsClient.GetPrivateLinkResources" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getPrivateLinkResourcesCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return EnvironmentsClientGetPrivateLinkResourcesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EnvironmentsClientGetPrivateLinkResourcesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientGetPrivateLinkResourcesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientGetPrivateLinkResourcesResponse{}, err } - return client.getPrivateLinkResourcesHandleResponse(resp) + resp, err := client.getPrivateLinkResourcesHandleResponse(httpResp) + return resp, err } // getPrivateLinkResourcesCreateRequest creates the GetPrivateLinkResources request. @@ -1221,7 +1348,7 @@ func (client *EnvironmentsClient) getPrivateLinkResourcesCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1239,23 +1366,30 @@ func (client *EnvironmentsClient) getPrivateLinkResourcesHandleResponse(resp *ht // GetVipInfo - Description for Get IP addresses assigned to an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - options - EnvironmentsClientGetVipInfoOptions contains the optional parameters for the EnvironmentsClient.GetVipInfo method. func (client *EnvironmentsClient) GetVipInfo(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientGetVipInfoOptions) (EnvironmentsClientGetVipInfoResponse, error) { + var err error + const operationName = "EnvironmentsClient.GetVipInfo" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getVipInfoCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return EnvironmentsClientGetVipInfoResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EnvironmentsClientGetVipInfoResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientGetVipInfoResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientGetVipInfoResponse{}, err } - return client.getVipInfoHandleResponse(resp) + resp, err := client.getVipInfoHandleResponse(httpResp) + return resp, err } // getVipInfoCreateRequest creates the GetVipInfo request. @@ -1278,7 +1412,7 @@ func (client *EnvironmentsClient) getVipInfoCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1296,25 +1430,32 @@ func (client *EnvironmentsClient) getVipInfoHandleResponse(resp *http.Response) // GetWorkerPool - Description for Get properties of a worker pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - workerPoolName - Name of the worker pool. // - options - EnvironmentsClientGetWorkerPoolOptions contains the optional parameters for the EnvironmentsClient.GetWorkerPool // method. func (client *EnvironmentsClient) GetWorkerPool(ctx context.Context, resourceGroupName string, name string, workerPoolName string, options *EnvironmentsClientGetWorkerPoolOptions) (EnvironmentsClientGetWorkerPoolResponse, error) { + var err error + const operationName = "EnvironmentsClient.GetWorkerPool" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getWorkerPoolCreateRequest(ctx, resourceGroupName, name, workerPoolName, options) if err != nil { return EnvironmentsClientGetWorkerPoolResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EnvironmentsClientGetWorkerPoolResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientGetWorkerPoolResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientGetWorkerPoolResponse{}, err } - return client.getWorkerPoolHandleResponse(resp) + resp, err := client.getWorkerPoolHandleResponse(httpResp) + return resp, err } // getWorkerPoolCreateRequest creates the GetWorkerPool request. @@ -1341,7 +1482,7 @@ func (client *EnvironmentsClient) getWorkerPoolCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1358,7 +1499,7 @@ func (client *EnvironmentsClient) getWorkerPoolHandleResponse(resp *http.Respons // NewListPager - Description for Get all App Service Environments for a subscription. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - options - EnvironmentsClientListOptions contains the optional parameters for the EnvironmentsClient.NewListPager method. func (client *EnvironmentsClient) NewListPager(options *EnvironmentsClientListOptions) *runtime.Pager[EnvironmentsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[EnvironmentsClientListResponse]{ @@ -1366,25 +1507,20 @@ func (client *EnvironmentsClient) NewListPager(options *EnvironmentsClientListOp return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *EnvironmentsClientListResponse) (EnvironmentsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return EnvironmentsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return EnvironmentsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -1400,7 +1536,7 @@ func (client *EnvironmentsClient) listCreateRequest(ctx context.Context, options return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1417,7 +1553,7 @@ func (client *EnvironmentsClient) listHandleResponse(resp *http.Response) (Envir // NewListAppServicePlansPager - Description for Get all App Service plans in an App Service Environment. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - options - EnvironmentsClientListAppServicePlansOptions contains the optional parameters for the EnvironmentsClient.NewListAppServicePlansPager @@ -1428,25 +1564,20 @@ func (client *EnvironmentsClient) NewListAppServicePlansPager(resourceGroupName return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *EnvironmentsClientListAppServicePlansResponse) (EnvironmentsClientListAppServicePlansResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listAppServicePlansCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return EnvironmentsClientListAppServicePlansResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewListAppServicePlansPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAppServicePlansCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return EnvironmentsClientListAppServicePlansResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListAppServicePlansResponse{}, runtime.NewResponseError(resp) - } return client.listAppServicePlansHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -1470,7 +1601,7 @@ func (client *EnvironmentsClient) listAppServicePlansCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1487,7 +1618,7 @@ func (client *EnvironmentsClient) listAppServicePlansHandleResponse(resp *http.R // NewListByResourceGroupPager - Description for Get all App Service Environments in a resource group. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - options - EnvironmentsClientListByResourceGroupOptions contains the optional parameters for the EnvironmentsClient.NewListByResourceGroupPager // method. @@ -1497,25 +1628,20 @@ func (client *EnvironmentsClient) NewListByResourceGroupPager(resourceGroupName return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *EnvironmentsClientListByResourceGroupResponse) (EnvironmentsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return EnvironmentsClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return EnvironmentsClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -1535,7 +1661,7 @@ func (client *EnvironmentsClient) listByResourceGroupCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1552,7 +1678,7 @@ func (client *EnvironmentsClient) listByResourceGroupHandleResponse(resp *http.R // NewListCapacitiesPager - Description for Get the used, available, and total worker capacity an App Service Environment. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - options - EnvironmentsClientListCapacitiesOptions contains the optional parameters for the EnvironmentsClient.NewListCapacitiesPager @@ -1563,25 +1689,20 @@ func (client *EnvironmentsClient) NewListCapacitiesPager(resourceGroupName strin return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *EnvironmentsClientListCapacitiesResponse) (EnvironmentsClientListCapacitiesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCapacitiesCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewListCapacitiesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCapacitiesCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return EnvironmentsClientListCapacitiesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return EnvironmentsClientListCapacitiesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListCapacitiesResponse{}, runtime.NewResponseError(resp) - } return client.listCapacitiesHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -1605,7 +1726,7 @@ func (client *EnvironmentsClient) listCapacitiesCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1623,24 +1744,31 @@ func (client *EnvironmentsClient) listCapacitiesHandleResponse(resp *http.Respon // ListDiagnostics - Description for Get diagnostic information for an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - options - EnvironmentsClientListDiagnosticsOptions contains the optional parameters for the EnvironmentsClient.ListDiagnostics // method. func (client *EnvironmentsClient) ListDiagnostics(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientListDiagnosticsOptions) (EnvironmentsClientListDiagnosticsResponse, error) { + var err error + const operationName = "EnvironmentsClient.ListDiagnostics" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listDiagnosticsCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return EnvironmentsClientListDiagnosticsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EnvironmentsClientListDiagnosticsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListDiagnosticsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientListDiagnosticsResponse{}, err } - return client.listDiagnosticsHandleResponse(resp) + resp, err := client.listDiagnosticsHandleResponse(httpResp) + return resp, err } // listDiagnosticsCreateRequest creates the ListDiagnostics request. @@ -1663,7 +1791,7 @@ func (client *EnvironmentsClient) listDiagnosticsCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1681,7 +1809,7 @@ func (client *EnvironmentsClient) listDiagnosticsHandleResponse(resp *http.Respo // NewListMultiRoleMetricDefinitionsPager - Description for Get metric definitions for a multi-role pool of an App Service // Environment. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - options - EnvironmentsClientListMultiRoleMetricDefinitionsOptions contains the optional parameters for the EnvironmentsClient.NewListMultiRoleMetricDefinitionsPager @@ -1692,25 +1820,20 @@ func (client *EnvironmentsClient) NewListMultiRoleMetricDefinitionsPager(resourc return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *EnvironmentsClientListMultiRoleMetricDefinitionsResponse) (EnvironmentsClientListMultiRoleMetricDefinitionsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listMultiRoleMetricDefinitionsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewListMultiRoleMetricDefinitionsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listMultiRoleMetricDefinitionsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return EnvironmentsClientListMultiRoleMetricDefinitionsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return EnvironmentsClientListMultiRoleMetricDefinitionsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListMultiRoleMetricDefinitionsResponse{}, runtime.NewResponseError(resp) - } return client.listMultiRoleMetricDefinitionsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -1734,7 +1857,7 @@ func (client *EnvironmentsClient) listMultiRoleMetricDefinitionsCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1752,7 +1875,7 @@ func (client *EnvironmentsClient) listMultiRoleMetricDefinitionsHandleResponse(r // NewListMultiRolePoolInstanceMetricDefinitionsPager - Description for Get metric definitions for a specific instance of // a multi-role pool of an App Service Environment. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - instance - Name of the instance in the multi-role pool. @@ -1764,25 +1887,20 @@ func (client *EnvironmentsClient) NewListMultiRolePoolInstanceMetricDefinitionsP return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse) (EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listMultiRolePoolInstanceMetricDefinitionsCreateRequest(ctx, resourceGroupName, name, instance, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewListMultiRolePoolInstanceMetricDefinitionsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listMultiRolePoolInstanceMetricDefinitionsCreateRequest(ctx, resourceGroupName, name, instance, options) + }, nil) if err != nil { return EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse{}, runtime.NewResponseError(resp) - } return client.listMultiRolePoolInstanceMetricDefinitionsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -1810,7 +1928,7 @@ func (client *EnvironmentsClient) listMultiRolePoolInstanceMetricDefinitionsCrea return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1827,7 +1945,7 @@ func (client *EnvironmentsClient) listMultiRolePoolInstanceMetricDefinitionsHand // NewListMultiRolePoolSKUsPager - Description for Get available SKUs for scaling a multi-role pool. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - options - EnvironmentsClientListMultiRolePoolSKUsOptions contains the optional parameters for the EnvironmentsClient.NewListMultiRolePoolSKUsPager @@ -1838,25 +1956,20 @@ func (client *EnvironmentsClient) NewListMultiRolePoolSKUsPager(resourceGroupNam return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *EnvironmentsClientListMultiRolePoolSKUsResponse) (EnvironmentsClientListMultiRolePoolSKUsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listMultiRolePoolSKUsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return EnvironmentsClientListMultiRolePoolSKUsResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewListMultiRolePoolSKUsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listMultiRolePoolSKUsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return EnvironmentsClientListMultiRolePoolSKUsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListMultiRolePoolSKUsResponse{}, runtime.NewResponseError(resp) - } return client.listMultiRolePoolSKUsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -1880,7 +1993,7 @@ func (client *EnvironmentsClient) listMultiRolePoolSKUsCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1897,7 +2010,7 @@ func (client *EnvironmentsClient) listMultiRolePoolSKUsHandleResponse(resp *http // NewListMultiRolePoolsPager - Description for Get all multi-role pools. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - options - EnvironmentsClientListMultiRolePoolsOptions contains the optional parameters for the EnvironmentsClient.NewListMultiRolePoolsPager @@ -1908,25 +2021,20 @@ func (client *EnvironmentsClient) NewListMultiRolePoolsPager(resourceGroupName s return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *EnvironmentsClientListMultiRolePoolsResponse) (EnvironmentsClientListMultiRolePoolsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listMultiRolePoolsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewListMultiRolePoolsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listMultiRolePoolsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return EnvironmentsClientListMultiRolePoolsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return EnvironmentsClientListMultiRolePoolsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListMultiRolePoolsResponse{}, runtime.NewResponseError(resp) - } return client.listMultiRolePoolsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -1950,7 +2058,7 @@ func (client *EnvironmentsClient) listMultiRolePoolsCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1967,7 +2075,7 @@ func (client *EnvironmentsClient) listMultiRolePoolsHandleResponse(resp *http.Re // NewListMultiRoleUsagesPager - Description for Get usage metrics for a multi-role pool of an App Service Environment. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - options - EnvironmentsClientListMultiRoleUsagesOptions contains the optional parameters for the EnvironmentsClient.NewListMultiRoleUsagesPager @@ -1978,25 +2086,20 @@ func (client *EnvironmentsClient) NewListMultiRoleUsagesPager(resourceGroupName return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *EnvironmentsClientListMultiRoleUsagesResponse) (EnvironmentsClientListMultiRoleUsagesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listMultiRoleUsagesCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return EnvironmentsClientListMultiRoleUsagesResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewListMultiRoleUsagesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listMultiRoleUsagesCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return EnvironmentsClientListMultiRoleUsagesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListMultiRoleUsagesResponse{}, runtime.NewResponseError(resp) - } return client.listMultiRoleUsagesHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -2020,7 +2123,7 @@ func (client *EnvironmentsClient) listMultiRoleUsagesCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2038,24 +2141,31 @@ func (client *EnvironmentsClient) listMultiRoleUsagesHandleResponse(resp *http.R // ListOperations - Description for List all currently running operations on the App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - options - EnvironmentsClientListOperationsOptions contains the optional parameters for the EnvironmentsClient.ListOperations // method. func (client *EnvironmentsClient) ListOperations(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientListOperationsOptions) (EnvironmentsClientListOperationsResponse, error) { + var err error + const operationName = "EnvironmentsClient.ListOperations" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listOperationsCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return EnvironmentsClientListOperationsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EnvironmentsClientListOperationsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListOperationsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientListOperationsResponse{}, err } - return client.listOperationsHandleResponse(resp) + resp, err := client.listOperationsHandleResponse(httpResp) + return resp, err } // listOperationsCreateRequest creates the ListOperations request. @@ -2078,7 +2188,7 @@ func (client *EnvironmentsClient) listOperationsCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2095,7 +2205,7 @@ func (client *EnvironmentsClient) listOperationsHandleResponse(resp *http.Respon // NewListUsagesPager - Description for Get global usage metrics of an App Service Environment. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - options - EnvironmentsClientListUsagesOptions contains the optional parameters for the EnvironmentsClient.NewListUsagesPager @@ -2106,25 +2216,20 @@ func (client *EnvironmentsClient) NewListUsagesPager(resourceGroupName string, n return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *EnvironmentsClientListUsagesResponse) (EnvironmentsClientListUsagesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listUsagesCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewListUsagesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listUsagesCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return EnvironmentsClientListUsagesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return EnvironmentsClientListUsagesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListUsagesResponse{}, runtime.NewResponseError(resp) - } return client.listUsagesHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -2148,7 +2253,7 @@ func (client *EnvironmentsClient) listUsagesCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() unencodedParams := []string{req.Raw().URL.RawQuery} if options != nil && options.Filter != nil { @@ -2170,7 +2275,7 @@ func (client *EnvironmentsClient) listUsagesHandleResponse(resp *http.Response) // NewListWebAppsPager - Description for Get all apps in an App Service Environment. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - options - EnvironmentsClientListWebAppsOptions contains the optional parameters for the EnvironmentsClient.NewListWebAppsPager @@ -2181,25 +2286,20 @@ func (client *EnvironmentsClient) NewListWebAppsPager(resourceGroupName string, return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *EnvironmentsClientListWebAppsResponse) (EnvironmentsClientListWebAppsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listWebAppsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return EnvironmentsClientListWebAppsResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewListWebAppsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listWebAppsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return EnvironmentsClientListWebAppsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListWebAppsResponse{}, runtime.NewResponseError(resp) - } return client.listWebAppsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -2226,7 +2326,7 @@ func (client *EnvironmentsClient) listWebAppsCreateRequest(ctx context.Context, if options != nil && options.PropertiesToInclude != nil { reqQP.Set("propertiesToInclude", *options.PropertiesToInclude) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2243,7 +2343,7 @@ func (client *EnvironmentsClient) listWebAppsHandleResponse(resp *http.Response) // NewListWebWorkerMetricDefinitionsPager - Description for Get metric definitions for a worker pool of an App Service Environment. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - workerPoolName - Name of the worker pool. @@ -2255,25 +2355,20 @@ func (client *EnvironmentsClient) NewListWebWorkerMetricDefinitionsPager(resourc return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *EnvironmentsClientListWebWorkerMetricDefinitionsResponse) (EnvironmentsClientListWebWorkerMetricDefinitionsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listWebWorkerMetricDefinitionsCreateRequest(ctx, resourceGroupName, name, workerPoolName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return EnvironmentsClientListWebWorkerMetricDefinitionsResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewListWebWorkerMetricDefinitionsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listWebWorkerMetricDefinitionsCreateRequest(ctx, resourceGroupName, name, workerPoolName, options) + }, nil) if err != nil { return EnvironmentsClientListWebWorkerMetricDefinitionsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListWebWorkerMetricDefinitionsResponse{}, runtime.NewResponseError(resp) - } return client.listWebWorkerMetricDefinitionsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -2301,7 +2396,7 @@ func (client *EnvironmentsClient) listWebWorkerMetricDefinitionsCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2318,7 +2413,7 @@ func (client *EnvironmentsClient) listWebWorkerMetricDefinitionsHandleResponse(r // NewListWebWorkerUsagesPager - Description for Get usage metrics for a worker pool of an App Service Environment. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - workerPoolName - Name of the worker pool. @@ -2330,25 +2425,20 @@ func (client *EnvironmentsClient) NewListWebWorkerUsagesPager(resourceGroupName return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *EnvironmentsClientListWebWorkerUsagesResponse) (EnvironmentsClientListWebWorkerUsagesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listWebWorkerUsagesCreateRequest(ctx, resourceGroupName, name, workerPoolName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return EnvironmentsClientListWebWorkerUsagesResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewListWebWorkerUsagesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listWebWorkerUsagesCreateRequest(ctx, resourceGroupName, name, workerPoolName, options) + }, nil) if err != nil { return EnvironmentsClientListWebWorkerUsagesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListWebWorkerUsagesResponse{}, runtime.NewResponseError(resp) - } return client.listWebWorkerUsagesHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -2376,7 +2466,7 @@ func (client *EnvironmentsClient) listWebWorkerUsagesCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2394,7 +2484,7 @@ func (client *EnvironmentsClient) listWebWorkerUsagesHandleResponse(resp *http.R // NewListWorkerPoolInstanceMetricDefinitionsPager - Description for Get metric definitions for a specific instance of a worker // pool of an App Service Environment. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - workerPoolName - Name of the worker pool. @@ -2407,25 +2497,20 @@ func (client *EnvironmentsClient) NewListWorkerPoolInstanceMetricDefinitionsPage return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse) (EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listWorkerPoolInstanceMetricDefinitionsCreateRequest(ctx, resourceGroupName, name, workerPoolName, instance, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewListWorkerPoolInstanceMetricDefinitionsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listWorkerPoolInstanceMetricDefinitionsCreateRequest(ctx, resourceGroupName, name, workerPoolName, instance, options) + }, nil) if err != nil { return EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse{}, runtime.NewResponseError(resp) - } return client.listWorkerPoolInstanceMetricDefinitionsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -2457,7 +2542,7 @@ func (client *EnvironmentsClient) listWorkerPoolInstanceMetricDefinitionsCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2474,7 +2559,7 @@ func (client *EnvironmentsClient) listWorkerPoolInstanceMetricDefinitionsHandleR // NewListWorkerPoolSKUsPager - Description for Get available SKUs for scaling a worker pool. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - workerPoolName - Name of the worker pool. @@ -2486,25 +2571,20 @@ func (client *EnvironmentsClient) NewListWorkerPoolSKUsPager(resourceGroupName s return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *EnvironmentsClientListWorkerPoolSKUsResponse) (EnvironmentsClientListWorkerPoolSKUsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listWorkerPoolSKUsCreateRequest(ctx, resourceGroupName, name, workerPoolName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return EnvironmentsClientListWorkerPoolSKUsResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewListWorkerPoolSKUsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listWorkerPoolSKUsCreateRequest(ctx, resourceGroupName, name, workerPoolName, options) + }, nil) if err != nil { return EnvironmentsClientListWorkerPoolSKUsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListWorkerPoolSKUsResponse{}, runtime.NewResponseError(resp) - } return client.listWorkerPoolSKUsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -2532,7 +2612,7 @@ func (client *EnvironmentsClient) listWorkerPoolSKUsCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2549,7 +2629,7 @@ func (client *EnvironmentsClient) listWorkerPoolSKUsHandleResponse(resp *http.Re // NewListWorkerPoolsPager - Description for Get all worker pools of an App Service Environment. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - options - EnvironmentsClientListWorkerPoolsOptions contains the optional parameters for the EnvironmentsClient.NewListWorkerPoolsPager @@ -2560,25 +2640,20 @@ func (client *EnvironmentsClient) NewListWorkerPoolsPager(resourceGroupName stri return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *EnvironmentsClientListWorkerPoolsResponse) (EnvironmentsClientListWorkerPoolsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listWorkerPoolsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.NewListWorkerPoolsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listWorkerPoolsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return EnvironmentsClientListWorkerPoolsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return EnvironmentsClientListWorkerPoolsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientListWorkerPoolsResponse{}, runtime.NewResponseError(resp) - } return client.listWorkerPoolsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -2602,7 +2677,7 @@ func (client *EnvironmentsClient) listWorkerPoolsCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2620,21 +2695,27 @@ func (client *EnvironmentsClient) listWorkerPoolsHandleResponse(resp *http.Respo // Reboot - Description for Reboot all machines in an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - options - EnvironmentsClientRebootOptions contains the optional parameters for the EnvironmentsClient.Reboot method. func (client *EnvironmentsClient) Reboot(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientRebootOptions) (EnvironmentsClientRebootResponse, error) { + var err error + const operationName = "EnvironmentsClient.Reboot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.rebootCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return EnvironmentsClientRebootResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EnvironmentsClientRebootResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return EnvironmentsClientRebootResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientRebootResponse{}, err } return EnvironmentsClientRebootResponse{}, nil } @@ -2659,7 +2740,7 @@ func (client *EnvironmentsClient) rebootCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2667,7 +2748,7 @@ func (client *EnvironmentsClient) rebootCreateRequest(ctx context.Context, resou // BeginResume - Description for Resume an App Service Environment. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - options - EnvironmentsClientBeginResumeOptions contains the optional parameters for the EnvironmentsClient.BeginResume @@ -2678,51 +2759,57 @@ func (client *EnvironmentsClient) BeginResume(ctx context.Context, resourceGroup return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *EnvironmentsClientResumeResponse) (EnvironmentsClientResumeResponse, error) { - req, err := runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.BeginResume") + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), *page.NextLink, func(ctx context.Context) (*policy.Request, error) { + return client.resumeCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return EnvironmentsClientResumeResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return EnvironmentsClientResumeResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientResumeResponse{}, runtime.NewResponseError(resp) - } return client.resumeHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) if options == nil || options.ResumeToken == "" { resp, err := client.resume(ctx, resourceGroupName, name, options) if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[*runtime.Pager[EnvironmentsClientResumeResponse]]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[*runtime.Pager[EnvironmentsClientResumeResponse]]{ Response: &pager, + Tracer: client.internal.Tracer(), }) + return poller, err } else { return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[*runtime.Pager[EnvironmentsClientResumeResponse]]{ Response: &pager, + Tracer: client.internal.Tracer(), }) } } // Resume - Description for Resume an App Service Environment. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *EnvironmentsClient) resume(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientBeginResumeOptions) (*http.Response, error) { + var err error + const operationName = "EnvironmentsClient.BeginResume" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.resumeCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // resumeCreateRequest creates the Resume request. @@ -2745,7 +2832,7 @@ func (client *EnvironmentsClient) resumeCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2762,7 +2849,7 @@ func (client *EnvironmentsClient) resumeHandleResponse(resp *http.Response) (Env // BeginSuspend - Description for Suspend an App Service Environment. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - options - EnvironmentsClientBeginSuspendOptions contains the optional parameters for the EnvironmentsClient.BeginSuspend @@ -2773,51 +2860,57 @@ func (client *EnvironmentsClient) BeginSuspend(ctx context.Context, resourceGrou return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *EnvironmentsClientSuspendResponse) (EnvironmentsClientSuspendResponse, error) { - req, err := runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "EnvironmentsClient.BeginSuspend") + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), *page.NextLink, func(ctx context.Context) (*policy.Request, error) { + return client.suspendCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return EnvironmentsClientSuspendResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return EnvironmentsClientSuspendResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientSuspendResponse{}, runtime.NewResponseError(resp) - } return client.suspendHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) if options == nil || options.ResumeToken == "" { resp, err := client.suspend(ctx, resourceGroupName, name, options) if err != nil { return nil, err } - return runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[*runtime.Pager[EnvironmentsClientSuspendResponse]]{ + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[*runtime.Pager[EnvironmentsClientSuspendResponse]]{ Response: &pager, + Tracer: client.internal.Tracer(), }) + return poller, err } else { return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[*runtime.Pager[EnvironmentsClientSuspendResponse]]{ Response: &pager, + Tracer: client.internal.Tracer(), }) } } // Suspend - Description for Suspend an App Service Environment. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *EnvironmentsClient) suspend(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientBeginSuspendOptions) (*http.Response, error) { + var err error + const operationName = "EnvironmentsClient.BeginSuspend" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.suspendCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // suspendCreateRequest creates the Suspend request. @@ -2840,7 +2933,7 @@ func (client *EnvironmentsClient) suspendCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2858,22 +2951,28 @@ func (client *EnvironmentsClient) suspendHandleResponse(resp *http.Response) (En // TestUpgradeAvailableNotification - Send a test notification that an upgrade is available for this App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - options - EnvironmentsClientTestUpgradeAvailableNotificationOptions contains the optional parameters for the EnvironmentsClient.TestUpgradeAvailableNotification // method. func (client *EnvironmentsClient) TestUpgradeAvailableNotification(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientTestUpgradeAvailableNotificationOptions) (EnvironmentsClientTestUpgradeAvailableNotificationResponse, error) { + var err error + const operationName = "EnvironmentsClient.TestUpgradeAvailableNotification" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.testUpgradeAvailableNotificationCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return EnvironmentsClientTestUpgradeAvailableNotificationResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EnvironmentsClientTestUpgradeAvailableNotificationResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientTestUpgradeAvailableNotificationResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientTestUpgradeAvailableNotificationResponse{}, err } return EnvironmentsClientTestUpgradeAvailableNotificationResponse{}, nil } @@ -2898,7 +2997,7 @@ func (client *EnvironmentsClient) testUpgradeAvailableNotificationCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2907,24 +3006,31 @@ func (client *EnvironmentsClient) testUpgradeAvailableNotificationCreateRequest( // Update - Description for Create or update an App Service Environment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - hostingEnvironmentEnvelope - Configuration details of the App Service Environment. // - options - EnvironmentsClientUpdateOptions contains the optional parameters for the EnvironmentsClient.Update method. func (client *EnvironmentsClient) Update(ctx context.Context, resourceGroupName string, name string, hostingEnvironmentEnvelope EnvironmentPatchResource, options *EnvironmentsClientUpdateOptions) (EnvironmentsClientUpdateResponse, error) { + var err error + const operationName = "EnvironmentsClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, name, hostingEnvironmentEnvelope, options) if err != nil { return EnvironmentsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EnvironmentsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return EnvironmentsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -2947,10 +3053,13 @@ func (client *EnvironmentsClient) updateCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, hostingEnvironmentEnvelope) + if err := runtime.MarshalAsJSON(req, hostingEnvironmentEnvelope); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. @@ -2965,24 +3074,31 @@ func (client *EnvironmentsClient) updateHandleResponse(resp *http.Response) (Env // UpdateAseCustomDNSSuffixConfiguration - Update Custom Dns Suffix configuration of an App Service Environment // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - options - EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationOptions contains the optional parameters for the EnvironmentsClient.UpdateAseCustomDNSSuffixConfiguration // method. func (client *EnvironmentsClient) UpdateAseCustomDNSSuffixConfiguration(ctx context.Context, resourceGroupName string, name string, customDNSSuffixConfiguration CustomDNSSuffixConfiguration, options *EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationOptions) (EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationResponse, error) { + var err error + const operationName = "EnvironmentsClient.UpdateAseCustomDNSSuffixConfiguration" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateAseCustomDNSSuffixConfigurationCreateRequest(ctx, resourceGroupName, name, customDNSSuffixConfiguration, options) if err != nil { return EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationResponse{}, err } - return client.updateAseCustomDNSSuffixConfigurationHandleResponse(resp) + resp, err := client.updateAseCustomDNSSuffixConfigurationHandleResponse(httpResp) + return resp, err } // updateAseCustomDNSSuffixConfigurationCreateRequest creates the UpdateAseCustomDNSSuffixConfiguration request. @@ -3005,10 +3121,13 @@ func (client *EnvironmentsClient) updateAseCustomDNSSuffixConfigurationCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, customDNSSuffixConfiguration) + if err := runtime.MarshalAsJSON(req, customDNSSuffixConfiguration); err != nil { + return nil, err + } + return req, nil } // updateAseCustomDNSSuffixConfigurationHandleResponse handles the UpdateAseCustomDNSSuffixConfiguration response. @@ -3023,24 +3142,31 @@ func (client *EnvironmentsClient) updateAseCustomDNSSuffixConfigurationHandleRes // UpdateAseNetworkingConfiguration - Description for Update networking configuration of an App Service Environment // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - options - EnvironmentsClientUpdateAseNetworkingConfigurationOptions contains the optional parameters for the EnvironmentsClient.UpdateAseNetworkingConfiguration // method. func (client *EnvironmentsClient) UpdateAseNetworkingConfiguration(ctx context.Context, resourceGroupName string, name string, aseNetworkingConfiguration AseV3NetworkingConfiguration, options *EnvironmentsClientUpdateAseNetworkingConfigurationOptions) (EnvironmentsClientUpdateAseNetworkingConfigurationResponse, error) { + var err error + const operationName = "EnvironmentsClient.UpdateAseNetworkingConfiguration" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateAseNetworkingConfigurationCreateRequest(ctx, resourceGroupName, name, aseNetworkingConfiguration, options) if err != nil { return EnvironmentsClientUpdateAseNetworkingConfigurationResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EnvironmentsClientUpdateAseNetworkingConfigurationResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return EnvironmentsClientUpdateAseNetworkingConfigurationResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientUpdateAseNetworkingConfigurationResponse{}, err } - return client.updateAseNetworkingConfigurationHandleResponse(resp) + resp, err := client.updateAseNetworkingConfigurationHandleResponse(httpResp) + return resp, err } // updateAseNetworkingConfigurationCreateRequest creates the UpdateAseNetworkingConfiguration request. @@ -3063,10 +3189,13 @@ func (client *EnvironmentsClient) updateAseNetworkingConfigurationCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, aseNetworkingConfiguration) + if err := runtime.MarshalAsJSON(req, aseNetworkingConfiguration); err != nil { + return nil, err + } + return req, nil } // updateAseNetworkingConfigurationHandleResponse handles the UpdateAseNetworkingConfiguration response. @@ -3081,25 +3210,32 @@ func (client *EnvironmentsClient) updateAseNetworkingConfigurationHandleResponse // UpdateMultiRolePool - Description for Create or update a multi-role pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - multiRolePoolEnvelope - Properties of the multi-role pool. // - options - EnvironmentsClientUpdateMultiRolePoolOptions contains the optional parameters for the EnvironmentsClient.UpdateMultiRolePool // method. func (client *EnvironmentsClient) UpdateMultiRolePool(ctx context.Context, resourceGroupName string, name string, multiRolePoolEnvelope WorkerPoolResource, options *EnvironmentsClientUpdateMultiRolePoolOptions) (EnvironmentsClientUpdateMultiRolePoolResponse, error) { + var err error + const operationName = "EnvironmentsClient.UpdateMultiRolePool" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateMultiRolePoolCreateRequest(ctx, resourceGroupName, name, multiRolePoolEnvelope, options) if err != nil { return EnvironmentsClientUpdateMultiRolePoolResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EnvironmentsClientUpdateMultiRolePoolResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return EnvironmentsClientUpdateMultiRolePoolResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientUpdateMultiRolePoolResponse{}, err } - return client.updateMultiRolePoolHandleResponse(resp) + resp, err := client.updateMultiRolePoolHandleResponse(httpResp) + return resp, err } // updateMultiRolePoolCreateRequest creates the UpdateMultiRolePool request. @@ -3122,10 +3258,13 @@ func (client *EnvironmentsClient) updateMultiRolePoolCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, multiRolePoolEnvelope) + if err := runtime.MarshalAsJSON(req, multiRolePoolEnvelope); err != nil { + return nil, err + } + return req, nil } // updateMultiRolePoolHandleResponse handles the UpdateMultiRolePool response. @@ -3140,7 +3279,7 @@ func (client *EnvironmentsClient) updateMultiRolePoolHandleResponse(resp *http.R // UpdateWorkerPool - Description for Create or update a worker pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - workerPoolName - Name of the worker pool. @@ -3148,18 +3287,25 @@ func (client *EnvironmentsClient) updateMultiRolePoolHandleResponse(resp *http.R // - options - EnvironmentsClientUpdateWorkerPoolOptions contains the optional parameters for the EnvironmentsClient.UpdateWorkerPool // method. func (client *EnvironmentsClient) UpdateWorkerPool(ctx context.Context, resourceGroupName string, name string, workerPoolName string, workerPoolEnvelope WorkerPoolResource, options *EnvironmentsClientUpdateWorkerPoolOptions) (EnvironmentsClientUpdateWorkerPoolResponse, error) { + var err error + const operationName = "EnvironmentsClient.UpdateWorkerPool" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateWorkerPoolCreateRequest(ctx, resourceGroupName, name, workerPoolName, workerPoolEnvelope, options) if err != nil { return EnvironmentsClientUpdateWorkerPoolResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return EnvironmentsClientUpdateWorkerPoolResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return EnvironmentsClientUpdateWorkerPoolResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return EnvironmentsClientUpdateWorkerPoolResponse{}, err } - return client.updateWorkerPoolHandleResponse(resp) + resp, err := client.updateWorkerPoolHandleResponse(httpResp) + return resp, err } // updateWorkerPoolCreateRequest creates the UpdateWorkerPool request. @@ -3186,10 +3332,13 @@ func (client *EnvironmentsClient) updateWorkerPoolCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, workerPoolEnvelope) + if err := runtime.MarshalAsJSON(req, workerPoolEnvelope); err != nil { + return nil, err + } + return req, nil } // updateWorkerPoolHandleResponse handles the UpdateWorkerPool response. @@ -3204,7 +3353,7 @@ func (client *EnvironmentsClient) updateWorkerPoolHandleResponse(resp *http.Resp // BeginUpgrade - Description for Initiate an upgrade of an App Service Environment if one is available. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service Environment. // - options - EnvironmentsClientBeginUpgradeOptions contains the optional parameters for the EnvironmentsClient.BeginUpgrade @@ -3215,29 +3364,40 @@ func (client *EnvironmentsClient) BeginUpgrade(ctx context.Context, resourceGrou if err != nil { return nil, err } - return runtime.NewPoller[EnvironmentsClientUpgradeResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[EnvironmentsClientUpgradeResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[EnvironmentsClientUpgradeResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[EnvironmentsClientUpgradeResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Upgrade - Description for Initiate an upgrade of an App Service Environment if one is available. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *EnvironmentsClient) upgrade(ctx context.Context, resourceGroupName string, name string, options *EnvironmentsClientBeginUpgradeOptions) (*http.Response, error) { + var err error + const operationName = "EnvironmentsClient.BeginUpgrade" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.upgradeCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // upgradeCreateRequest creates the Upgrade request. @@ -3260,7 +3420,7 @@ func (client *EnvironmentsClient) upgradeCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/environments_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/environments_client_example_test.go deleted file mode 100644 index 69537f5b0fcd..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/environments_client_example_test.go +++ /dev/null @@ -1,2889 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_List.json -func ExampleEnvironmentsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewEnvironmentsClient().NewListPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.EnvironmentCollection = armappservice.EnvironmentCollection{ - // Value: []*armappservice.EnvironmentResource{ - // { - // Name: to.Ptr("test-ase"), - // Type: to.Ptr("Microsoft.Web/hostingEnvironments"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase"), - // Kind: to.Ptr("ASEV3"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armappservice.Environment{ - // DedicatedHostCount: to.Ptr[int32](0), - // DNSSuffix: to.Ptr("test-ase.p.azurewebsites.net"), - // FrontEndScaleFactor: to.Ptr[int32](15), - // HasLinuxWorkers: to.Ptr(true), - // InternalLoadBalancingMode: to.Ptr(armappservice.LoadBalancingModeNone), - // IpsslAddressCount: to.Ptr[int32](0), - // MaximumNumberOfMachines: to.Ptr[int32](250), - // MultiSize: to.Ptr("Standard_D2d_v4"), - // NetworkingConfiguration: &armappservice.AseV3NetworkingConfiguration{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/configurations/networking"), - // Properties: &armappservice.AseV3NetworkingConfigurationProperties{ - // AllowNewPrivateEndpointConnections: to.Ptr(false), - // ExternalInboundIPAddresses: []*string{ - // to.Ptr("52.153.248.36")}, - // FtpEnabled: to.Ptr(false), - // InternalInboundIPAddresses: []*string{ - // }, - // LinuxOutboundIPAddresses: []*string{ - // to.Ptr("20.88.241.56"), - // to.Ptr("20.88.241.9")}, - // RemoteDebugEnabled: to.Ptr(false), - // WindowsOutboundIPAddresses: []*string{ - // to.Ptr("20.88.241.56"), - // to.Ptr("20.88.241.9")}, - // }, - // }, - // ProvisioningState: to.Ptr(armappservice.ProvisioningStateSucceeded), - // Status: to.Ptr(armappservice.HostingEnvironmentStatusReady), - // Suspended: to.Ptr(false), - // VirtualNetwork: &armappservice.VirtualNetworkProfile{ - // Name: to.Ptr("delegated"), - // Type: to.Ptr("Microsoft.Network/virtualNetworks/subnets"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-subnet/subnets/delegated"), - // Subnet: to.Ptr(""), - // }, - // ZoneRedundant: to.Ptr(false), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_ListByResourceGroup.json -func ExampleEnvironmentsClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewEnvironmentsClient().NewListByResourceGroupPager("test-rg", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.EnvironmentCollection = armappservice.EnvironmentCollection{ - // Value: []*armappservice.EnvironmentResource{ - // { - // Name: to.Ptr("test-ase"), - // Type: to.Ptr("Microsoft.Web/hostingEnvironments"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase"), - // Kind: to.Ptr("ASEV3"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armappservice.Environment{ - // DedicatedHostCount: to.Ptr[int32](0), - // DNSSuffix: to.Ptr("test-ase.p.azurewebsites.net"), - // FrontEndScaleFactor: to.Ptr[int32](15), - // HasLinuxWorkers: to.Ptr(true), - // InternalLoadBalancingMode: to.Ptr(armappservice.LoadBalancingModeNone), - // IpsslAddressCount: to.Ptr[int32](0), - // MaximumNumberOfMachines: to.Ptr[int32](250), - // MultiSize: to.Ptr("Standard_D2d_v4"), - // NetworkingConfiguration: &armappservice.AseV3NetworkingConfiguration{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/configurations/networking"), - // Properties: &armappservice.AseV3NetworkingConfigurationProperties{ - // AllowNewPrivateEndpointConnections: to.Ptr(false), - // ExternalInboundIPAddresses: []*string{ - // to.Ptr("52.153.248.36")}, - // FtpEnabled: to.Ptr(false), - // InternalInboundIPAddresses: []*string{ - // }, - // LinuxOutboundIPAddresses: []*string{ - // to.Ptr("20.88.241.56"), - // to.Ptr("20.88.241.9")}, - // RemoteDebugEnabled: to.Ptr(false), - // WindowsOutboundIPAddresses: []*string{ - // to.Ptr("20.88.241.56"), - // to.Ptr("20.88.241.9")}, - // }, - // }, - // ProvisioningState: to.Ptr(armappservice.ProvisioningStateSucceeded), - // Status: to.Ptr(armappservice.HostingEnvironmentStatusReady), - // Suspended: to.Ptr(false), - // VirtualNetwork: &armappservice.VirtualNetworkProfile{ - // Name: to.Ptr("delegated"), - // Type: to.Ptr("Microsoft.Network/virtualNetworks/subnets"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-subnet/subnets/delegated"), - // Subnet: to.Ptr(""), - // }, - // ZoneRedundant: to.Ptr(false), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_Get.json -func ExampleEnvironmentsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewEnvironmentsClient().Get(ctx, "test-rg", "test-ase", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.EnvironmentResource = armappservice.EnvironmentResource{ - // Name: to.Ptr("test-ase"), - // Type: to.Ptr("Microsoft.Web/hostingEnvironments"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase"), - // Kind: to.Ptr("ASEV3"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armappservice.Environment{ - // DedicatedHostCount: to.Ptr[int32](0), - // DNSSuffix: to.Ptr("test-ase.p.azurewebsites.net"), - // FrontEndScaleFactor: to.Ptr[int32](15), - // HasLinuxWorkers: to.Ptr(true), - // InternalLoadBalancingMode: to.Ptr(armappservice.LoadBalancingModeNone), - // IpsslAddressCount: to.Ptr[int32](0), - // MaximumNumberOfMachines: to.Ptr[int32](250), - // MultiSize: to.Ptr("Standard_D2d_v4"), - // NetworkingConfiguration: &armappservice.AseV3NetworkingConfiguration{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/configurations/networking"), - // Properties: &armappservice.AseV3NetworkingConfigurationProperties{ - // AllowNewPrivateEndpointConnections: to.Ptr(false), - // ExternalInboundIPAddresses: []*string{ - // to.Ptr("52.153.248.36")}, - // FtpEnabled: to.Ptr(false), - // InternalInboundIPAddresses: []*string{ - // }, - // LinuxOutboundIPAddresses: []*string{ - // to.Ptr("20.88.241.56"), - // to.Ptr("20.88.241.9")}, - // RemoteDebugEnabled: to.Ptr(false), - // WindowsOutboundIPAddresses: []*string{ - // to.Ptr("20.88.241.56"), - // to.Ptr("20.88.241.9")}, - // }, - // }, - // ProvisioningState: to.Ptr(armappservice.ProvisioningStateSucceeded), - // Status: to.Ptr(armappservice.HostingEnvironmentStatusReady), - // Suspended: to.Ptr(false), - // VirtualNetwork: &armappservice.VirtualNetworkProfile{ - // Name: to.Ptr("delegated"), - // Type: to.Ptr("Microsoft.Network/virtualNetworks/subnets"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-subnet/subnets/delegated"), - // Subnet: to.Ptr(""), - // }, - // ZoneRedundant: to.Ptr(false), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_CreateOrUpdate.json -func ExampleEnvironmentsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewEnvironmentsClient().BeginCreateOrUpdate(ctx, "test-rg", "test-ase", armappservice.EnvironmentResource{ - Kind: to.Ptr("Asev3"), - Location: to.Ptr("South Central US"), - Properties: &armappservice.Environment{ - VirtualNetwork: &armappservice.VirtualNetworkProfile{ - ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/delegated"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.EnvironmentResource = armappservice.EnvironmentResource{ - // Name: to.Ptr("test-ase"), - // Type: to.Ptr("Microsoft.Web/hostingEnvironments"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase"), - // Kind: to.Ptr("ASEV3"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armappservice.Environment{ - // DedicatedHostCount: to.Ptr[int32](0), - // DNSSuffix: to.Ptr("test-ase.p.azurewebsites.net"), - // FrontEndScaleFactor: to.Ptr[int32](15), - // HasLinuxWorkers: to.Ptr(true), - // InternalLoadBalancingMode: to.Ptr(armappservice.LoadBalancingModeNone), - // IpsslAddressCount: to.Ptr[int32](0), - // MaximumNumberOfMachines: to.Ptr[int32](250), - // MultiSize: to.Ptr("Standard_D2d_v4"), - // NetworkingConfiguration: &armappservice.AseV3NetworkingConfiguration{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/configurations/networking"), - // Properties: &armappservice.AseV3NetworkingConfigurationProperties{ - // AllowNewPrivateEndpointConnections: to.Ptr(false), - // ExternalInboundIPAddresses: []*string{ - // to.Ptr("52.153.248.36")}, - // FtpEnabled: to.Ptr(false), - // InternalInboundIPAddresses: []*string{ - // }, - // LinuxOutboundIPAddresses: []*string{ - // to.Ptr("20.88.241.56"), - // to.Ptr("20.88.241.9")}, - // RemoteDebugEnabled: to.Ptr(false), - // WindowsOutboundIPAddresses: []*string{ - // to.Ptr("20.88.241.56"), - // to.Ptr("20.88.241.9")}, - // }, - // }, - // ProvisioningState: to.Ptr(armappservice.ProvisioningStateSucceeded), - // Status: to.Ptr(armappservice.HostingEnvironmentStatusReady), - // Suspended: to.Ptr(false), - // VirtualNetwork: &armappservice.VirtualNetworkProfile{ - // Name: to.Ptr("delegated"), - // Type: to.Ptr("Microsoft.Network/virtualNetworks/subnets"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-subnet/subnets/delegated"), - // Subnet: to.Ptr(""), - // }, - // ZoneRedundant: to.Ptr(false), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_Delete.json -func ExampleEnvironmentsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewEnvironmentsClient().BeginDelete(ctx, "test-rg", "test-ase", &armappservice.EnvironmentsClientBeginDeleteOptions{ForceDelete: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_Update.json -func ExampleEnvironmentsClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewEnvironmentsClient().Update(ctx, "test-rg", "test-ase", armappservice.EnvironmentPatchResource{ - Properties: &armappservice.Environment{ - FrontEndScaleFactor: to.Ptr[int32](20), - VirtualNetwork: &armappservice.VirtualNetworkProfile{ - ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-subnet/subnets/delegated"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.EnvironmentResource = armappservice.EnvironmentResource{ - // Name: to.Ptr("test-ase"), - // Type: to.Ptr("Microsoft.Web/hostingEnvironments"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase"), - // Kind: to.Ptr("ASEV3"), - // Location: to.Ptr("South Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armappservice.Environment{ - // DedicatedHostCount: to.Ptr[int32](0), - // DNSSuffix: to.Ptr("test-ase.p.azurewebsites.net"), - // FrontEndScaleFactor: to.Ptr[int32](15), - // HasLinuxWorkers: to.Ptr(true), - // InternalLoadBalancingMode: to.Ptr(armappservice.LoadBalancingModeNone), - // IpsslAddressCount: to.Ptr[int32](0), - // MaximumNumberOfMachines: to.Ptr[int32](250), - // MultiSize: to.Ptr("Standard_D2d_v4"), - // NetworkingConfiguration: &armappservice.AseV3NetworkingConfiguration{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/configurations/networking"), - // Properties: &armappservice.AseV3NetworkingConfigurationProperties{ - // AllowNewPrivateEndpointConnections: to.Ptr(false), - // ExternalInboundIPAddresses: []*string{ - // to.Ptr("52.153.248.36")}, - // FtpEnabled: to.Ptr(false), - // InternalInboundIPAddresses: []*string{ - // }, - // LinuxOutboundIPAddresses: []*string{ - // to.Ptr("20.88.241.56"), - // to.Ptr("20.88.241.9")}, - // RemoteDebugEnabled: to.Ptr(false), - // WindowsOutboundIPAddresses: []*string{ - // to.Ptr("20.88.241.56"), - // to.Ptr("20.88.241.9")}, - // }, - // }, - // ProvisioningState: to.Ptr(armappservice.ProvisioningStateSucceeded), - // Status: to.Ptr(armappservice.HostingEnvironmentStatusReady), - // Suspended: to.Ptr(false), - // VirtualNetwork: &armappservice.VirtualNetworkProfile{ - // Name: to.Ptr("delegated"), - // Type: to.Ptr("Microsoft.Network/virtualNetworks/subnets"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-subnet/subnets/delegated"), - // Subnet: to.Ptr(""), - // }, - // ZoneRedundant: to.Ptr(false), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_ListCapacities.json -func ExampleEnvironmentsClient_NewListCapacitiesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewEnvironmentsClient().NewListCapacitiesPager("test-rg", "test-ase", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.StampCapacityCollection = armappservice.StampCapacityCollection{ - // Value: []*armappservice.StampCapacity{ - // { - // AvailableCapacity: to.Ptr[int64](0), - // ComputeMode: to.Ptr(armappservice.ComputeModeOptionsDedicated), - // ExcludeFromCapacityAllocation: to.Ptr(false), - // IsApplicableForAllComputeModes: to.Ptr(false), - // IsLinux: to.Ptr(false), - // TotalCapacity: to.Ptr[int64](1), - // WorkerSizeID: to.Ptr[int32](0), - // }, - // { - // AvailableCapacity: to.Ptr[int64](0), - // ComputeMode: to.Ptr(armappservice.ComputeModeOptionsDedicated), - // ExcludeFromCapacityAllocation: to.Ptr(false), - // IsApplicableForAllComputeModes: to.Ptr(false), - // IsLinux: to.Ptr(false), - // TotalCapacity: to.Ptr[int64](1), - // WorkerSizeID: to.Ptr[int32](1), - // }, - // { - // AvailableCapacity: to.Ptr[int64](0), - // ComputeMode: to.Ptr(armappservice.ComputeModeOptionsDedicated), - // ExcludeFromCapacityAllocation: to.Ptr(false), - // IsApplicableForAllComputeModes: to.Ptr(false), - // IsLinux: to.Ptr(false), - // TotalCapacity: to.Ptr[int64](1), - // WorkerSizeID: to.Ptr[int32](2), - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_GetVipInfo.json -func ExampleEnvironmentsClient_GetVipInfo() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewEnvironmentsClient().GetVipInfo(ctx, "test-rg", "test-ase", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.AddressResponse = armappservice.AddressResponse{ - // Name: to.Ptr("test-ase"), - // Type: to.Ptr("Microsoft.Web/hostingEnvironments/capacities"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/Microsoft.Web/hostingEnvironments/test-ase/capacities/virtualip"), - // Properties: &armappservice.AddressResponseProperties{ - // OutboundIPAddresses: []*string{ - // to.Ptr("20.112.141.120")}, - // ServiceIPAddress: to.Ptr("20.112.141.120"), - // VipMappings: []*armappservice.VirtualIPMapping{ - // { - // InUse: to.Ptr(false), - // InternalHTTPPort: to.Ptr[int32](20003), - // InternalHTTPSPort: to.Ptr[int32](20001), - // VirtualIP: to.Ptr("20.112.141.135"), - // }, - // { - // InUse: to.Ptr(false), - // InternalHTTPPort: to.Ptr[int32](20004), - // InternalHTTPSPort: to.Ptr[int32](20002), - // VirtualIP: to.Ptr("20.112.141.150"), - // }}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_ChangeVnet.json -func ExampleEnvironmentsClient_BeginChangeVnet() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewEnvironmentsClient().BeginChangeVnet(ctx, "test-rg", "test-ase", armappservice.VirtualNetworkProfile{ - ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - for res.More() { - page, err := res.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.WebAppCollection = armappservice.WebAppCollection{ - // Value: []*armappservice.Site{ - // }, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetAseCustomDnsSuffixConfiguration.json -func ExampleEnvironmentsClient_GetAseCustomDNSSuffixConfiguration() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewEnvironmentsClient().GetAseCustomDNSSuffixConfiguration(ctx, "test-rg", "test-ase", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CustomDNSSuffixConfiguration = armappservice.CustomDNSSuffixConfiguration{ - // Name: to.Ptr("customDnsSuffix"), - // Type: to.Ptr("Microsoft.Web/hostingEnvironments/configurations/customdnssuffix"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/configurations/customdnssuffix"), - // Properties: &armappservice.CustomDNSSuffixConfigurationProperties{ - // CertificateURL: to.Ptr("https://test-kv.vault.azure.net/secrets/contosocert"), - // DNSSuffix: to.Ptr("contoso.com"), - // KeyVaultReferenceIdentity: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/test-rg/providers/microsoft.managedidentity/userassignedidentities/test-user-mi"), - // ProvisioningState: to.Ptr(armappservice.CustomDNSSuffixProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/UpdateAseCustomDnsSuffixConfiguration.json -func ExampleEnvironmentsClient_UpdateAseCustomDNSSuffixConfiguration() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewEnvironmentsClient().UpdateAseCustomDNSSuffixConfiguration(ctx, "test-rg", "test-ase", armappservice.CustomDNSSuffixConfiguration{ - Properties: &armappservice.CustomDNSSuffixConfigurationProperties{ - CertificateURL: to.Ptr("https://test-kv.vault.azure.net/secrets/contosocert"), - DNSSuffix: to.Ptr("contoso.com"), - KeyVaultReferenceIdentity: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/test-rg/providers/microsoft.managedidentity/userassignedidentities/test-user-mi"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CustomDNSSuffixConfiguration = armappservice.CustomDNSSuffixConfiguration{ - // Name: to.Ptr("customDnsSuffix"), - // Type: to.Ptr("Microsoft.Web/hostingEnvironments/configurations/customdnssuffix"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/configurations/customdnssuffix"), - // Properties: &armappservice.CustomDNSSuffixConfigurationProperties{ - // CertificateURL: to.Ptr("https://test-kv.vault.azure.net/secrets/contosocert"), - // DNSSuffix: to.Ptr("contoso.com"), - // KeyVaultReferenceIdentity: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/test-rg/providers/microsoft.managedidentity/userassignedidentities/test-user-mi"), - // ProvisioningState: to.Ptr(armappservice.CustomDNSSuffixProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/DeleteAseCustomDnsSuffixConfiguration.json -func ExampleEnvironmentsClient_DeleteAseCustomDNSSuffixConfiguration() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewEnvironmentsClient().DeleteAseCustomDNSSuffixConfiguration(ctx, "test-rg", "test-ase", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Interface = map[string]any{ - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_GetAseV3NetworkingConfiguration.json -func ExampleEnvironmentsClient_GetAseV3NetworkingConfiguration() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewEnvironmentsClient().GetAseV3NetworkingConfiguration(ctx, "test-rg", "test-ase", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.AseV3NetworkingConfiguration = armappservice.AseV3NetworkingConfiguration{ - // Name: to.Ptr("networking"), - // Type: to.Ptr("Microsoft.Web/hostingEnvironments/configurations/networking"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/configurations/networking"), - // Properties: &armappservice.AseV3NetworkingConfigurationProperties{ - // AllowNewPrivateEndpointConnections: to.Ptr(false), - // ExternalInboundIPAddresses: []*string{ - // to.Ptr("52.153.248.36")}, - // FtpEnabled: to.Ptr(false), - // InternalInboundIPAddresses: []*string{ - // }, - // LinuxOutboundIPAddresses: []*string{ - // to.Ptr("20.88.241.56"), - // to.Ptr("20.88.241.9")}, - // RemoteDebugEnabled: to.Ptr(false), - // WindowsOutboundIPAddresses: []*string{ - // to.Ptr("20.88.241.56"), - // to.Ptr("20.88.241.9")}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_UpdateAseNetworkingConfiguration.json -func ExampleEnvironmentsClient_UpdateAseNetworkingConfiguration() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewEnvironmentsClient().UpdateAseNetworkingConfiguration(ctx, "test-rg", "test-ase", armappservice.AseV3NetworkingConfiguration{ - Properties: &armappservice.AseV3NetworkingConfigurationProperties{ - FtpEnabled: to.Ptr(true), - RemoteDebugEnabled: to.Ptr(true), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.AseV3NetworkingConfiguration = armappservice.AseV3NetworkingConfiguration{ - // Name: to.Ptr("networking"), - // Type: to.Ptr("Microsoft.Web/hostingEnvironments/configurations/networking"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/configurations/networking"), - // Properties: &armappservice.AseV3NetworkingConfigurationProperties{ - // AllowNewPrivateEndpointConnections: to.Ptr(false), - // ExternalInboundIPAddresses: []*string{ - // to.Ptr("52.153.248.36")}, - // FtpEnabled: to.Ptr(true), - // InternalInboundIPAddresses: []*string{ - // }, - // LinuxOutboundIPAddresses: []*string{ - // to.Ptr("20.88.241.56"), - // to.Ptr("20.88.241.9")}, - // RemoteDebugEnabled: to.Ptr(true), - // WindowsOutboundIPAddresses: []*string{ - // to.Ptr("20.88.241.56"), - // to.Ptr("20.88.241.9")}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_ListDiagnostics.json -func ExampleEnvironmentsClient_ListDiagnostics() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewEnvironmentsClient().ListDiagnostics(ctx, "test-rg", "test-ase", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.HostingEnvironmentDiagnosticsArray = []*armappservice.HostingEnvironmentDiagnostics{} -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_GetDiagnosticsItem.json -func ExampleEnvironmentsClient_GetDiagnosticsItem() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewEnvironmentsClient().GetDiagnosticsItem(ctx, "test-rg", "test-ase", "test-diagnostic", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.HostingEnvironmentDiagnostics = armappservice.HostingEnvironmentDiagnostics{ - // Name: to.Ptr("test-diagnostic"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetInboundNetworkDependenciesEndpoints.json -func ExampleEnvironmentsClient_NewGetInboundNetworkDependenciesEndpointsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewEnvironmentsClient().NewGetInboundNetworkDependenciesEndpointsPager("Sample-WestUSResourceGroup", "SampleAse", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.InboundEnvironmentEndpointCollection = armappservice.InboundEnvironmentEndpointCollection{ - // Value: []*armappservice.InboundEnvironmentEndpoint{ - // { - // Description: to.Ptr("App Service management"), - // Endpoints: []*string{ - // to.Ptr("70.37.57.58/32"), - // to.Ptr("157.55.208.185/32"), - // to.Ptr("23.102.188.65/32"), - // to.Ptr("191.236.154.88/32"), - // to.Ptr("52.174.22.21/32"), - // to.Ptr("13.94.149.179/32"), - // to.Ptr("13.94.143.126/32"), - // to.Ptr("13.94.141.115/32"), - // to.Ptr("52.178.195.197/32"), - // to.Ptr("52.178.190.65/32"), - // to.Ptr("52.178.184.149/32"), - // to.Ptr("52.178.177.147/32"), - // to.Ptr("13.75.127.117/32"), - // to.Ptr("40.83.125.161/32"), - // to.Ptr("40.83.121.56/32"), - // to.Ptr("40.83.120.64/32"), - // to.Ptr("52.187.56.50/32"), - // to.Ptr("52.187.63.37/32"), - // to.Ptr("52.187.59.251/32"), - // to.Ptr("52.187.63.19/32"), - // to.Ptr("52.165.158.140/32"), - // to.Ptr("52.165.152.214/32"), - // to.Ptr("52.165.154.193/32"), - // to.Ptr("52.165.153.122/32"), - // to.Ptr("104.44.129.255/32"), - // to.Ptr("104.44.134.255/32"), - // to.Ptr("104.44.129.243/32"), - // to.Ptr("104.44.129.141/32"), - // to.Ptr("65.52.193.203/32"), - // to.Ptr("70.37.89.222/32"), - // to.Ptr("13.64.115.203/32"), - // to.Ptr("52.225.177.153/32"), - // to.Ptr("65.52.172.237/32")}, - // Ports: []*string{ - // to.Ptr("454"), - // to.Ptr("455")}, - // }, - // { - // Description: to.Ptr("App Service Environment VIP"), - // Endpoints: []*string{ - // to.Ptr("52.247.209.18/32")}, - // Ports: []*string{ - // to.Ptr("454"), - // to.Ptr("455"), - // to.Ptr("16001")}, - // }, - // { - // Description: to.Ptr("App Service Environment subnet"), - // Endpoints: []*string{ - // to.Ptr("192.168.250.0/24")}, - // Ports: []*string{ - // to.Ptr("All")}, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_ListMultiRolePools.json -func ExampleEnvironmentsClient_NewListMultiRolePoolsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewEnvironmentsClient().NewListMultiRolePoolsPager("test-rg", "test-ase", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.WorkerPoolCollection = armappservice.WorkerPoolCollection{ - // Value: []*armappservice.WorkerPoolResource{ - // { - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Web/hostingEnvironments/multiRolePools"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/multiRolePools/default"), - // Properties: &armappservice.WorkerPool{ - // InstanceNames: []*string{ - // to.Ptr("10.7.1.8"), - // to.Ptr("10.7.1.9")}, - // WorkerCount: to.Ptr[int32](2), - // WorkerSize: to.Ptr("Standard_D1_V2"), - // }, - // SKU: &armappservice.SKUDescription{ - // Name: to.Ptr("Q1"), - // Capacity: to.Ptr[int32](2), - // Family: to.Ptr("Q"), - // Size: to.Ptr("Q1"), - // Tier: to.Ptr("Quantum"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_GetMultiRolePool.json -func ExampleEnvironmentsClient_GetMultiRolePool() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewEnvironmentsClient().GetMultiRolePool(ctx, "test-rg", "test-ase", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.WorkerPoolResource = armappservice.WorkerPoolResource{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Web/hostingEnvironments/multiRolePools"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/multiRolePools/default"), - // Properties: &armappservice.WorkerPool{ - // InstanceNames: []*string{ - // to.Ptr("10.7.1.8"), - // to.Ptr("10.7.1.9")}, - // WorkerCount: to.Ptr[int32](2), - // WorkerSize: to.Ptr("Standard_D1_V2"), - // }, - // SKU: &armappservice.SKUDescription{ - // Name: to.Ptr("Q1"), - // Capacity: to.Ptr[int32](2), - // Family: to.Ptr("Q"), - // Size: to.Ptr("Q1"), - // Tier: to.Ptr("Quantum"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_CreateOrUpdateMultiRolePool.json -func ExampleEnvironmentsClient_BeginCreateOrUpdateMultiRolePool() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewEnvironmentsClient().BeginCreateOrUpdateMultiRolePool(ctx, "test-rg", "test-ase", armappservice.WorkerPoolResource{ - Properties: &armappservice.WorkerPool{ - WorkerCount: to.Ptr[int32](3), - WorkerSize: to.Ptr("Medium"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.WorkerPoolResource = armappservice.WorkerPoolResource{ - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_ListMultiRolePoolInstanceMetricDefinitions.json -func ExampleEnvironmentsClient_NewListMultiRolePoolInstanceMetricDefinitionsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewEnvironmentsClient().NewListMultiRolePoolInstanceMetricDefinitionsPager("test-rg", "test-ase", "10.7.1.8", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ResourceMetricDefinitionCollection = armappservice.ResourceMetricDefinitionCollection{ - // Value: []*armappservice.ResourceMetricDefinition{ - // { - // Name: to.Ptr("CpuPercentage"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/metricdefinitions/cpupercentage"), - // }, - // { - // Name: to.Ptr("MemoryPercentage"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/metricdefinitions/MemoryPercentage"), - // }, - // { - // Name: to.Ptr("DiskQueueLength"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/metricdefinitions/DiskQueueLength"), - // }, - // { - // Name: to.Ptr("HttpQueueLength"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/metricdefinitions/HttpQueueLength"), - // }, - // { - // Name: to.Ptr("BytesReceived"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/metricdefinitions/BytesReceived"), - // }, - // { - // Name: to.Ptr("BytesSent"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/metricdefinitions/BytesSent"), - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_ListMultiRoleMetricDefinitions.json -func ExampleEnvironmentsClient_NewListMultiRoleMetricDefinitionsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewEnvironmentsClient().NewListMultiRoleMetricDefinitionsPager("test-rg", "test-ase", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ResourceMetricDefinitionCollection = armappservice.ResourceMetricDefinitionCollection{ - // Value: []*armappservice.ResourceMetricDefinition{ - // { - // Name: to.Ptr("CpuPercentage"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/metricdefinitions/cpupercentage"), - // }, - // { - // Name: to.Ptr("MemoryPercentage"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/metricdefinitions/MemoryPercentage"), - // }, - // { - // Name: to.Ptr("DiskQueueLength"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/metricdefinitions/DiskQueueLength"), - // }, - // { - // Name: to.Ptr("HttpQueueLength"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/metricdefinitions/HttpQueueLength"), - // }, - // { - // Name: to.Ptr("BytesReceived"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/metricdefinitions/BytesReceived"), - // }, - // { - // Name: to.Ptr("BytesSent"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/metricdefinitions/BytesSent"), - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_ListMultiRolePoolSkus.json -func ExampleEnvironmentsClient_NewListMultiRolePoolSKUsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewEnvironmentsClient().NewListMultiRolePoolSKUsPager("test-rg", "test-ase", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.SKUInfoCollection = armappservice.SKUInfoCollection{ - // Value: []*armappservice.SKUInfo{ - // { - // Capacity: &armappservice.SKUCapacity{ - // Default: to.Ptr[int32](2), - // Maximum: to.Ptr[int32](247), - // Minimum: to.Ptr[int32](2), - // ScaleType: to.Ptr("automatic"), - // }, - // ResourceType: to.Ptr("Microsoft.Web/hostingEnvironments/multiRolePools"), - // SKU: &armappservice.SKUDescription{ - // Name: to.Ptr("S2"), - // Tier: to.Ptr("Standard"), - // }, - // }, - // { - // Capacity: &armappservice.SKUCapacity{ - // Default: to.Ptr[int32](2), - // Maximum: to.Ptr[int32](247), - // Minimum: to.Ptr[int32](2), - // ScaleType: to.Ptr("automatic"), - // }, - // ResourceType: to.Ptr("Microsoft.Web/hostingEnvironments/multiRolePools"), - // SKU: &armappservice.SKUDescription{ - // Name: to.Ptr("S3"), - // Tier: to.Ptr("Standard"), - // }, - // }, - // { - // Capacity: &armappservice.SKUCapacity{ - // Default: to.Ptr[int32](2), - // Maximum: to.Ptr[int32](247), - // Minimum: to.Ptr[int32](2), - // ScaleType: to.Ptr("automatic"), - // }, - // ResourceType: to.Ptr("Microsoft.Web/hostingEnvironments/multiRolePools"), - // SKU: &armappservice.SKUDescription{ - // Name: to.Ptr("S4"), - // Tier: to.Ptr("Standard"), - // }, - // }, - // { - // Capacity: &armappservice.SKUCapacity{ - // Default: to.Ptr[int32](2), - // Maximum: to.Ptr[int32](247), - // Minimum: to.Ptr[int32](2), - // ScaleType: to.Ptr("automatic"), - // }, - // ResourceType: to.Ptr("Microsoft.Web/hostingEnvironments/multiRolePools"), - // SKU: &armappservice.SKUDescription{ - // Name: to.Ptr("O2"), - // Tier: to.Ptr("Optimized"), - // }, - // }, - // { - // Capacity: &armappservice.SKUCapacity{ - // Default: to.Ptr[int32](2), - // Maximum: to.Ptr[int32](247), - // Minimum: to.Ptr[int32](2), - // ScaleType: to.Ptr("automatic"), - // }, - // ResourceType: to.Ptr("Microsoft.Web/hostingEnvironments/multiRolePools"), - // SKU: &armappservice.SKUDescription{ - // Name: to.Ptr("O3"), - // Tier: to.Ptr("Optimized"), - // }, - // }, - // { - // Capacity: &armappservice.SKUCapacity{ - // Default: to.Ptr[int32](2), - // Maximum: to.Ptr[int32](247), - // Minimum: to.Ptr[int32](2), - // ScaleType: to.Ptr("automatic"), - // }, - // ResourceType: to.Ptr("Microsoft.Web/hostingEnvironments/multiRolePools"), - // SKU: &armappservice.SKUDescription{ - // Name: to.Ptr("O4"), - // Tier: to.Ptr("Optimized"), - // }, - // }, - // { - // Capacity: &armappservice.SKUCapacity{ - // Default: to.Ptr[int32](2), - // Maximum: to.Ptr[int32](247), - // Minimum: to.Ptr[int32](2), - // ScaleType: to.Ptr("automatic"), - // }, - // ResourceType: to.Ptr("Microsoft.Web/hostingEnvironments/multiRolePools"), - // SKU: &armappservice.SKUDescription{ - // Name: to.Ptr("Q1"), - // Tier: to.Ptr("Quantum"), - // }, - // }, - // { - // Capacity: &armappservice.SKUCapacity{ - // Default: to.Ptr[int32](2), - // Maximum: to.Ptr[int32](247), - // Minimum: to.Ptr[int32](2), - // ScaleType: to.Ptr("automatic"), - // }, - // ResourceType: to.Ptr("Microsoft.Web/hostingEnvironments/multiRolePools"), - // SKU: &armappservice.SKUDescription{ - // Name: to.Ptr("Q2"), - // Tier: to.Ptr("Quantum"), - // }, - // }, - // { - // Capacity: &armappservice.SKUCapacity{ - // Default: to.Ptr[int32](2), - // Maximum: to.Ptr[int32](247), - // Minimum: to.Ptr[int32](2), - // ScaleType: to.Ptr("automatic"), - // }, - // ResourceType: to.Ptr("Microsoft.Web/hostingEnvironments/multiRolePools"), - // SKU: &armappservice.SKUDescription{ - // Name: to.Ptr("Q3"), - // Tier: to.Ptr("Quantum"), - // }, - // }, - // { - // Capacity: &armappservice.SKUCapacity{ - // Default: to.Ptr[int32](2), - // Maximum: to.Ptr[int32](247), - // Minimum: to.Ptr[int32](2), - // ScaleType: to.Ptr("automatic"), - // }, - // ResourceType: to.Ptr("Microsoft.Web/hostingEnvironments/multiRolePools"), - // SKU: &armappservice.SKUDescription{ - // Name: to.Ptr("Q4"), - // Tier: to.Ptr("Quantum"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_TestUpgradeAvailableNotification.json -func ExampleEnvironmentsClient_TestUpgradeAvailableNotification() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewEnvironmentsClient().TestUpgradeAvailableNotification(ctx, "rg", "SampleHostingEnvironment", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_Upgrade.json -func ExampleEnvironmentsClient_BeginUpgrade() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewEnvironmentsClient().BeginUpgrade(ctx, "rg", "SampleHostingEnvironment", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_ListMultiRoleUsages.json -func ExampleEnvironmentsClient_NewListMultiRoleUsagesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewEnvironmentsClient().NewListMultiRoleUsagesPager("test-rg", "test-ase", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.UsageCollection = armappservice.UsageCollection{ - // Value: []*armappservice.Usage{ - // }, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_ListOperations.json -func ExampleEnvironmentsClient_ListOperations() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewEnvironmentsClient().ListOperations(ctx, "test-rg", "test-ase", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.OperationArray = []*armappservice.Operation{ - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetOutboundNetworkDependenciesEndpoints.json -func ExampleEnvironmentsClient_NewGetOutboundNetworkDependenciesEndpointsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewEnvironmentsClient().NewGetOutboundNetworkDependenciesEndpointsPager("Sample-WestUSResourceGroup", "SampleAse", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.OutboundEnvironmentEndpointCollection = armappservice.OutboundEnvironmentEndpointCollection{ - // Value: []*armappservice.OutboundEnvironmentEndpoint{ - // { - // Category: to.Ptr("Azure Storage"), - // Endpoints: []*armappservice.EndpointDependency{ - // { - // DomainName: to.Ptr("blob.core.windows.net"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("52.183.104.36"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](42.0469), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("52.183.104.36"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](41.7038), - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("queue.core.windows.net"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("52.183.104.25"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](37.326), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("52.183.104.25"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](37.513600000000004), - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("table.core.windows.net"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("52.183.104.26"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](32.789), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("52.183.104.26"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](1.8702), - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("file.core.windows.net"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("52.183.104.28"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](36.7378), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("52.183.104.28"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](36.7108), - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("blob.core.windows.net"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("13.77.184.64"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](4.0261000000000005), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("13.77.184.64"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](3.8264), - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("queue.core.windows.net"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("13.77.184.73"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](40.8523), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("13.77.184.73"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](40.7501), - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("table.core.windows.net"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("13.77.184.74"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](1.2071), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("13.77.184.74"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](38.2975), - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("file.core.windows.net"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("13.77.184.76"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](59.383700000000005), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("13.77.184.76"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](60.0775), - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("blob.core.windows.net"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("13.77.184.64"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](3.5512), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("13.77.184.64"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](2.6777), - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("queue.core.windows.net"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("13.77.184.73"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](3.5204), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("13.77.184.73"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](2.8193), - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("table.core.windows.net"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("13.77.184.74"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](3.2720000000000002), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("13.77.184.74"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](3.0147), - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("file.core.windows.net"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("13.77.184.76"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](3.2387), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("13.77.184.76"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](3.2804), - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("blob.core.windows.net"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("13.66.176.16"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](43.025200000000005), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("13.66.176.16"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](43.1683), - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("queue.core.windows.net"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("13.66.176.25"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](41.8598), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("13.66.176.25"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](41.9805), - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("table.core.windows.net"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("13.66.176.26"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](30.542900000000003), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("13.66.176.26"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](0.9832000000000001), - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("file.core.windows.net"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("13.66.176.28"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](35.9562), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("13.66.176.28"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](36.0643), - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("blob.core.windows.net"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("13.77.184.64"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](3.2829), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("13.77.184.64"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](2.3393), - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("queue.core.windows.net"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("13.77.184.73"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](3.4103000000000003), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("13.77.184.73"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](4.1032), - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("table.core.windows.net"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("13.77.184.74"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](3.1141), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("13.77.184.74"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](3.0247), - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("file.core.windows.net"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("13.77.184.76"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](2.834), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("13.77.184.76"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](2.8198000000000003), - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("blob.core.windows.net"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("13.77.184.64"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](1.3855000000000002), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("13.77.184.64"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](1.0594000000000001), - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("queue.core.windows.net"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("13.77.184.73"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](2.4717000000000002), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("13.77.184.73"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](2.4827), - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("table.core.windows.net"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("13.77.184.74"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](3.395), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("13.77.184.74"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](3.1701), - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("file.core.windows.net"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("13.77.184.76"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](1.4308), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("13.77.184.76"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](22.5866), - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("blob.core.windows.net"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("13.77.184.64"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](2.5372), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("13.77.184.64"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](2.4626), - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("queue.core.windows.net"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("13.77.184.73"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](3.7873), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("13.77.184.73"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](4.1911000000000005), - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("table.core.windows.net"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("13.77.184.74"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](2.9162000000000003), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("13.77.184.74"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](2.7896), - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("file.core.windows.net"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("13.77.184.76"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](26.723100000000002), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("13.77.184.76"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](26.735200000000003), - // Port: to.Ptr[int32](443), - // }}, - // }}, - // }, - // { - // Category: to.Ptr("Azure SQL Database"), - // Endpoints: []*armappservice.EndpointDependency{ - // { - // DomainName: to.Ptr("database.windows.net"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("13.66.226.202"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](1.5964), - // Port: to.Ptr[int32](1433), - // }}, - // }}, - // }, - // { - // Category: to.Ptr("Azure Management"), - // Endpoints: []*armappservice.EndpointDependency{ - // { - // DomainName: to.Ptr("management.core.windows.net"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("23.102.135.246"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](46.5764), - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("admin.core.windows.net"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("23.102.135.247"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](47.408), - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("management.azure.com"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("52.151.25.45"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](3.9529), - // Port: to.Ptr[int32](443), - // }}, - // }}, - // }, - // { - // Category: to.Ptr("Azure Active Directory"), - // Endpoints: []*armappservice.EndpointDependency{ - // { - // DomainName: to.Ptr("graph.windows.net"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("20.190.133.83"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](3.2264), - // Port: to.Ptr[int32](443), - // }, - // { - // IPAddress: to.Ptr("20.190.133.81"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](3.2264), - // Port: to.Ptr[int32](443), - // }, - // { - // IPAddress: to.Ptr("20.190.133.67"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](3.2264), - // Port: to.Ptr[int32](443), - // }, - // { - // IPAddress: to.Ptr("40.126.5.34"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](3.2264), - // Port: to.Ptr[int32](443), - // }}, - // }}, - // }, - // { - // Category: to.Ptr("Regional Service"), - // Endpoints: []*armappservice.EndpointDependency{ - // { - // DomainName: to.Ptr("gr-prod-mwh.cloudapp.net"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("13.66.225.188"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](3.3826), - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("az-prod.metrics.nsatc.net"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("40.77.24.27"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](38.5647), - // Port: to.Ptr[int32](443), - // }}, - // }}, - // }, - // { - // Category: to.Ptr("SSL Certificate Verification"), - // Endpoints: []*armappservice.EndpointDependency{ - // { - // DomainName: to.Ptr("ocsp.msocsp.com"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("104.18.25.243"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](6.0651), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("104.18.25.243"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](12.888), - // Port: to.Ptr[int32](443), - // }, - // { - // IPAddress: to.Ptr("104.18.24.243"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](6.0651), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("104.18.24.243"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](12.888), - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("mscrl.microsoft.com"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("152.199.4.33"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](6.742900000000001), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("152.199.4.33"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](7.436100000000001), - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("crl.microsoft.com"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("23.215.102.10"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](25.136200000000002), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("23.215.102.10"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](25.0085), - // Port: to.Ptr[int32](443), - // }, - // { - // IPAddress: to.Ptr("23.215.102.42"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](25.136200000000002), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("23.215.102.42"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](25.0085), - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("www.microsoft.com"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("23.49.13.56"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](7.9229), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("23.49.13.56"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](8.4871), - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("crl3.digicert.com"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("72.21.91.29"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](5.4074), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("72.21.91.29"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](5.577), - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("ocsp.digicert.com"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("72.21.91.29"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](6.8989), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("72.21.91.29"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](5.667400000000001), - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("cacerts.digicert.com"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("104.18.11.39"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](10.772400000000001), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("104.18.11.39"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](10.7705), - // Port: to.Ptr[int32](443), - // }, - // { - // IPAddress: to.Ptr("104.18.10.39"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](10.772400000000001), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("104.18.10.39"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](10.7705), - // Port: to.Ptr[int32](443), - // }}, - // }, - // { - // DomainName: to.Ptr("www.thawte.com"), - // EndpointDetails: []*armappservice.EndpointDetail{ - // { - // IPAddress: to.Ptr("54.69.98.161"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](47.532900000000005), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("54.69.98.161"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](48.5362), - // Port: to.Ptr[int32](443), - // }, - // { - // IPAddress: to.Ptr("35.167.62.148"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](47.532900000000005), - // Port: to.Ptr[int32](80), - // }, - // { - // IPAddress: to.Ptr("35.167.62.148"), - // IsAccessible: to.Ptr(true), - // Latency: to.Ptr[float64](48.5362), - // Port: to.Ptr[int32](443), - // }}, - // }}, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_GetPrivateEndpointConnectionList.json -func ExampleEnvironmentsClient_NewGetPrivateEndpointConnectionListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewEnvironmentsClient().NewGetPrivateEndpointConnectionListPager("test-rg", "test-ase", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.PrivateEndpointConnectionCollection = armappservice.PrivateEndpointConnectionCollection{ - // Value: []*armappservice.RemotePrivateEndpointConnectionARMResource{ - // { - // Name: to.Ptr("fa38656c-034e-43d8-adce-fe06ce039c98"), - // Type: to.Ptr("Microsoft.Web/hostingEnvironments/privateEndpointConnections"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/privateEndpointConnections/fa38656c-034e-43d8-adce-fe06ce039c98"), - // Properties: &armappservice.RemotePrivateEndpointConnectionARMResourceProperties{ - // IPAddresses: []*string{ - // }, - // PrivateEndpoint: &armappservice.ArmIDWrapper{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Network/test-privateEndpoint"), - // }, - // PrivateLinkServiceConnectionState: &armappservice.PrivateLinkConnectionState{ - // Description: to.Ptr("Please approve my connection, thanks!"), - // ActionsRequired: to.Ptr("None"), - // Status: to.Ptr("Disconnecting"), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_GetPrivateEndpointConnection.json -func ExampleEnvironmentsClient_GetPrivateEndpointConnection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewEnvironmentsClient().GetPrivateEndpointConnection(ctx, "test-rg", "test-ase", "fa38656c-034e-43d8-adce-fe06ce039c98", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.RemotePrivateEndpointConnectionARMResource = armappservice.RemotePrivateEndpointConnectionARMResource{ - // Name: to.Ptr("fa38656c-034e-43d8-adce-fe06ce039c98"), - // Type: to.Ptr("Microsoft.Web/hostingEnvironments/privateEndpointConnections"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/privateEndpointConnections/fa38656c-034e-43d8-adce-fe06ce039c98"), - // Properties: &armappservice.RemotePrivateEndpointConnectionARMResourceProperties{ - // IPAddresses: []*string{ - // }, - // PrivateEndpoint: &armappservice.ArmIDWrapper{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Network/test-privateEndpoint"), - // }, - // PrivateLinkServiceConnectionState: &armappservice.PrivateLinkConnectionState{ - // Description: to.Ptr("Please approve my connection, thanks!"), - // ActionsRequired: to.Ptr("None"), - // Status: to.Ptr("Disconnecting"), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_ApproveOrRejectPrivateEndpointConnection.json -func ExampleEnvironmentsClient_BeginApproveOrRejectPrivateEndpointConnection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewEnvironmentsClient().BeginApproveOrRejectPrivateEndpointConnection(ctx, "test-rg", "test-ase", "fa38656c-034e-43d8-adce-fe06ce039c98", armappservice.PrivateLinkConnectionApprovalRequestResource{ - Properties: &armappservice.PrivateLinkConnectionApprovalRequest{ - PrivateLinkServiceConnectionState: &armappservice.PrivateLinkConnectionState{ - Description: to.Ptr("Approved by johndoe@company.com"), - Status: to.Ptr("Approved"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.RemotePrivateEndpointConnectionARMResource = armappservice.RemotePrivateEndpointConnectionARMResource{ - // Name: to.Ptr("fa38656c-034e-43d8-adce-fe06ce039c98"), - // Type: to.Ptr("Microsoft.Web/hostingEnvironments/privateEndpointConnections"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/privateEndpointConnections/fa38656c-034e-43d8-adce-fe06ce039c98"), - // Properties: &armappservice.RemotePrivateEndpointConnectionARMResourceProperties{ - // IPAddresses: []*string{ - // }, - // PrivateEndpoint: &armappservice.ArmIDWrapper{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Network/test-privateEndpoint"), - // }, - // PrivateLinkServiceConnectionState: &armappservice.PrivateLinkConnectionState{ - // Description: to.Ptr("Approved by johndoe@company.com"), - // ActionsRequired: to.Ptr("None"), - // Status: to.Ptr("Approved"), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_DeletePrivateEndpointConnection.json -func ExampleEnvironmentsClient_BeginDeletePrivateEndpointConnection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewEnvironmentsClient().BeginDeletePrivateEndpointConnection(ctx, "test-rg", "test-ase", "fa38656c-034e-43d8-adce-fe06ce039c98", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Interface = map[string]any{ - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_GetPrivateLinkResources.json -func ExampleEnvironmentsClient_GetPrivateLinkResources() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewEnvironmentsClient().GetPrivateLinkResources(ctx, "test-rg", "test-ase", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PrivateLinkResourcesWrapper = armappservice.PrivateLinkResourcesWrapper{ - // Value: []*armappservice.PrivateLinkResource{ - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_Reboot.json -func ExampleEnvironmentsClient_Reboot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewEnvironmentsClient().Reboot(ctx, "test-rg", "test-ase", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_Resume.json -func ExampleEnvironmentsClient_BeginResume() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewEnvironmentsClient().BeginResume(ctx, "test-rg", "test-ase", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - for res.More() { - page, err := res.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.WebAppCollection = armappservice.WebAppCollection{ - // Value: []*armappservice.Site{ - // }, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_ListAppServicePlans.json -func ExampleEnvironmentsClient_NewListAppServicePlansPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewEnvironmentsClient().NewListAppServicePlansPager("test-rg", "test-ase", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.PlanCollection = armappservice.PlanCollection{ - // Value: []*armappservice.Plan{ - // { - // Name: to.Ptr("test-asp"), - // Type: to.Ptr("Microsoft.Web/serverfarms"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/serverfarms/test-asp"), - // Kind: to.Ptr("app"), - // Location: to.Ptr("Central US EUAP"), - // Tags: map[string]*string{ - // }, - // Properties: &armappservice.PlanProperties{ - // ElasticScaleEnabled: to.Ptr(false), - // GeoRegion: to.Ptr("Central US EUAP"), - // HostingEnvironmentProfile: &armappservice.HostingEnvironmentProfile{ - // Name: to.Ptr("test-ase"), - // Type: to.Ptr("Microsoft.Web/hostingEnvironments"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase"), - // }, - // HyperV: to.Ptr(false), - // IsSpot: to.Ptr(false), - // IsXenon: to.Ptr(false), - // MaximumElasticWorkerCount: to.Ptr[int32](0), - // MaximumNumberOfWorkers: to.Ptr[int32](100), - // NumberOfSites: to.Ptr[int32](0), - // PerSiteScaling: to.Ptr(false), - // ProvisioningState: to.Ptr(armappservice.ProvisioningStateSucceeded), - // Reserved: to.Ptr(false), - // ResourceGroup: to.Ptr("test-rg"), - // Status: to.Ptr(armappservice.StatusOptionsReady), - // Subscription: to.Ptr("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"), - // TargetWorkerCount: to.Ptr[int32](1), - // TargetWorkerSizeID: to.Ptr[int32](0), - // ZoneRedundant: to.Ptr(false), - // }, - // SKU: &armappservice.SKUDescription{ - // Name: to.Ptr("I1"), - // Capacity: to.Ptr[int32](0), - // Family: to.Ptr("I"), - // Size: to.Ptr("I1"), - // Tier: to.Ptr("Isolated"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_ListWebApps.json -func ExampleEnvironmentsClient_NewListWebAppsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewEnvironmentsClient().NewListWebAppsPager("test-rg", "test-ase", &armappservice.EnvironmentsClientListWebAppsOptions{PropertiesToInclude: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.WebAppCollection = armappservice.WebAppCollection{ - // Value: []*armappservice.Site{ - // { - // Name: to.Ptr("test-site"), - // Type: to.Ptr("Microsoft.Web/sites"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-site"), - // Location: to.Ptr("Central US EUAP"), - // Properties: &armappservice.SiteProperties{ - // AvailabilityState: to.Ptr(armappservice.SiteAvailabilityStateNormal), - // ClientAffinityEnabled: to.Ptr(true), - // ClientCertEnabled: to.Ptr(false), - // ClientCertMode: to.Ptr(armappservice.ClientCertModeRequired), - // ContainerSize: to.Ptr[int32](0), - // CustomDomainVerificationID: to.Ptr("2982A67AD520FBCD070650FC77814FB03B62927C6EFCA2F5FF3BF5DC60088845"), - // DailyMemoryTimeQuota: to.Ptr[int32](0), - // DefaultHostName: to.Ptr("test-site.test-ase.p.azurewebsites.net"), - // Enabled: to.Ptr(true), - // EnabledHostNames: []*string{ - // to.Ptr("test-site.test-ase.p.azurewebsites.net"), - // to.Ptr("test-site.scm.test-ase.p.azurewebsites.net")}, - // HostNameSSLStates: []*armappservice.HostNameSSLState{ - // { - // Name: to.Ptr("test-site.test-ase.p.azurewebsites.net"), - // HostType: to.Ptr(armappservice.HostTypeStandard), - // SSLState: to.Ptr(armappservice.SSLStateDisabled), - // }, - // { - // Name: to.Ptr("test-site.scm.test-ase.p.azurewebsites.net"), - // HostType: to.Ptr(armappservice.HostTypeRepository), - // SSLState: to.Ptr(armappservice.SSLStateDisabled), - // }}, - // HostNames: []*string{ - // to.Ptr("test-site.test-ase.p.azurewebsites.net")}, - // HostNamesDisabled: to.Ptr(false), - // HostingEnvironmentProfile: &armappservice.HostingEnvironmentProfile{ - // Name: to.Ptr("test-ase"), - // Type: to.Ptr("Microsoft.Web/hostingEnvironments"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase"), - // }, - // HTTPSOnly: to.Ptr(false), - // HyperV: to.Ptr(false), - // IsXenon: to.Ptr(false), - // KeyVaultReferenceIdentity: to.Ptr("SystemAssigned"), - // LastModifiedTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-08T20:41:04.1233333"); return t}()), - // OutboundIPAddresses: to.Ptr("20.112.141.120"), - // PossibleOutboundIPAddresses: to.Ptr("20.112.141.120"), - // RedundancyMode: to.Ptr(armappservice.RedundancyModeNone), - // RepositorySiteName: to.Ptr("test-site"), - // Reserved: to.Ptr(false), - // ResourceGroup: to.Ptr("test-rg"), - // ScmSiteAlsoStopped: to.Ptr(false), - // ServerFarmID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/serverfarms/test-serverfarm"), - // SiteConfig: &armappservice.SiteConfig{ - // FunctionAppScaleLimit: to.Ptr[int32](0), - // LinuxFxVersion: to.Ptr(""), - // MinimumElasticInstanceCount: to.Ptr[int32](0), - // NumberOfWorkers: to.Ptr[int32](1), - // }, - // State: to.Ptr("Running"), - // StorageAccountRequired: to.Ptr(false), - // UsageState: to.Ptr(armappservice.UsageStateNormal), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_Suspend.json -func ExampleEnvironmentsClient_BeginSuspend() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewEnvironmentsClient().BeginSuspend(ctx, "test-rg", "test-ase", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - for res.More() { - page, err := res.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.WebAppCollection = armappservice.WebAppCollection{ - // Value: []*armappservice.Site{ - // }, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_ListUsages.json -func ExampleEnvironmentsClient_NewListUsagesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewEnvironmentsClient().NewListUsagesPager("test-rg", "test-ase", &armappservice.EnvironmentsClientListUsagesOptions{Filter: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.CsmUsageQuotaCollection = armappservice.CsmUsageQuotaCollection{ - // Value: []*armappservice.CsmUsageQuota{ - // { - // Name: &armappservice.LocalizableString{ - // LocalizedValue: to.Ptr("File System Storage"), - // Value: to.Ptr("FileSystemStorage"), - // }, - // CurrentValue: to.Ptr[int64](37888), - // Limit: to.Ptr[int64](1099511627776), - // NextResetTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "9999-12-31T23:59:59.9999999Z"); return t}()), - // Unit: to.Ptr("Bytes"), - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_ListWorkerPools.json -func ExampleEnvironmentsClient_NewListWorkerPoolsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewEnvironmentsClient().NewListWorkerPoolsPager("test-rg", "test-ase", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.WorkerPoolCollection = armappservice.WorkerPoolCollection{ - // Value: []*armappservice.WorkerPoolResource{ - // { - // Name: to.Ptr("workerPool1"), - // Type: to.Ptr("Microsoft.Web/hostingEnvironments/workerPools"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/workerPools/workerPool1"), - // Kind: to.Ptr("ASEV1"), - // Properties: &armappservice.WorkerPool{ - // InstanceNames: []*string{ - // }, - // WorkerCount: to.Ptr[int32](2), - // WorkerSize: to.Ptr("Small"), - // WorkerSizeID: to.Ptr[int32](0), - // }, - // }, - // { - // Name: to.Ptr("workerPool2"), - // Type: to.Ptr("Microsoft.Web/hostingEnvironments/workerPools"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/workerPools/workerPool2"), - // Kind: to.Ptr("ASEV1"), - // Properties: &armappservice.WorkerPool{ - // InstanceNames: []*string{ - // }, - // WorkerCount: to.Ptr[int32](0), - // WorkerSize: to.Ptr("Small"), - // WorkerSizeID: to.Ptr[int32](1), - // }, - // }, - // { - // Name: to.Ptr("workerPool3"), - // Type: to.Ptr("Microsoft.Web/hostingEnvironments/workerPools"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/workerPools/workerPool3"), - // Kind: to.Ptr("ASEV1"), - // Properties: &armappservice.WorkerPool{ - // InstanceNames: []*string{ - // }, - // WorkerCount: to.Ptr[int32](0), - // WorkerSize: to.Ptr("Small"), - // WorkerSizeID: to.Ptr[int32](2), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_GetWorkerPool.json -func ExampleEnvironmentsClient_GetWorkerPool() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewEnvironmentsClient().GetWorkerPool(ctx, "test-rg", "test-ase", "workerPool1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.WorkerPoolResource = armappservice.WorkerPoolResource{ - // Name: to.Ptr("workerPool1"), - // Type: to.Ptr("Microsoft.Web/hostingEnvironments/workerPools"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/workerPools/workerPool1"), - // Kind: to.Ptr("ASEV1"), - // Properties: &armappservice.WorkerPool{ - // InstanceNames: []*string{ - // }, - // WorkerCount: to.Ptr[int32](2), - // WorkerSize: to.Ptr("Small"), - // WorkerSizeID: to.Ptr[int32](0), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_CreateOrUpdateWorkerPool.json -func ExampleEnvironmentsClient_BeginCreateOrUpdateWorkerPool() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewEnvironmentsClient().BeginCreateOrUpdateWorkerPool(ctx, "test-rg", "test-ase", "0", armappservice.WorkerPoolResource{ - Properties: &armappservice.WorkerPool{ - WorkerCount: to.Ptr[int32](3), - WorkerSize: to.Ptr("Small"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.WorkerPoolResource = armappservice.WorkerPoolResource{ - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_ListWorkerPoolInstanceMetricDefinitions.json -func ExampleEnvironmentsClient_NewListWorkerPoolInstanceMetricDefinitionsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewEnvironmentsClient().NewListWorkerPoolInstanceMetricDefinitionsPager("test-rg", "test-ase", "0", "10.8.0.7", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ResourceMetricDefinitionCollection = armappservice.ResourceMetricDefinitionCollection{ - // Value: []*armappservice.ResourceMetricDefinition{ - // { - // Name: to.Ptr("CpuPercentage"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/workerPools/0/metricDefinitions/CpuPercentage"), - // }, - // { - // Name: to.Ptr("MemoryPercentage"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/workerPools/0/metricDefinitions/MemoryPercentage"), - // }, - // { - // Name: to.Ptr("DiskQueueLength"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/workerPools/0/metricDefinitions/DiskQueueLength"), - // }, - // { - // Name: to.Ptr("HttpQueueLength"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/workerPools/0/metricDefinitions/HttpQueueLength"), - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_ListWebWorkerMetricDefinitions.json -func ExampleEnvironmentsClient_NewListWebWorkerMetricDefinitionsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewEnvironmentsClient().NewListWebWorkerMetricDefinitionsPager("test-rg", "test-ase", "0", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ResourceMetricDefinitionCollection = armappservice.ResourceMetricDefinitionCollection{ - // Value: []*armappservice.ResourceMetricDefinition{ - // { - // Name: to.Ptr("CpuPercentage"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/workerPools/0/metricDefinitions/CpuPercentage"), - // }, - // { - // Name: to.Ptr("MemoryPercentage"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/workerPools/0/metricDefinitions/MemoryPercentage"), - // }, - // { - // Name: to.Ptr("DiskQueueLength"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/workerPools/0/metricDefinitions/DiskQueueLength"), - // }, - // { - // Name: to.Ptr("HttpQueueLength"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/workerPools/0/metricDefinitions/HttpQueueLength"), - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_ListWorkerPoolSkus.json -func ExampleEnvironmentsClient_NewListWorkerPoolSKUsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewEnvironmentsClient().NewListWorkerPoolSKUsPager("test-rg", "test-ase", "workerPool1", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.SKUInfoCollection = armappservice.SKUInfoCollection{ - // Value: []*armappservice.SKUInfo{ - // { - // Capacity: &armappservice.SKUCapacity{ - // Default: to.Ptr[int32](2), - // Maximum: to.Ptr[int32](53), - // Minimum: to.Ptr[int32](2), - // ScaleType: to.Ptr("automatic"), - // }, - // ResourceType: to.Ptr("Microsoft.Web/hostingEnvironments/workerPools"), - // SKU: &armappservice.SKUDescription{ - // Name: to.Ptr("S1"), - // Tier: to.Ptr("Standard"), - // }, - // }, - // { - // Capacity: &armappservice.SKUCapacity{ - // Default: to.Ptr[int32](2), - // Maximum: to.Ptr[int32](53), - // Minimum: to.Ptr[int32](2), - // ScaleType: to.Ptr("automatic"), - // }, - // ResourceType: to.Ptr("Microsoft.Web/hostingEnvironments/workerPools"), - // SKU: &armappservice.SKUDescription{ - // Name: to.Ptr("S2"), - // Tier: to.Ptr("Standard"), - // }, - // }, - // { - // Capacity: &armappservice.SKUCapacity{ - // Default: to.Ptr[int32](2), - // Maximum: to.Ptr[int32](53), - // Minimum: to.Ptr[int32](2), - // ScaleType: to.Ptr("automatic"), - // }, - // ResourceType: to.Ptr("Microsoft.Web/hostingEnvironments/workerPools"), - // SKU: &armappservice.SKUDescription{ - // Name: to.Ptr("S3"), - // Tier: to.Ptr("Standard"), - // }, - // }, - // { - // Capacity: &armappservice.SKUCapacity{ - // Default: to.Ptr[int32](2), - // Maximum: to.Ptr[int32](53), - // Minimum: to.Ptr[int32](2), - // ScaleType: to.Ptr("automatic"), - // }, - // ResourceType: to.Ptr("Microsoft.Web/hostingEnvironments/workerPools"), - // SKU: &armappservice.SKUDescription{ - // Name: to.Ptr("S4"), - // Tier: to.Ptr("Standard"), - // }, - // }, - // { - // Capacity: &armappservice.SKUCapacity{ - // Default: to.Ptr[int32](2), - // Maximum: to.Ptr[int32](53), - // Minimum: to.Ptr[int32](2), - // ScaleType: to.Ptr("automatic"), - // }, - // ResourceType: to.Ptr("Microsoft.Web/hostingEnvironments/workerPools"), - // SKU: &armappservice.SKUDescription{ - // Name: to.Ptr("O1"), - // Tier: to.Ptr("Optimized"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AppServiceEnvironments_ListWebWorkerUsages.json -func ExampleEnvironmentsClient_NewListWebWorkerUsagesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewEnvironmentsClient().NewListWebWorkerUsagesPager("test-rg", "test-ase", "0", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.UsageCollection = armappservice.UsageCollection{ - // Value: []*armappservice.Usage{ - // }, - // } - } -} diff --git a/sdk/resourcemanager/appservice/armappservice/fake/certificateorders_server.go b/sdk/resourcemanager/appservice/armappservice/fake/certificateorders_server.go new file mode 100644 index 000000000000..4651756ed09e --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/fake/certificateorders_server.go @@ -0,0 +1,932 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "context" + "errors" + "fmt" + azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" + "net/http" + "net/url" + "regexp" +) + +// CertificateOrdersServer is a fake server for instances of the armappservice.CertificateOrdersClient type. +type CertificateOrdersServer struct { + // BeginCreateOrUpdate is the fake for method CertificateOrdersClient.BeginCreateOrUpdate + // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated + BeginCreateOrUpdate func(ctx context.Context, resourceGroupName string, certificateOrderName string, certificateDistinguishedName armappservice.CertificateOrder, options *armappservice.CertificateOrdersClientBeginCreateOrUpdateOptions) (resp azfake.PollerResponder[armappservice.CertificateOrdersClientCreateOrUpdateResponse], errResp azfake.ErrorResponder) + + // BeginCreateOrUpdateCertificate is the fake for method CertificateOrdersClient.BeginCreateOrUpdateCertificate + // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated + BeginCreateOrUpdateCertificate func(ctx context.Context, resourceGroupName string, certificateOrderName string, name string, keyVaultCertificate armappservice.CertificateResource, options *armappservice.CertificateOrdersClientBeginCreateOrUpdateCertificateOptions) (resp azfake.PollerResponder[armappservice.CertificateOrdersClientCreateOrUpdateCertificateResponse], errResp azfake.ErrorResponder) + + // Delete is the fake for method CertificateOrdersClient.Delete + // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent + Delete func(ctx context.Context, resourceGroupName string, certificateOrderName string, options *armappservice.CertificateOrdersClientDeleteOptions) (resp azfake.Responder[armappservice.CertificateOrdersClientDeleteResponse], errResp azfake.ErrorResponder) + + // DeleteCertificate is the fake for method CertificateOrdersClient.DeleteCertificate + // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent + DeleteCertificate func(ctx context.Context, resourceGroupName string, certificateOrderName string, name string, options *armappservice.CertificateOrdersClientDeleteCertificateOptions) (resp azfake.Responder[armappservice.CertificateOrdersClientDeleteCertificateResponse], errResp azfake.ErrorResponder) + + // Get is the fake for method CertificateOrdersClient.Get + // HTTP status codes to indicate success: http.StatusOK + Get func(ctx context.Context, resourceGroupName string, certificateOrderName string, options *armappservice.CertificateOrdersClientGetOptions) (resp azfake.Responder[armappservice.CertificateOrdersClientGetResponse], errResp azfake.ErrorResponder) + + // GetCertificate is the fake for method CertificateOrdersClient.GetCertificate + // HTTP status codes to indicate success: http.StatusOK + GetCertificate func(ctx context.Context, resourceGroupName string, certificateOrderName string, name string, options *armappservice.CertificateOrdersClientGetCertificateOptions) (resp azfake.Responder[armappservice.CertificateOrdersClientGetCertificateResponse], errResp azfake.ErrorResponder) + + // NewListPager is the fake for method CertificateOrdersClient.NewListPager + // HTTP status codes to indicate success: http.StatusOK + NewListPager func(options *armappservice.CertificateOrdersClientListOptions) (resp azfake.PagerResponder[armappservice.CertificateOrdersClientListResponse]) + + // NewListByResourceGroupPager is the fake for method CertificateOrdersClient.NewListByResourceGroupPager + // HTTP status codes to indicate success: http.StatusOK + NewListByResourceGroupPager func(resourceGroupName string, options *armappservice.CertificateOrdersClientListByResourceGroupOptions) (resp azfake.PagerResponder[armappservice.CertificateOrdersClientListByResourceGroupResponse]) + + // NewListCertificatesPager is the fake for method CertificateOrdersClient.NewListCertificatesPager + // HTTP status codes to indicate success: http.StatusOK + NewListCertificatesPager func(resourceGroupName string, certificateOrderName string, options *armappservice.CertificateOrdersClientListCertificatesOptions) (resp azfake.PagerResponder[armappservice.CertificateOrdersClientListCertificatesResponse]) + + // Reissue is the fake for method CertificateOrdersClient.Reissue + // HTTP status codes to indicate success: http.StatusNoContent + Reissue func(ctx context.Context, resourceGroupName string, certificateOrderName string, reissueCertificateOrderRequest armappservice.ReissueCertificateOrderRequest, options *armappservice.CertificateOrdersClientReissueOptions) (resp azfake.Responder[armappservice.CertificateOrdersClientReissueResponse], errResp azfake.ErrorResponder) + + // Renew is the fake for method CertificateOrdersClient.Renew + // HTTP status codes to indicate success: http.StatusNoContent + Renew func(ctx context.Context, resourceGroupName string, certificateOrderName string, renewCertificateOrderRequest armappservice.RenewCertificateOrderRequest, options *armappservice.CertificateOrdersClientRenewOptions) (resp azfake.Responder[armappservice.CertificateOrdersClientRenewResponse], errResp azfake.ErrorResponder) + + // ResendEmail is the fake for method CertificateOrdersClient.ResendEmail + // HTTP status codes to indicate success: http.StatusNoContent + ResendEmail func(ctx context.Context, resourceGroupName string, certificateOrderName string, options *armappservice.CertificateOrdersClientResendEmailOptions) (resp azfake.Responder[armappservice.CertificateOrdersClientResendEmailResponse], errResp azfake.ErrorResponder) + + // ResendRequestEmails is the fake for method CertificateOrdersClient.ResendRequestEmails + // HTTP status codes to indicate success: http.StatusNoContent + ResendRequestEmails func(ctx context.Context, resourceGroupName string, certificateOrderName string, nameIdentifier armappservice.NameIdentifier, options *armappservice.CertificateOrdersClientResendRequestEmailsOptions) (resp azfake.Responder[armappservice.CertificateOrdersClientResendRequestEmailsResponse], errResp azfake.ErrorResponder) + + // RetrieveCertificateActions is the fake for method CertificateOrdersClient.RetrieveCertificateActions + // HTTP status codes to indicate success: http.StatusOK + RetrieveCertificateActions func(ctx context.Context, resourceGroupName string, name string, options *armappservice.CertificateOrdersClientRetrieveCertificateActionsOptions) (resp azfake.Responder[armappservice.CertificateOrdersClientRetrieveCertificateActionsResponse], errResp azfake.ErrorResponder) + + // RetrieveCertificateEmailHistory is the fake for method CertificateOrdersClient.RetrieveCertificateEmailHistory + // HTTP status codes to indicate success: http.StatusOK + RetrieveCertificateEmailHistory func(ctx context.Context, resourceGroupName string, name string, options *armappservice.CertificateOrdersClientRetrieveCertificateEmailHistoryOptions) (resp azfake.Responder[armappservice.CertificateOrdersClientRetrieveCertificateEmailHistoryResponse], errResp azfake.ErrorResponder) + + // RetrieveSiteSeal is the fake for method CertificateOrdersClient.RetrieveSiteSeal + // HTTP status codes to indicate success: http.StatusOK + RetrieveSiteSeal func(ctx context.Context, resourceGroupName string, certificateOrderName string, siteSealRequest armappservice.SiteSealRequest, options *armappservice.CertificateOrdersClientRetrieveSiteSealOptions) (resp azfake.Responder[armappservice.CertificateOrdersClientRetrieveSiteSealResponse], errResp azfake.ErrorResponder) + + // Update is the fake for method CertificateOrdersClient.Update + // HTTP status codes to indicate success: http.StatusOK + Update func(ctx context.Context, resourceGroupName string, certificateOrderName string, certificateDistinguishedName armappservice.CertificateOrderPatchResource, options *armappservice.CertificateOrdersClientUpdateOptions) (resp azfake.Responder[armappservice.CertificateOrdersClientUpdateResponse], errResp azfake.ErrorResponder) + + // UpdateCertificate is the fake for method CertificateOrdersClient.UpdateCertificate + // HTTP status codes to indicate success: http.StatusOK + UpdateCertificate func(ctx context.Context, resourceGroupName string, certificateOrderName string, name string, keyVaultCertificate armappservice.CertificatePatchResource, options *armappservice.CertificateOrdersClientUpdateCertificateOptions) (resp azfake.Responder[armappservice.CertificateOrdersClientUpdateCertificateResponse], errResp azfake.ErrorResponder) + + // ValidatePurchaseInformation is the fake for method CertificateOrdersClient.ValidatePurchaseInformation + // HTTP status codes to indicate success: http.StatusNoContent + ValidatePurchaseInformation func(ctx context.Context, appServiceCertificateOrder armappservice.CertificateOrder, options *armappservice.CertificateOrdersClientValidatePurchaseInformationOptions) (resp azfake.Responder[armappservice.CertificateOrdersClientValidatePurchaseInformationResponse], errResp azfake.ErrorResponder) + + // VerifyDomainOwnership is the fake for method CertificateOrdersClient.VerifyDomainOwnership + // HTTP status codes to indicate success: http.StatusNoContent + VerifyDomainOwnership func(ctx context.Context, resourceGroupName string, certificateOrderName string, options *armappservice.CertificateOrdersClientVerifyDomainOwnershipOptions) (resp azfake.Responder[armappservice.CertificateOrdersClientVerifyDomainOwnershipResponse], errResp azfake.ErrorResponder) +} + +// NewCertificateOrdersServerTransport creates a new instance of CertificateOrdersServerTransport with the provided implementation. +// The returned CertificateOrdersServerTransport instance is connected to an instance of armappservice.CertificateOrdersClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewCertificateOrdersServerTransport(srv *CertificateOrdersServer) *CertificateOrdersServerTransport { + return &CertificateOrdersServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armappservice.CertificateOrdersClientCreateOrUpdateResponse]](), + beginCreateOrUpdateCertificate: newTracker[azfake.PollerResponder[armappservice.CertificateOrdersClientCreateOrUpdateCertificateResponse]](), + newListPager: newTracker[azfake.PagerResponder[armappservice.CertificateOrdersClientListResponse]](), + newListByResourceGroupPager: newTracker[azfake.PagerResponder[armappservice.CertificateOrdersClientListByResourceGroupResponse]](), + newListCertificatesPager: newTracker[azfake.PagerResponder[armappservice.CertificateOrdersClientListCertificatesResponse]](), + } +} + +// CertificateOrdersServerTransport connects instances of armappservice.CertificateOrdersClient to instances of CertificateOrdersServer. +// Don't use this type directly, use NewCertificateOrdersServerTransport instead. +type CertificateOrdersServerTransport struct { + srv *CertificateOrdersServer + beginCreateOrUpdate *tracker[azfake.PollerResponder[armappservice.CertificateOrdersClientCreateOrUpdateResponse]] + beginCreateOrUpdateCertificate *tracker[azfake.PollerResponder[armappservice.CertificateOrdersClientCreateOrUpdateCertificateResponse]] + newListPager *tracker[azfake.PagerResponder[armappservice.CertificateOrdersClientListResponse]] + newListByResourceGroupPager *tracker[azfake.PagerResponder[armappservice.CertificateOrdersClientListByResourceGroupResponse]] + newListCertificatesPager *tracker[azfake.PagerResponder[armappservice.CertificateOrdersClientListCertificatesResponse]] +} + +// Do implements the policy.Transporter interface for CertificateOrdersServerTransport. +func (c *CertificateOrdersServerTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + var resp *http.Response + var err error + + switch method { + case "CertificateOrdersClient.BeginCreateOrUpdate": + resp, err = c.dispatchBeginCreateOrUpdate(req) + case "CertificateOrdersClient.BeginCreateOrUpdateCertificate": + resp, err = c.dispatchBeginCreateOrUpdateCertificate(req) + case "CertificateOrdersClient.Delete": + resp, err = c.dispatchDelete(req) + case "CertificateOrdersClient.DeleteCertificate": + resp, err = c.dispatchDeleteCertificate(req) + case "CertificateOrdersClient.Get": + resp, err = c.dispatchGet(req) + case "CertificateOrdersClient.GetCertificate": + resp, err = c.dispatchGetCertificate(req) + case "CertificateOrdersClient.NewListPager": + resp, err = c.dispatchNewListPager(req) + case "CertificateOrdersClient.NewListByResourceGroupPager": + resp, err = c.dispatchNewListByResourceGroupPager(req) + case "CertificateOrdersClient.NewListCertificatesPager": + resp, err = c.dispatchNewListCertificatesPager(req) + case "CertificateOrdersClient.Reissue": + resp, err = c.dispatchReissue(req) + case "CertificateOrdersClient.Renew": + resp, err = c.dispatchRenew(req) + case "CertificateOrdersClient.ResendEmail": + resp, err = c.dispatchResendEmail(req) + case "CertificateOrdersClient.ResendRequestEmails": + resp, err = c.dispatchResendRequestEmails(req) + case "CertificateOrdersClient.RetrieveCertificateActions": + resp, err = c.dispatchRetrieveCertificateActions(req) + case "CertificateOrdersClient.RetrieveCertificateEmailHistory": + resp, err = c.dispatchRetrieveCertificateEmailHistory(req) + case "CertificateOrdersClient.RetrieveSiteSeal": + resp, err = c.dispatchRetrieveSiteSeal(req) + case "CertificateOrdersClient.Update": + resp, err = c.dispatchUpdate(req) + case "CertificateOrdersClient.UpdateCertificate": + resp, err = c.dispatchUpdateCertificate(req) + case "CertificateOrdersClient.ValidatePurchaseInformation": + resp, err = c.dispatchValidatePurchaseInformation(req) + case "CertificateOrdersClient.VerifyDomainOwnership": + resp, err = c.dispatchVerifyDomainOwnership(req) + default: + err = fmt.Errorf("unhandled API %s", method) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func (c *CertificateOrdersServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) (*http.Response, error) { + if c.srv.BeginCreateOrUpdate == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} + } + beginCreateOrUpdate := c.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.CertificateRegistration/certificateOrders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.CertificateOrder](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + certificateOrderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("certificateOrderName")]) + if err != nil { + return nil, err + } + respr, errRespr := c.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, certificateOrderNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginCreateOrUpdate = &respr + c.beginCreateOrUpdate.add(req, beginCreateOrUpdate) + } + + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + c.beginCreateOrUpdate.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} + } + if !server.PollerResponderMore(beginCreateOrUpdate) { + c.beginCreateOrUpdate.remove(req) + } + + return resp, nil +} + +func (c *CertificateOrdersServerTransport) dispatchBeginCreateOrUpdateCertificate(req *http.Request) (*http.Response, error) { + if c.srv.BeginCreateOrUpdateCertificate == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdateCertificate not implemented")} + } + beginCreateOrUpdateCertificate := c.beginCreateOrUpdateCertificate.get(req) + if beginCreateOrUpdateCertificate == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.CertificateRegistration/certificateOrders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/certificates/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.CertificateResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + certificateOrderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("certificateOrderName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := c.srv.BeginCreateOrUpdateCertificate(req.Context(), resourceGroupNameParam, certificateOrderNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginCreateOrUpdateCertificate = &respr + c.beginCreateOrUpdateCertificate.add(req, beginCreateOrUpdateCertificate) + } + + resp, err := server.PollerResponderNext(beginCreateOrUpdateCertificate, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + c.beginCreateOrUpdateCertificate.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} + } + if !server.PollerResponderMore(beginCreateOrUpdateCertificate) { + c.beginCreateOrUpdateCertificate.remove(req) + } + + return resp, nil +} + +func (c *CertificateOrdersServerTransport) dispatchDelete(req *http.Request) (*http.Response, error) { + if c.srv.Delete == nil { + return nil, &nonRetriableError{errors.New("fake for method Delete not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.CertificateRegistration/certificateOrders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + certificateOrderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("certificateOrderName")]) + if err != nil { + return nil, err + } + respr, errRespr := c.srv.Delete(req.Context(), resourceGroupNameParam, certificateOrderNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *CertificateOrdersServerTransport) dispatchDeleteCertificate(req *http.Request) (*http.Response, error) { + if c.srv.DeleteCertificate == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteCertificate not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.CertificateRegistration/certificateOrders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/certificates/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + certificateOrderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("certificateOrderName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := c.srv.DeleteCertificate(req.Context(), resourceGroupNameParam, certificateOrderNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *CertificateOrdersServerTransport) dispatchGet(req *http.Request) (*http.Response, error) { + if c.srv.Get == nil { + return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.CertificateRegistration/certificateOrders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + certificateOrderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("certificateOrderName")]) + if err != nil { + return nil, err + } + respr, errRespr := c.srv.Get(req.Context(), resourceGroupNameParam, certificateOrderNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).CertificateOrder, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *CertificateOrdersServerTransport) dispatchGetCertificate(req *http.Request) (*http.Response, error) { + if c.srv.GetCertificate == nil { + return nil, &nonRetriableError{errors.New("fake for method GetCertificate not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.CertificateRegistration/certificateOrders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/certificates/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + certificateOrderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("certificateOrderName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := c.srv.GetCertificate(req.Context(), resourceGroupNameParam, certificateOrderNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).CertificateResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *CertificateOrdersServerTransport) dispatchNewListPager(req *http.Request) (*http.Response, error) { + if c.srv.NewListPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} + } + newListPager := c.newListPager.get(req) + if newListPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.CertificateRegistration/certificateOrders` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 1 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resp := c.srv.NewListPager(nil) + newListPager = &resp + c.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armappservice.CertificateOrdersClientListResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + c.newListPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListPager) { + c.newListPager.remove(req) + } + return resp, nil +} + +func (c *CertificateOrdersServerTransport) dispatchNewListByResourceGroupPager(req *http.Request) (*http.Response, error) { + if c.srv.NewListByResourceGroupPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListByResourceGroupPager not implemented")} + } + newListByResourceGroupPager := c.newListByResourceGroupPager.get(req) + if newListByResourceGroupPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.CertificateRegistration/certificateOrders` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 2 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + resp := c.srv.NewListByResourceGroupPager(resourceGroupNameParam, nil) + newListByResourceGroupPager = &resp + c.newListByResourceGroupPager.add(req, newListByResourceGroupPager) + server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armappservice.CertificateOrdersClientListByResourceGroupResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListByResourceGroupPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + c.newListByResourceGroupPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListByResourceGroupPager) { + c.newListByResourceGroupPager.remove(req) + } + return resp, nil +} + +func (c *CertificateOrdersServerTransport) dispatchNewListCertificatesPager(req *http.Request) (*http.Response, error) { + if c.srv.NewListCertificatesPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListCertificatesPager not implemented")} + } + newListCertificatesPager := c.newListCertificatesPager.get(req) + if newListCertificatesPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.CertificateRegistration/certificateOrders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/certificates` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + certificateOrderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("certificateOrderName")]) + if err != nil { + return nil, err + } + resp := c.srv.NewListCertificatesPager(resourceGroupNameParam, certificateOrderNameParam, nil) + newListCertificatesPager = &resp + c.newListCertificatesPager.add(req, newListCertificatesPager) + server.PagerResponderInjectNextLinks(newListCertificatesPager, req, func(page *armappservice.CertificateOrdersClientListCertificatesResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListCertificatesPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + c.newListCertificatesPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListCertificatesPager) { + c.newListCertificatesPager.remove(req) + } + return resp, nil +} + +func (c *CertificateOrdersServerTransport) dispatchReissue(req *http.Request) (*http.Response, error) { + if c.srv.Reissue == nil { + return nil, &nonRetriableError{errors.New("fake for method Reissue not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.CertificateRegistration/certificateOrders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/reissue` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.ReissueCertificateOrderRequest](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + certificateOrderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("certificateOrderName")]) + if err != nil { + return nil, err + } + respr, errRespr := c.srv.Reissue(req.Context(), resourceGroupNameParam, certificateOrderNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *CertificateOrdersServerTransport) dispatchRenew(req *http.Request) (*http.Response, error) { + if c.srv.Renew == nil { + return nil, &nonRetriableError{errors.New("fake for method Renew not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.CertificateRegistration/certificateOrders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/renew` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.RenewCertificateOrderRequest](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + certificateOrderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("certificateOrderName")]) + if err != nil { + return nil, err + } + respr, errRespr := c.srv.Renew(req.Context(), resourceGroupNameParam, certificateOrderNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *CertificateOrdersServerTransport) dispatchResendEmail(req *http.Request) (*http.Response, error) { + if c.srv.ResendEmail == nil { + return nil, &nonRetriableError{errors.New("fake for method ResendEmail not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.CertificateRegistration/certificateOrders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resendEmail` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + certificateOrderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("certificateOrderName")]) + if err != nil { + return nil, err + } + respr, errRespr := c.srv.ResendEmail(req.Context(), resourceGroupNameParam, certificateOrderNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *CertificateOrdersServerTransport) dispatchResendRequestEmails(req *http.Request) (*http.Response, error) { + if c.srv.ResendRequestEmails == nil { + return nil, &nonRetriableError{errors.New("fake for method ResendRequestEmails not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.CertificateRegistration/certificateOrders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resendRequestEmails` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.NameIdentifier](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + certificateOrderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("certificateOrderName")]) + if err != nil { + return nil, err + } + respr, errRespr := c.srv.ResendRequestEmails(req.Context(), resourceGroupNameParam, certificateOrderNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *CertificateOrdersServerTransport) dispatchRetrieveCertificateActions(req *http.Request) (*http.Response, error) { + if c.srv.RetrieveCertificateActions == nil { + return nil, &nonRetriableError{errors.New("fake for method RetrieveCertificateActions not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.CertificateRegistration/certificateOrders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/retrieveCertificateActions` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := c.srv.RetrieveCertificateActions(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).CertificateOrderActionArray, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *CertificateOrdersServerTransport) dispatchRetrieveCertificateEmailHistory(req *http.Request) (*http.Response, error) { + if c.srv.RetrieveCertificateEmailHistory == nil { + return nil, &nonRetriableError{errors.New("fake for method RetrieveCertificateEmailHistory not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.CertificateRegistration/certificateOrders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/retrieveEmailHistory` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := c.srv.RetrieveCertificateEmailHistory(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).CertificateEmailArray, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *CertificateOrdersServerTransport) dispatchRetrieveSiteSeal(req *http.Request) (*http.Response, error) { + if c.srv.RetrieveSiteSeal == nil { + return nil, &nonRetriableError{errors.New("fake for method RetrieveSiteSeal not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.CertificateRegistration/certificateOrders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/retrieveSiteSeal` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.SiteSealRequest](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + certificateOrderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("certificateOrderName")]) + if err != nil { + return nil, err + } + respr, errRespr := c.srv.RetrieveSiteSeal(req.Context(), resourceGroupNameParam, certificateOrderNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SiteSeal, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *CertificateOrdersServerTransport) dispatchUpdate(req *http.Request) (*http.Response, error) { + if c.srv.Update == nil { + return nil, &nonRetriableError{errors.New("fake for method Update not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.CertificateRegistration/certificateOrders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.CertificateOrderPatchResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + certificateOrderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("certificateOrderName")]) + if err != nil { + return nil, err + } + respr, errRespr := c.srv.Update(req.Context(), resourceGroupNameParam, certificateOrderNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).CertificateOrder, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *CertificateOrdersServerTransport) dispatchUpdateCertificate(req *http.Request) (*http.Response, error) { + if c.srv.UpdateCertificate == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateCertificate not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.CertificateRegistration/certificateOrders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/certificates/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.CertificatePatchResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + certificateOrderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("certificateOrderName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := c.srv.UpdateCertificate(req.Context(), resourceGroupNameParam, certificateOrderNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).CertificateResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *CertificateOrdersServerTransport) dispatchValidatePurchaseInformation(req *http.Request) (*http.Response, error) { + if c.srv.ValidatePurchaseInformation == nil { + return nil, &nonRetriableError{errors.New("fake for method ValidatePurchaseInformation not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.CertificateRegistration/validateCertificateRegistrationInformation` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 1 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.CertificateOrder](req) + if err != nil { + return nil, err + } + respr, errRespr := c.srv.ValidatePurchaseInformation(req.Context(), body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *CertificateOrdersServerTransport) dispatchVerifyDomainOwnership(req *http.Request) (*http.Response, error) { + if c.srv.VerifyDomainOwnership == nil { + return nil, &nonRetriableError{errors.New("fake for method VerifyDomainOwnership not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.CertificateRegistration/certificateOrders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/verifyDomainOwnership` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + certificateOrderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("certificateOrderName")]) + if err != nil { + return nil, err + } + respr, errRespr := c.srv.VerifyDomainOwnership(req.Context(), resourceGroupNameParam, certificateOrderNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/fake/certificateordersdiagnostics_server.go b/sdk/resourcemanager/appservice/armappservice/fake/certificateordersdiagnostics_server.go new file mode 100644 index 000000000000..649c5750eda3 --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/fake/certificateordersdiagnostics_server.go @@ -0,0 +1,187 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "context" + "errors" + "fmt" + azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" + "net/http" + "net/url" + "regexp" + "time" +) + +// CertificateOrdersDiagnosticsServer is a fake server for instances of the armappservice.CertificateOrdersDiagnosticsClient type. +type CertificateOrdersDiagnosticsServer struct { + // GetAppServiceCertificateOrderDetectorResponse is the fake for method CertificateOrdersDiagnosticsClient.GetAppServiceCertificateOrderDetectorResponse + // HTTP status codes to indicate success: http.StatusOK + GetAppServiceCertificateOrderDetectorResponse func(ctx context.Context, resourceGroupName string, certificateOrderName string, detectorName string, options *armappservice.CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseOptions) (resp azfake.Responder[armappservice.CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseResponse], errResp azfake.ErrorResponder) + + // NewListAppServiceCertificateOrderDetectorResponsePager is the fake for method CertificateOrdersDiagnosticsClient.NewListAppServiceCertificateOrderDetectorResponsePager + // HTTP status codes to indicate success: http.StatusOK + NewListAppServiceCertificateOrderDetectorResponsePager func(resourceGroupName string, certificateOrderName string, options *armappservice.CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseOptions) (resp azfake.PagerResponder[armappservice.CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse]) +} + +// NewCertificateOrdersDiagnosticsServerTransport creates a new instance of CertificateOrdersDiagnosticsServerTransport with the provided implementation. +// The returned CertificateOrdersDiagnosticsServerTransport instance is connected to an instance of armappservice.CertificateOrdersDiagnosticsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewCertificateOrdersDiagnosticsServerTransport(srv *CertificateOrdersDiagnosticsServer) *CertificateOrdersDiagnosticsServerTransport { + return &CertificateOrdersDiagnosticsServerTransport{ + srv: srv, + newListAppServiceCertificateOrderDetectorResponsePager: newTracker[azfake.PagerResponder[armappservice.CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse]](), + } +} + +// CertificateOrdersDiagnosticsServerTransport connects instances of armappservice.CertificateOrdersDiagnosticsClient to instances of CertificateOrdersDiagnosticsServer. +// Don't use this type directly, use NewCertificateOrdersDiagnosticsServerTransport instead. +type CertificateOrdersDiagnosticsServerTransport struct { + srv *CertificateOrdersDiagnosticsServer + newListAppServiceCertificateOrderDetectorResponsePager *tracker[azfake.PagerResponder[armappservice.CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse]] +} + +// Do implements the policy.Transporter interface for CertificateOrdersDiagnosticsServerTransport. +func (c *CertificateOrdersDiagnosticsServerTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + var resp *http.Response + var err error + + switch method { + case "CertificateOrdersDiagnosticsClient.GetAppServiceCertificateOrderDetectorResponse": + resp, err = c.dispatchGetAppServiceCertificateOrderDetectorResponse(req) + case "CertificateOrdersDiagnosticsClient.NewListAppServiceCertificateOrderDetectorResponsePager": + resp, err = c.dispatchNewListAppServiceCertificateOrderDetectorResponsePager(req) + default: + err = fmt.Errorf("unhandled API %s", method) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func (c *CertificateOrdersDiagnosticsServerTransport) dispatchGetAppServiceCertificateOrderDetectorResponse(req *http.Request) (*http.Response, error) { + if c.srv.GetAppServiceCertificateOrderDetectorResponse == nil { + return nil, &nonRetriableError{errors.New("fake for method GetAppServiceCertificateOrderDetectorResponse not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.CertificateRegistration/certificateOrders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/detectors/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + certificateOrderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("certificateOrderName")]) + if err != nil { + return nil, err + } + detectorNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("detectorName")]) + if err != nil { + return nil, err + } + startTimeUnescaped, err := url.QueryUnescape(qp.Get("startTime")) + if err != nil { + return nil, err + } + startTimeParam, err := parseOptional(startTimeUnescaped, func(v string) (time.Time, error) { return time.Parse(time.RFC3339Nano, v) }) + if err != nil { + return nil, err + } + endTimeUnescaped, err := url.QueryUnescape(qp.Get("endTime")) + if err != nil { + return nil, err + } + endTimeParam, err := parseOptional(endTimeUnescaped, func(v string) (time.Time, error) { return time.Parse(time.RFC3339Nano, v) }) + if err != nil { + return nil, err + } + timeGrainUnescaped, err := url.QueryUnescape(qp.Get("timeGrain")) + if err != nil { + return nil, err + } + timeGrainParam := getOptional(timeGrainUnescaped) + var options *armappservice.CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseOptions + if startTimeParam != nil || endTimeParam != nil || timeGrainParam != nil { + options = &armappservice.CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseOptions{ + StartTime: startTimeParam, + EndTime: endTimeParam, + TimeGrain: timeGrainParam, + } + } + respr, errRespr := c.srv.GetAppServiceCertificateOrderDetectorResponse(req.Context(), resourceGroupNameParam, certificateOrderNameParam, detectorNameParam, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).DetectorResponse, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *CertificateOrdersDiagnosticsServerTransport) dispatchNewListAppServiceCertificateOrderDetectorResponsePager(req *http.Request) (*http.Response, error) { + if c.srv.NewListAppServiceCertificateOrderDetectorResponsePager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListAppServiceCertificateOrderDetectorResponsePager not implemented")} + } + newListAppServiceCertificateOrderDetectorResponsePager := c.newListAppServiceCertificateOrderDetectorResponsePager.get(req) + if newListAppServiceCertificateOrderDetectorResponsePager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.CertificateRegistration/certificateOrders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/detectors` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + certificateOrderNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("certificateOrderName")]) + if err != nil { + return nil, err + } + resp := c.srv.NewListAppServiceCertificateOrderDetectorResponsePager(resourceGroupNameParam, certificateOrderNameParam, nil) + newListAppServiceCertificateOrderDetectorResponsePager = &resp + c.newListAppServiceCertificateOrderDetectorResponsePager.add(req, newListAppServiceCertificateOrderDetectorResponsePager) + server.PagerResponderInjectNextLinks(newListAppServiceCertificateOrderDetectorResponsePager, req, func(page *armappservice.CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListAppServiceCertificateOrderDetectorResponsePager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + c.newListAppServiceCertificateOrderDetectorResponsePager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListAppServiceCertificateOrderDetectorResponsePager) { + c.newListAppServiceCertificateOrderDetectorResponsePager.remove(req) + } + return resp, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/fake/certificateregistrationprovider_server.go b/sdk/resourcemanager/appservice/armappservice/fake/certificateregistrationprovider_server.go new file mode 100644 index 000000000000..d44bccf4c7d9 --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/fake/certificateregistrationprovider_server.go @@ -0,0 +1,96 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "errors" + "fmt" + azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" + "net/http" +) + +// CertificateRegistrationProviderServer is a fake server for instances of the armappservice.CertificateRegistrationProviderClient type. +type CertificateRegistrationProviderServer struct { + // NewListOperationsPager is the fake for method CertificateRegistrationProviderClient.NewListOperationsPager + // HTTP status codes to indicate success: http.StatusOK + NewListOperationsPager func(options *armappservice.CertificateRegistrationProviderClientListOperationsOptions) (resp azfake.PagerResponder[armappservice.CertificateRegistrationProviderClientListOperationsResponse]) +} + +// NewCertificateRegistrationProviderServerTransport creates a new instance of CertificateRegistrationProviderServerTransport with the provided implementation. +// The returned CertificateRegistrationProviderServerTransport instance is connected to an instance of armappservice.CertificateRegistrationProviderClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewCertificateRegistrationProviderServerTransport(srv *CertificateRegistrationProviderServer) *CertificateRegistrationProviderServerTransport { + return &CertificateRegistrationProviderServerTransport{ + srv: srv, + newListOperationsPager: newTracker[azfake.PagerResponder[armappservice.CertificateRegistrationProviderClientListOperationsResponse]](), + } +} + +// CertificateRegistrationProviderServerTransport connects instances of armappservice.CertificateRegistrationProviderClient to instances of CertificateRegistrationProviderServer. +// Don't use this type directly, use NewCertificateRegistrationProviderServerTransport instead. +type CertificateRegistrationProviderServerTransport struct { + srv *CertificateRegistrationProviderServer + newListOperationsPager *tracker[azfake.PagerResponder[armappservice.CertificateRegistrationProviderClientListOperationsResponse]] +} + +// Do implements the policy.Transporter interface for CertificateRegistrationProviderServerTransport. +func (c *CertificateRegistrationProviderServerTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + var resp *http.Response + var err error + + switch method { + case "CertificateRegistrationProviderClient.NewListOperationsPager": + resp, err = c.dispatchNewListOperationsPager(req) + default: + err = fmt.Errorf("unhandled API %s", method) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func (c *CertificateRegistrationProviderServerTransport) dispatchNewListOperationsPager(req *http.Request) (*http.Response, error) { + if c.srv.NewListOperationsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListOperationsPager not implemented")} + } + newListOperationsPager := c.newListOperationsPager.get(req) + if newListOperationsPager == nil { + resp := c.srv.NewListOperationsPager(nil) + newListOperationsPager = &resp + c.newListOperationsPager.add(req, newListOperationsPager) + server.PagerResponderInjectNextLinks(newListOperationsPager, req, func(page *armappservice.CertificateRegistrationProviderClientListOperationsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListOperationsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + c.newListOperationsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListOperationsPager) { + c.newListOperationsPager.remove(req) + } + return resp, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/fake/certificates_server.go b/sdk/resourcemanager/appservice/armappservice/fake/certificates_server.go new file mode 100644 index 000000000000..4ac1d56021b7 --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/fake/certificates_server.go @@ -0,0 +1,326 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "context" + "errors" + "fmt" + azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" + "net/http" + "net/url" + "regexp" +) + +// CertificatesServer is a fake server for instances of the armappservice.CertificatesClient type. +type CertificatesServer struct { + // CreateOrUpdate is the fake for method CertificatesClient.CreateOrUpdate + // HTTP status codes to indicate success: http.StatusOK + CreateOrUpdate func(ctx context.Context, resourceGroupName string, name string, certificateEnvelope armappservice.AppCertificate, options *armappservice.CertificatesClientCreateOrUpdateOptions) (resp azfake.Responder[armappservice.CertificatesClientCreateOrUpdateResponse], errResp azfake.ErrorResponder) + + // Delete is the fake for method CertificatesClient.Delete + // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent + Delete func(ctx context.Context, resourceGroupName string, name string, options *armappservice.CertificatesClientDeleteOptions) (resp azfake.Responder[armappservice.CertificatesClientDeleteResponse], errResp azfake.ErrorResponder) + + // Get is the fake for method CertificatesClient.Get + // HTTP status codes to indicate success: http.StatusOK + Get func(ctx context.Context, resourceGroupName string, name string, options *armappservice.CertificatesClientGetOptions) (resp azfake.Responder[armappservice.CertificatesClientGetResponse], errResp azfake.ErrorResponder) + + // NewListPager is the fake for method CertificatesClient.NewListPager + // HTTP status codes to indicate success: http.StatusOK + NewListPager func(options *armappservice.CertificatesClientListOptions) (resp azfake.PagerResponder[armappservice.CertificatesClientListResponse]) + + // NewListByResourceGroupPager is the fake for method CertificatesClient.NewListByResourceGroupPager + // HTTP status codes to indicate success: http.StatusOK + NewListByResourceGroupPager func(resourceGroupName string, options *armappservice.CertificatesClientListByResourceGroupOptions) (resp azfake.PagerResponder[armappservice.CertificatesClientListByResourceGroupResponse]) + + // Update is the fake for method CertificatesClient.Update + // HTTP status codes to indicate success: http.StatusOK + Update func(ctx context.Context, resourceGroupName string, name string, certificateEnvelope armappservice.AppCertificatePatchResource, options *armappservice.CertificatesClientUpdateOptions) (resp azfake.Responder[armappservice.CertificatesClientUpdateResponse], errResp azfake.ErrorResponder) +} + +// NewCertificatesServerTransport creates a new instance of CertificatesServerTransport with the provided implementation. +// The returned CertificatesServerTransport instance is connected to an instance of armappservice.CertificatesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewCertificatesServerTransport(srv *CertificatesServer) *CertificatesServerTransport { + return &CertificatesServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armappservice.CertificatesClientListResponse]](), + newListByResourceGroupPager: newTracker[azfake.PagerResponder[armappservice.CertificatesClientListByResourceGroupResponse]](), + } +} + +// CertificatesServerTransport connects instances of armappservice.CertificatesClient to instances of CertificatesServer. +// Don't use this type directly, use NewCertificatesServerTransport instead. +type CertificatesServerTransport struct { + srv *CertificatesServer + newListPager *tracker[azfake.PagerResponder[armappservice.CertificatesClientListResponse]] + newListByResourceGroupPager *tracker[azfake.PagerResponder[armappservice.CertificatesClientListByResourceGroupResponse]] +} + +// Do implements the policy.Transporter interface for CertificatesServerTransport. +func (c *CertificatesServerTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + var resp *http.Response + var err error + + switch method { + case "CertificatesClient.CreateOrUpdate": + resp, err = c.dispatchCreateOrUpdate(req) + case "CertificatesClient.Delete": + resp, err = c.dispatchDelete(req) + case "CertificatesClient.Get": + resp, err = c.dispatchGet(req) + case "CertificatesClient.NewListPager": + resp, err = c.dispatchNewListPager(req) + case "CertificatesClient.NewListByResourceGroupPager": + resp, err = c.dispatchNewListByResourceGroupPager(req) + case "CertificatesClient.Update": + resp, err = c.dispatchUpdate(req) + default: + err = fmt.Errorf("unhandled API %s", method) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func (c *CertificatesServerTransport) dispatchCreateOrUpdate(req *http.Request) (*http.Response, error) { + if c.srv.CreateOrUpdate == nil { + return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdate not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/certificates/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.AppCertificate](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := c.srv.CreateOrUpdate(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).AppCertificate, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *CertificatesServerTransport) dispatchDelete(req *http.Request) (*http.Response, error) { + if c.srv.Delete == nil { + return nil, &nonRetriableError{errors.New("fake for method Delete not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/certificates/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := c.srv.Delete(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *CertificatesServerTransport) dispatchGet(req *http.Request) (*http.Response, error) { + if c.srv.Get == nil { + return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/certificates/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := c.srv.Get(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).AppCertificate, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *CertificatesServerTransport) dispatchNewListPager(req *http.Request) (*http.Response, error) { + if c.srv.NewListPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} + } + newListPager := c.newListPager.get(req) + if newListPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/certificates` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 1 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + filterUnescaped, err := url.QueryUnescape(qp.Get("$filter")) + if err != nil { + return nil, err + } + filterParam := getOptional(filterUnescaped) + var options *armappservice.CertificatesClientListOptions + if filterParam != nil { + options = &armappservice.CertificatesClientListOptions{ + Filter: filterParam, + } + } + resp := c.srv.NewListPager(options) + newListPager = &resp + c.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armappservice.CertificatesClientListResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + c.newListPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListPager) { + c.newListPager.remove(req) + } + return resp, nil +} + +func (c *CertificatesServerTransport) dispatchNewListByResourceGroupPager(req *http.Request) (*http.Response, error) { + if c.srv.NewListByResourceGroupPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListByResourceGroupPager not implemented")} + } + newListByResourceGroupPager := c.newListByResourceGroupPager.get(req) + if newListByResourceGroupPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/certificates` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 2 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + resp := c.srv.NewListByResourceGroupPager(resourceGroupNameParam, nil) + newListByResourceGroupPager = &resp + c.newListByResourceGroupPager.add(req, newListByResourceGroupPager) + server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armappservice.CertificatesClientListByResourceGroupResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListByResourceGroupPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + c.newListByResourceGroupPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListByResourceGroupPager) { + c.newListByResourceGroupPager.remove(req) + } + return resp, nil +} + +func (c *CertificatesServerTransport) dispatchUpdate(req *http.Request) (*http.Response, error) { + if c.srv.Update == nil { + return nil, &nonRetriableError{errors.New("fake for method Update not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/certificates/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.AppCertificatePatchResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := c.srv.Update(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).AppCertificate, req) + if err != nil { + return nil, err + } + return resp, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/fake/containerapps_server.go b/sdk/resourcemanager/appservice/armappservice/fake/containerapps_server.go new file mode 100644 index 000000000000..8cca2136ecb7 --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/fake/containerapps_server.go @@ -0,0 +1,332 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "context" + "errors" + "fmt" + azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" + "net/http" + "net/url" + "regexp" +) + +// ContainerAppsServer is a fake server for instances of the armappservice.ContainerAppsClient type. +type ContainerAppsServer struct { + // BeginCreateOrUpdate is the fake for method ContainerAppsClient.BeginCreateOrUpdate + // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated + BeginCreateOrUpdate func(ctx context.Context, resourceGroupName string, name string, containerAppEnvelope armappservice.ContainerApp, options *armappservice.ContainerAppsClientBeginCreateOrUpdateOptions) (resp azfake.PollerResponder[armappservice.ContainerAppsClientCreateOrUpdateResponse], errResp azfake.ErrorResponder) + + // BeginDelete is the fake for method ContainerAppsClient.BeginDelete + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent + BeginDelete func(ctx context.Context, resourceGroupName string, name string, options *armappservice.ContainerAppsClientBeginDeleteOptions) (resp azfake.PollerResponder[armappservice.ContainerAppsClientDeleteResponse], errResp azfake.ErrorResponder) + + // Get is the fake for method ContainerAppsClient.Get + // HTTP status codes to indicate success: http.StatusOK + Get func(ctx context.Context, resourceGroupName string, name string, options *armappservice.ContainerAppsClientGetOptions) (resp azfake.Responder[armappservice.ContainerAppsClientGetResponse], errResp azfake.ErrorResponder) + + // NewListByResourceGroupPager is the fake for method ContainerAppsClient.NewListByResourceGroupPager + // HTTP status codes to indicate success: http.StatusOK + NewListByResourceGroupPager func(resourceGroupName string, options *armappservice.ContainerAppsClientListByResourceGroupOptions) (resp azfake.PagerResponder[armappservice.ContainerAppsClientListByResourceGroupResponse]) + + // NewListBySubscriptionPager is the fake for method ContainerAppsClient.NewListBySubscriptionPager + // HTTP status codes to indicate success: http.StatusOK + NewListBySubscriptionPager func(options *armappservice.ContainerAppsClientListBySubscriptionOptions) (resp azfake.PagerResponder[armappservice.ContainerAppsClientListBySubscriptionResponse]) + + // ListSecrets is the fake for method ContainerAppsClient.ListSecrets + // HTTP status codes to indicate success: http.StatusOK + ListSecrets func(ctx context.Context, name string, options *armappservice.ContainerAppsClientListSecretsOptions) (resp azfake.Responder[armappservice.ContainerAppsClientListSecretsResponse], errResp azfake.ErrorResponder) +} + +// NewContainerAppsServerTransport creates a new instance of ContainerAppsServerTransport with the provided implementation. +// The returned ContainerAppsServerTransport instance is connected to an instance of armappservice.ContainerAppsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewContainerAppsServerTransport(srv *ContainerAppsServer) *ContainerAppsServerTransport { + return &ContainerAppsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armappservice.ContainerAppsClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armappservice.ContainerAppsClientDeleteResponse]](), + newListByResourceGroupPager: newTracker[azfake.PagerResponder[armappservice.ContainerAppsClientListByResourceGroupResponse]](), + newListBySubscriptionPager: newTracker[azfake.PagerResponder[armappservice.ContainerAppsClientListBySubscriptionResponse]](), + } +} + +// ContainerAppsServerTransport connects instances of armappservice.ContainerAppsClient to instances of ContainerAppsServer. +// Don't use this type directly, use NewContainerAppsServerTransport instead. +type ContainerAppsServerTransport struct { + srv *ContainerAppsServer + beginCreateOrUpdate *tracker[azfake.PollerResponder[armappservice.ContainerAppsClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armappservice.ContainerAppsClientDeleteResponse]] + newListByResourceGroupPager *tracker[azfake.PagerResponder[armappservice.ContainerAppsClientListByResourceGroupResponse]] + newListBySubscriptionPager *tracker[azfake.PagerResponder[armappservice.ContainerAppsClientListBySubscriptionResponse]] +} + +// Do implements the policy.Transporter interface for ContainerAppsServerTransport. +func (c *ContainerAppsServerTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + var resp *http.Response + var err error + + switch method { + case "ContainerAppsClient.BeginCreateOrUpdate": + resp, err = c.dispatchBeginCreateOrUpdate(req) + case "ContainerAppsClient.BeginDelete": + resp, err = c.dispatchBeginDelete(req) + case "ContainerAppsClient.Get": + resp, err = c.dispatchGet(req) + case "ContainerAppsClient.NewListByResourceGroupPager": + resp, err = c.dispatchNewListByResourceGroupPager(req) + case "ContainerAppsClient.NewListBySubscriptionPager": + resp, err = c.dispatchNewListBySubscriptionPager(req) + case "ContainerAppsClient.ListSecrets": + resp, err = c.dispatchListSecrets(req) + default: + err = fmt.Errorf("unhandled API %s", method) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func (c *ContainerAppsServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) (*http.Response, error) { + if c.srv.BeginCreateOrUpdate == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} + } + beginCreateOrUpdate := c.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/containerApps/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.ContainerApp](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := c.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginCreateOrUpdate = &respr + c.beginCreateOrUpdate.add(req, beginCreateOrUpdate) + } + + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + c.beginCreateOrUpdate.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} + } + if !server.PollerResponderMore(beginCreateOrUpdate) { + c.beginCreateOrUpdate.remove(req) + } + + return resp, nil +} + +func (c *ContainerAppsServerTransport) dispatchBeginDelete(req *http.Request) (*http.Response, error) { + if c.srv.BeginDelete == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} + } + beginDelete := c.beginDelete.get(req) + if beginDelete == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/containerApps/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := c.srv.BeginDelete(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginDelete = &respr + c.beginDelete.add(req, beginDelete) + } + + resp, err := server.PollerResponderNext(beginDelete, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + c.beginDelete.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + } + if !server.PollerResponderMore(beginDelete) { + c.beginDelete.remove(req) + } + + return resp, nil +} + +func (c *ContainerAppsServerTransport) dispatchGet(req *http.Request) (*http.Response, error) { + if c.srv.Get == nil { + return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/containerApps/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := c.srv.Get(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).ContainerApp, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *ContainerAppsServerTransport) dispatchNewListByResourceGroupPager(req *http.Request) (*http.Response, error) { + if c.srv.NewListByResourceGroupPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListByResourceGroupPager not implemented")} + } + newListByResourceGroupPager := c.newListByResourceGroupPager.get(req) + if newListByResourceGroupPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/containerApps` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 2 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + resp := c.srv.NewListByResourceGroupPager(resourceGroupNameParam, nil) + newListByResourceGroupPager = &resp + c.newListByResourceGroupPager.add(req, newListByResourceGroupPager) + server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armappservice.ContainerAppsClientListByResourceGroupResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListByResourceGroupPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + c.newListByResourceGroupPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListByResourceGroupPager) { + c.newListByResourceGroupPager.remove(req) + } + return resp, nil +} + +func (c *ContainerAppsServerTransport) dispatchNewListBySubscriptionPager(req *http.Request) (*http.Response, error) { + if c.srv.NewListBySubscriptionPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListBySubscriptionPager not implemented")} + } + newListBySubscriptionPager := c.newListBySubscriptionPager.get(req) + if newListBySubscriptionPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/containerApps` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 1 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resp := c.srv.NewListBySubscriptionPager(nil) + newListBySubscriptionPager = &resp + c.newListBySubscriptionPager.add(req, newListBySubscriptionPager) + server.PagerResponderInjectNextLinks(newListBySubscriptionPager, req, func(page *armappservice.ContainerAppsClientListBySubscriptionResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListBySubscriptionPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + c.newListBySubscriptionPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListBySubscriptionPager) { + c.newListBySubscriptionPager.remove(req) + } + return resp, nil +} + +func (c *ContainerAppsServerTransport) dispatchListSecrets(req *http.Request) (*http.Response, error) { + if c.srv.ListSecrets == nil { + return nil, &nonRetriableError{errors.New("fake for method ListSecrets not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/containerApps/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listSecrets` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 2 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := c.srv.ListSecrets(req.Context(), nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SecretsCollection, req) + if err != nil { + return nil, err + } + return resp, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/fake/containerappsrevisions_server.go b/sdk/resourcemanager/appservice/armappservice/fake/containerappsrevisions_server.go new file mode 100644 index 000000000000..5bdada02e0d7 --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/fake/containerappsrevisions_server.go @@ -0,0 +1,285 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "context" + "errors" + "fmt" + azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" + "net/http" + "net/url" + "regexp" +) + +// ContainerAppsRevisionsServer is a fake server for instances of the armappservice.ContainerAppsRevisionsClient type. +type ContainerAppsRevisionsServer struct { + // ActivateRevision is the fake for method ContainerAppsRevisionsClient.ActivateRevision + // HTTP status codes to indicate success: http.StatusOK + ActivateRevision func(ctx context.Context, resourceGroupName string, containerAppName string, name string, options *armappservice.ContainerAppsRevisionsClientActivateRevisionOptions) (resp azfake.Responder[armappservice.ContainerAppsRevisionsClientActivateRevisionResponse], errResp azfake.ErrorResponder) + + // DeactivateRevision is the fake for method ContainerAppsRevisionsClient.DeactivateRevision + // HTTP status codes to indicate success: http.StatusOK + DeactivateRevision func(ctx context.Context, resourceGroupName string, containerAppName string, name string, options *armappservice.ContainerAppsRevisionsClientDeactivateRevisionOptions) (resp azfake.Responder[armappservice.ContainerAppsRevisionsClientDeactivateRevisionResponse], errResp azfake.ErrorResponder) + + // GetRevision is the fake for method ContainerAppsRevisionsClient.GetRevision + // HTTP status codes to indicate success: http.StatusOK + GetRevision func(ctx context.Context, resourceGroupName string, containerAppName string, name string, options *armappservice.ContainerAppsRevisionsClientGetRevisionOptions) (resp azfake.Responder[armappservice.ContainerAppsRevisionsClientGetRevisionResponse], errResp azfake.ErrorResponder) + + // NewListRevisionsPager is the fake for method ContainerAppsRevisionsClient.NewListRevisionsPager + // HTTP status codes to indicate success: http.StatusOK + NewListRevisionsPager func(resourceGroupName string, containerAppName string, options *armappservice.ContainerAppsRevisionsClientListRevisionsOptions) (resp azfake.PagerResponder[armappservice.ContainerAppsRevisionsClientListRevisionsResponse]) + + // RestartRevision is the fake for method ContainerAppsRevisionsClient.RestartRevision + // HTTP status codes to indicate success: http.StatusOK + RestartRevision func(ctx context.Context, resourceGroupName string, containerAppName string, name string, options *armappservice.ContainerAppsRevisionsClientRestartRevisionOptions) (resp azfake.Responder[armappservice.ContainerAppsRevisionsClientRestartRevisionResponse], errResp azfake.ErrorResponder) +} + +// NewContainerAppsRevisionsServerTransport creates a new instance of ContainerAppsRevisionsServerTransport with the provided implementation. +// The returned ContainerAppsRevisionsServerTransport instance is connected to an instance of armappservice.ContainerAppsRevisionsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewContainerAppsRevisionsServerTransport(srv *ContainerAppsRevisionsServer) *ContainerAppsRevisionsServerTransport { + return &ContainerAppsRevisionsServerTransport{ + srv: srv, + newListRevisionsPager: newTracker[azfake.PagerResponder[armappservice.ContainerAppsRevisionsClientListRevisionsResponse]](), + } +} + +// ContainerAppsRevisionsServerTransport connects instances of armappservice.ContainerAppsRevisionsClient to instances of ContainerAppsRevisionsServer. +// Don't use this type directly, use NewContainerAppsRevisionsServerTransport instead. +type ContainerAppsRevisionsServerTransport struct { + srv *ContainerAppsRevisionsServer + newListRevisionsPager *tracker[azfake.PagerResponder[armappservice.ContainerAppsRevisionsClientListRevisionsResponse]] +} + +// Do implements the policy.Transporter interface for ContainerAppsRevisionsServerTransport. +func (c *ContainerAppsRevisionsServerTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + var resp *http.Response + var err error + + switch method { + case "ContainerAppsRevisionsClient.ActivateRevision": + resp, err = c.dispatchActivateRevision(req) + case "ContainerAppsRevisionsClient.DeactivateRevision": + resp, err = c.dispatchDeactivateRevision(req) + case "ContainerAppsRevisionsClient.GetRevision": + resp, err = c.dispatchGetRevision(req) + case "ContainerAppsRevisionsClient.NewListRevisionsPager": + resp, err = c.dispatchNewListRevisionsPager(req) + case "ContainerAppsRevisionsClient.RestartRevision": + resp, err = c.dispatchRestartRevision(req) + default: + err = fmt.Errorf("unhandled API %s", method) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func (c *ContainerAppsRevisionsServerTransport) dispatchActivateRevision(req *http.Request) (*http.Response, error) { + if c.srv.ActivateRevision == nil { + return nil, &nonRetriableError{errors.New("fake for method ActivateRevision not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/containerApps/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/revisions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/activate` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + containerAppNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("containerAppName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := c.srv.ActivateRevision(req.Context(), resourceGroupNameParam, containerAppNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *ContainerAppsRevisionsServerTransport) dispatchDeactivateRevision(req *http.Request) (*http.Response, error) { + if c.srv.DeactivateRevision == nil { + return nil, &nonRetriableError{errors.New("fake for method DeactivateRevision not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/containerApps/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/revisions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/deactivate` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + containerAppNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("containerAppName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := c.srv.DeactivateRevision(req.Context(), resourceGroupNameParam, containerAppNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *ContainerAppsRevisionsServerTransport) dispatchGetRevision(req *http.Request) (*http.Response, error) { + if c.srv.GetRevision == nil { + return nil, &nonRetriableError{errors.New("fake for method GetRevision not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/containerApps/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/revisions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + containerAppNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("containerAppName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := c.srv.GetRevision(req.Context(), resourceGroupNameParam, containerAppNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).Revision, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *ContainerAppsRevisionsServerTransport) dispatchNewListRevisionsPager(req *http.Request) (*http.Response, error) { + if c.srv.NewListRevisionsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListRevisionsPager not implemented")} + } + newListRevisionsPager := c.newListRevisionsPager.get(req) + if newListRevisionsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/containerApps/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/revisions` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + containerAppNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("containerAppName")]) + if err != nil { + return nil, err + } + resp := c.srv.NewListRevisionsPager(resourceGroupNameParam, containerAppNameParam, nil) + newListRevisionsPager = &resp + c.newListRevisionsPager.add(req, newListRevisionsPager) + server.PagerResponderInjectNextLinks(newListRevisionsPager, req, func(page *armappservice.ContainerAppsRevisionsClientListRevisionsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListRevisionsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + c.newListRevisionsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListRevisionsPager) { + c.newListRevisionsPager.remove(req) + } + return resp, nil +} + +func (c *ContainerAppsRevisionsServerTransport) dispatchRestartRevision(req *http.Request) (*http.Response, error) { + if c.srv.RestartRevision == nil { + return nil, &nonRetriableError{errors.New("fake for method RestartRevision not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/containerApps/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/revisions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/restart` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + containerAppNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("containerAppName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := c.srv.RestartRevision(req.Context(), resourceGroupNameParam, containerAppNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/fake/deletedwebapps_server.go b/sdk/resourcemanager/appservice/armappservice/fake/deletedwebapps_server.go new file mode 100644 index 000000000000..023440aec56c --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/fake/deletedwebapps_server.go @@ -0,0 +1,189 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "context" + "errors" + "fmt" + azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" + "net/http" + "net/url" + "regexp" +) + +// DeletedWebAppsServer is a fake server for instances of the armappservice.DeletedWebAppsClient type. +type DeletedWebAppsServer struct { + // GetDeletedWebAppByLocation is the fake for method DeletedWebAppsClient.GetDeletedWebAppByLocation + // HTTP status codes to indicate success: http.StatusOK + GetDeletedWebAppByLocation func(ctx context.Context, location string, deletedSiteID string, options *armappservice.DeletedWebAppsClientGetDeletedWebAppByLocationOptions) (resp azfake.Responder[armappservice.DeletedWebAppsClientGetDeletedWebAppByLocationResponse], errResp azfake.ErrorResponder) + + // NewListPager is the fake for method DeletedWebAppsClient.NewListPager + // HTTP status codes to indicate success: http.StatusOK + NewListPager func(options *armappservice.DeletedWebAppsClientListOptions) (resp azfake.PagerResponder[armappservice.DeletedWebAppsClientListResponse]) + + // NewListByLocationPager is the fake for method DeletedWebAppsClient.NewListByLocationPager + // HTTP status codes to indicate success: http.StatusOK + NewListByLocationPager func(location string, options *armappservice.DeletedWebAppsClientListByLocationOptions) (resp azfake.PagerResponder[armappservice.DeletedWebAppsClientListByLocationResponse]) +} + +// NewDeletedWebAppsServerTransport creates a new instance of DeletedWebAppsServerTransport with the provided implementation. +// The returned DeletedWebAppsServerTransport instance is connected to an instance of armappservice.DeletedWebAppsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewDeletedWebAppsServerTransport(srv *DeletedWebAppsServer) *DeletedWebAppsServerTransport { + return &DeletedWebAppsServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armappservice.DeletedWebAppsClientListResponse]](), + newListByLocationPager: newTracker[azfake.PagerResponder[armappservice.DeletedWebAppsClientListByLocationResponse]](), + } +} + +// DeletedWebAppsServerTransport connects instances of armappservice.DeletedWebAppsClient to instances of DeletedWebAppsServer. +// Don't use this type directly, use NewDeletedWebAppsServerTransport instead. +type DeletedWebAppsServerTransport struct { + srv *DeletedWebAppsServer + newListPager *tracker[azfake.PagerResponder[armappservice.DeletedWebAppsClientListResponse]] + newListByLocationPager *tracker[azfake.PagerResponder[armappservice.DeletedWebAppsClientListByLocationResponse]] +} + +// Do implements the policy.Transporter interface for DeletedWebAppsServerTransport. +func (d *DeletedWebAppsServerTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + var resp *http.Response + var err error + + switch method { + case "DeletedWebAppsClient.GetDeletedWebAppByLocation": + resp, err = d.dispatchGetDeletedWebAppByLocation(req) + case "DeletedWebAppsClient.NewListPager": + resp, err = d.dispatchNewListPager(req) + case "DeletedWebAppsClient.NewListByLocationPager": + resp, err = d.dispatchNewListByLocationPager(req) + default: + err = fmt.Errorf("unhandled API %s", method) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func (d *DeletedWebAppsServerTransport) dispatchGetDeletedWebAppByLocation(req *http.Request) (*http.Response, error) { + if d.srv.GetDeletedWebAppByLocation == nil { + return nil, &nonRetriableError{errors.New("fake for method GetDeletedWebAppByLocation not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/deletedSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) + if err != nil { + return nil, err + } + deletedSiteIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("deletedSiteId")]) + if err != nil { + return nil, err + } + respr, errRespr := d.srv.GetDeletedWebAppByLocation(req.Context(), locationParam, deletedSiteIDParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).DeletedSite, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (d *DeletedWebAppsServerTransport) dispatchNewListPager(req *http.Request) (*http.Response, error) { + if d.srv.NewListPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} + } + newListPager := d.newListPager.get(req) + if newListPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/deletedSites` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 1 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resp := d.srv.NewListPager(nil) + newListPager = &resp + d.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armappservice.DeletedWebAppsClientListResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + d.newListPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListPager) { + d.newListPager.remove(req) + } + return resp, nil +} + +func (d *DeletedWebAppsServerTransport) dispatchNewListByLocationPager(req *http.Request) (*http.Response, error) { + if d.srv.NewListByLocationPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListByLocationPager not implemented")} + } + newListByLocationPager := d.newListByLocationPager.get(req) + if newListByLocationPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/deletedSites` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 2 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) + if err != nil { + return nil, err + } + resp := d.srv.NewListByLocationPager(locationParam, nil) + newListByLocationPager = &resp + d.newListByLocationPager.add(req, newListByLocationPager) + server.PagerResponderInjectNextLinks(newListByLocationPager, req, func(page *armappservice.DeletedWebAppsClientListByLocationResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListByLocationPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + d.newListByLocationPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListByLocationPager) { + d.newListByLocationPager.remove(req) + } + return resp, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/fake/diagnostics_server.go b/sdk/resourcemanager/appservice/armappservice/fake/diagnostics_server.go new file mode 100644 index 000000000000..416de6f2c741 --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/fake/diagnostics_server.go @@ -0,0 +1,1363 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "context" + "errors" + "fmt" + azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" + "net/http" + "net/url" + "regexp" + "time" +) + +// DiagnosticsServer is a fake server for instances of the armappservice.DiagnosticsClient type. +type DiagnosticsServer struct { + // ExecuteSiteAnalysis is the fake for method DiagnosticsClient.ExecuteSiteAnalysis + // HTTP status codes to indicate success: http.StatusOK + ExecuteSiteAnalysis func(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, analysisName string, options *armappservice.DiagnosticsClientExecuteSiteAnalysisOptions) (resp azfake.Responder[armappservice.DiagnosticsClientExecuteSiteAnalysisResponse], errResp azfake.ErrorResponder) + + // ExecuteSiteAnalysisSlot is the fake for method DiagnosticsClient.ExecuteSiteAnalysisSlot + // HTTP status codes to indicate success: http.StatusOK + ExecuteSiteAnalysisSlot func(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, analysisName string, slot string, options *armappservice.DiagnosticsClientExecuteSiteAnalysisSlotOptions) (resp azfake.Responder[armappservice.DiagnosticsClientExecuteSiteAnalysisSlotResponse], errResp azfake.ErrorResponder) + + // ExecuteSiteDetector is the fake for method DiagnosticsClient.ExecuteSiteDetector + // HTTP status codes to indicate success: http.StatusOK + ExecuteSiteDetector func(ctx context.Context, resourceGroupName string, siteName string, detectorName string, diagnosticCategory string, options *armappservice.DiagnosticsClientExecuteSiteDetectorOptions) (resp azfake.Responder[armappservice.DiagnosticsClientExecuteSiteDetectorResponse], errResp azfake.ErrorResponder) + + // ExecuteSiteDetectorSlot is the fake for method DiagnosticsClient.ExecuteSiteDetectorSlot + // HTTP status codes to indicate success: http.StatusOK + ExecuteSiteDetectorSlot func(ctx context.Context, resourceGroupName string, siteName string, detectorName string, diagnosticCategory string, slot string, options *armappservice.DiagnosticsClientExecuteSiteDetectorSlotOptions) (resp azfake.Responder[armappservice.DiagnosticsClientExecuteSiteDetectorSlotResponse], errResp azfake.ErrorResponder) + + // GetHostingEnvironmentDetectorResponse is the fake for method DiagnosticsClient.GetHostingEnvironmentDetectorResponse + // HTTP status codes to indicate success: http.StatusOK + GetHostingEnvironmentDetectorResponse func(ctx context.Context, resourceGroupName string, name string, detectorName string, options *armappservice.DiagnosticsClientGetHostingEnvironmentDetectorResponseOptions) (resp azfake.Responder[armappservice.DiagnosticsClientGetHostingEnvironmentDetectorResponseResponse], errResp azfake.ErrorResponder) + + // GetSiteAnalysis is the fake for method DiagnosticsClient.GetSiteAnalysis + // HTTP status codes to indicate success: http.StatusOK + GetSiteAnalysis func(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, analysisName string, options *armappservice.DiagnosticsClientGetSiteAnalysisOptions) (resp azfake.Responder[armappservice.DiagnosticsClientGetSiteAnalysisResponse], errResp azfake.ErrorResponder) + + // GetSiteAnalysisSlot is the fake for method DiagnosticsClient.GetSiteAnalysisSlot + // HTTP status codes to indicate success: http.StatusOK + GetSiteAnalysisSlot func(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, analysisName string, slot string, options *armappservice.DiagnosticsClientGetSiteAnalysisSlotOptions) (resp azfake.Responder[armappservice.DiagnosticsClientGetSiteAnalysisSlotResponse], errResp azfake.ErrorResponder) + + // GetSiteDetector is the fake for method DiagnosticsClient.GetSiteDetector + // HTTP status codes to indicate success: http.StatusOK + GetSiteDetector func(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, detectorName string, options *armappservice.DiagnosticsClientGetSiteDetectorOptions) (resp azfake.Responder[armappservice.DiagnosticsClientGetSiteDetectorResponse], errResp azfake.ErrorResponder) + + // GetSiteDetectorResponse is the fake for method DiagnosticsClient.GetSiteDetectorResponse + // HTTP status codes to indicate success: http.StatusOK + GetSiteDetectorResponse func(ctx context.Context, resourceGroupName string, siteName string, detectorName string, options *armappservice.DiagnosticsClientGetSiteDetectorResponseOptions) (resp azfake.Responder[armappservice.DiagnosticsClientGetSiteDetectorResponseResponse], errResp azfake.ErrorResponder) + + // GetSiteDetectorResponseSlot is the fake for method DiagnosticsClient.GetSiteDetectorResponseSlot + // HTTP status codes to indicate success: http.StatusOK + GetSiteDetectorResponseSlot func(ctx context.Context, resourceGroupName string, siteName string, detectorName string, slot string, options *armappservice.DiagnosticsClientGetSiteDetectorResponseSlotOptions) (resp azfake.Responder[armappservice.DiagnosticsClientGetSiteDetectorResponseSlotResponse], errResp azfake.ErrorResponder) + + // GetSiteDetectorSlot is the fake for method DiagnosticsClient.GetSiteDetectorSlot + // HTTP status codes to indicate success: http.StatusOK + GetSiteDetectorSlot func(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, detectorName string, slot string, options *armappservice.DiagnosticsClientGetSiteDetectorSlotOptions) (resp azfake.Responder[armappservice.DiagnosticsClientGetSiteDetectorSlotResponse], errResp azfake.ErrorResponder) + + // GetSiteDiagnosticCategory is the fake for method DiagnosticsClient.GetSiteDiagnosticCategory + // HTTP status codes to indicate success: http.StatusOK + GetSiteDiagnosticCategory func(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, options *armappservice.DiagnosticsClientGetSiteDiagnosticCategoryOptions) (resp azfake.Responder[armappservice.DiagnosticsClientGetSiteDiagnosticCategoryResponse], errResp azfake.ErrorResponder) + + // GetSiteDiagnosticCategorySlot is the fake for method DiagnosticsClient.GetSiteDiagnosticCategorySlot + // HTTP status codes to indicate success: http.StatusOK + GetSiteDiagnosticCategorySlot func(ctx context.Context, resourceGroupName string, siteName string, diagnosticCategory string, slot string, options *armappservice.DiagnosticsClientGetSiteDiagnosticCategorySlotOptions) (resp azfake.Responder[armappservice.DiagnosticsClientGetSiteDiagnosticCategorySlotResponse], errResp azfake.ErrorResponder) + + // NewListHostingEnvironmentDetectorResponsesPager is the fake for method DiagnosticsClient.NewListHostingEnvironmentDetectorResponsesPager + // HTTP status codes to indicate success: http.StatusOK + NewListHostingEnvironmentDetectorResponsesPager func(resourceGroupName string, name string, options *armappservice.DiagnosticsClientListHostingEnvironmentDetectorResponsesOptions) (resp azfake.PagerResponder[armappservice.DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse]) + + // NewListSiteAnalysesPager is the fake for method DiagnosticsClient.NewListSiteAnalysesPager + // HTTP status codes to indicate success: http.StatusOK + NewListSiteAnalysesPager func(resourceGroupName string, siteName string, diagnosticCategory string, options *armappservice.DiagnosticsClientListSiteAnalysesOptions) (resp azfake.PagerResponder[armappservice.DiagnosticsClientListSiteAnalysesResponse]) + + // NewListSiteAnalysesSlotPager is the fake for method DiagnosticsClient.NewListSiteAnalysesSlotPager + // HTTP status codes to indicate success: http.StatusOK + NewListSiteAnalysesSlotPager func(resourceGroupName string, siteName string, diagnosticCategory string, slot string, options *armappservice.DiagnosticsClientListSiteAnalysesSlotOptions) (resp azfake.PagerResponder[armappservice.DiagnosticsClientListSiteAnalysesSlotResponse]) + + // NewListSiteDetectorResponsesPager is the fake for method DiagnosticsClient.NewListSiteDetectorResponsesPager + // HTTP status codes to indicate success: http.StatusOK + NewListSiteDetectorResponsesPager func(resourceGroupName string, siteName string, options *armappservice.DiagnosticsClientListSiteDetectorResponsesOptions) (resp azfake.PagerResponder[armappservice.DiagnosticsClientListSiteDetectorResponsesResponse]) + + // NewListSiteDetectorResponsesSlotPager is the fake for method DiagnosticsClient.NewListSiteDetectorResponsesSlotPager + // HTTP status codes to indicate success: http.StatusOK + NewListSiteDetectorResponsesSlotPager func(resourceGroupName string, siteName string, slot string, options *armappservice.DiagnosticsClientListSiteDetectorResponsesSlotOptions) (resp azfake.PagerResponder[armappservice.DiagnosticsClientListSiteDetectorResponsesSlotResponse]) + + // NewListSiteDetectorsPager is the fake for method DiagnosticsClient.NewListSiteDetectorsPager + // HTTP status codes to indicate success: http.StatusOK + NewListSiteDetectorsPager func(resourceGroupName string, siteName string, diagnosticCategory string, options *armappservice.DiagnosticsClientListSiteDetectorsOptions) (resp azfake.PagerResponder[armappservice.DiagnosticsClientListSiteDetectorsResponse]) + + // NewListSiteDetectorsSlotPager is the fake for method DiagnosticsClient.NewListSiteDetectorsSlotPager + // HTTP status codes to indicate success: http.StatusOK + NewListSiteDetectorsSlotPager func(resourceGroupName string, siteName string, diagnosticCategory string, slot string, options *armappservice.DiagnosticsClientListSiteDetectorsSlotOptions) (resp azfake.PagerResponder[armappservice.DiagnosticsClientListSiteDetectorsSlotResponse]) + + // NewListSiteDiagnosticCategoriesPager is the fake for method DiagnosticsClient.NewListSiteDiagnosticCategoriesPager + // HTTP status codes to indicate success: http.StatusOK + NewListSiteDiagnosticCategoriesPager func(resourceGroupName string, siteName string, options *armappservice.DiagnosticsClientListSiteDiagnosticCategoriesOptions) (resp azfake.PagerResponder[armappservice.DiagnosticsClientListSiteDiagnosticCategoriesResponse]) + + // NewListSiteDiagnosticCategoriesSlotPager is the fake for method DiagnosticsClient.NewListSiteDiagnosticCategoriesSlotPager + // HTTP status codes to indicate success: http.StatusOK + NewListSiteDiagnosticCategoriesSlotPager func(resourceGroupName string, siteName string, slot string, options *armappservice.DiagnosticsClientListSiteDiagnosticCategoriesSlotOptions) (resp azfake.PagerResponder[armappservice.DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse]) +} + +// NewDiagnosticsServerTransport creates a new instance of DiagnosticsServerTransport with the provided implementation. +// The returned DiagnosticsServerTransport instance is connected to an instance of armappservice.DiagnosticsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewDiagnosticsServerTransport(srv *DiagnosticsServer) *DiagnosticsServerTransport { + return &DiagnosticsServerTransport{ + srv: srv, + newListHostingEnvironmentDetectorResponsesPager: newTracker[azfake.PagerResponder[armappservice.DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse]](), + newListSiteAnalysesPager: newTracker[azfake.PagerResponder[armappservice.DiagnosticsClientListSiteAnalysesResponse]](), + newListSiteAnalysesSlotPager: newTracker[azfake.PagerResponder[armappservice.DiagnosticsClientListSiteAnalysesSlotResponse]](), + newListSiteDetectorResponsesPager: newTracker[azfake.PagerResponder[armappservice.DiagnosticsClientListSiteDetectorResponsesResponse]](), + newListSiteDetectorResponsesSlotPager: newTracker[azfake.PagerResponder[armappservice.DiagnosticsClientListSiteDetectorResponsesSlotResponse]](), + newListSiteDetectorsPager: newTracker[azfake.PagerResponder[armappservice.DiagnosticsClientListSiteDetectorsResponse]](), + newListSiteDetectorsSlotPager: newTracker[azfake.PagerResponder[armappservice.DiagnosticsClientListSiteDetectorsSlotResponse]](), + newListSiteDiagnosticCategoriesPager: newTracker[azfake.PagerResponder[armappservice.DiagnosticsClientListSiteDiagnosticCategoriesResponse]](), + newListSiteDiagnosticCategoriesSlotPager: newTracker[azfake.PagerResponder[armappservice.DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse]](), + } +} + +// DiagnosticsServerTransport connects instances of armappservice.DiagnosticsClient to instances of DiagnosticsServer. +// Don't use this type directly, use NewDiagnosticsServerTransport instead. +type DiagnosticsServerTransport struct { + srv *DiagnosticsServer + newListHostingEnvironmentDetectorResponsesPager *tracker[azfake.PagerResponder[armappservice.DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse]] + newListSiteAnalysesPager *tracker[azfake.PagerResponder[armappservice.DiagnosticsClientListSiteAnalysesResponse]] + newListSiteAnalysesSlotPager *tracker[azfake.PagerResponder[armappservice.DiagnosticsClientListSiteAnalysesSlotResponse]] + newListSiteDetectorResponsesPager *tracker[azfake.PagerResponder[armappservice.DiagnosticsClientListSiteDetectorResponsesResponse]] + newListSiteDetectorResponsesSlotPager *tracker[azfake.PagerResponder[armappservice.DiagnosticsClientListSiteDetectorResponsesSlotResponse]] + newListSiteDetectorsPager *tracker[azfake.PagerResponder[armappservice.DiagnosticsClientListSiteDetectorsResponse]] + newListSiteDetectorsSlotPager *tracker[azfake.PagerResponder[armappservice.DiagnosticsClientListSiteDetectorsSlotResponse]] + newListSiteDiagnosticCategoriesPager *tracker[azfake.PagerResponder[armappservice.DiagnosticsClientListSiteDiagnosticCategoriesResponse]] + newListSiteDiagnosticCategoriesSlotPager *tracker[azfake.PagerResponder[armappservice.DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse]] +} + +// Do implements the policy.Transporter interface for DiagnosticsServerTransport. +func (d *DiagnosticsServerTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + var resp *http.Response + var err error + + switch method { + case "DiagnosticsClient.ExecuteSiteAnalysis": + resp, err = d.dispatchExecuteSiteAnalysis(req) + case "DiagnosticsClient.ExecuteSiteAnalysisSlot": + resp, err = d.dispatchExecuteSiteAnalysisSlot(req) + case "DiagnosticsClient.ExecuteSiteDetector": + resp, err = d.dispatchExecuteSiteDetector(req) + case "DiagnosticsClient.ExecuteSiteDetectorSlot": + resp, err = d.dispatchExecuteSiteDetectorSlot(req) + case "DiagnosticsClient.GetHostingEnvironmentDetectorResponse": + resp, err = d.dispatchGetHostingEnvironmentDetectorResponse(req) + case "DiagnosticsClient.GetSiteAnalysis": + resp, err = d.dispatchGetSiteAnalysis(req) + case "DiagnosticsClient.GetSiteAnalysisSlot": + resp, err = d.dispatchGetSiteAnalysisSlot(req) + case "DiagnosticsClient.GetSiteDetector": + resp, err = d.dispatchGetSiteDetector(req) + case "DiagnosticsClient.GetSiteDetectorResponse": + resp, err = d.dispatchGetSiteDetectorResponse(req) + case "DiagnosticsClient.GetSiteDetectorResponseSlot": + resp, err = d.dispatchGetSiteDetectorResponseSlot(req) + case "DiagnosticsClient.GetSiteDetectorSlot": + resp, err = d.dispatchGetSiteDetectorSlot(req) + case "DiagnosticsClient.GetSiteDiagnosticCategory": + resp, err = d.dispatchGetSiteDiagnosticCategory(req) + case "DiagnosticsClient.GetSiteDiagnosticCategorySlot": + resp, err = d.dispatchGetSiteDiagnosticCategorySlot(req) + case "DiagnosticsClient.NewListHostingEnvironmentDetectorResponsesPager": + resp, err = d.dispatchNewListHostingEnvironmentDetectorResponsesPager(req) + case "DiagnosticsClient.NewListSiteAnalysesPager": + resp, err = d.dispatchNewListSiteAnalysesPager(req) + case "DiagnosticsClient.NewListSiteAnalysesSlotPager": + resp, err = d.dispatchNewListSiteAnalysesSlotPager(req) + case "DiagnosticsClient.NewListSiteDetectorResponsesPager": + resp, err = d.dispatchNewListSiteDetectorResponsesPager(req) + case "DiagnosticsClient.NewListSiteDetectorResponsesSlotPager": + resp, err = d.dispatchNewListSiteDetectorResponsesSlotPager(req) + case "DiagnosticsClient.NewListSiteDetectorsPager": + resp, err = d.dispatchNewListSiteDetectorsPager(req) + case "DiagnosticsClient.NewListSiteDetectorsSlotPager": + resp, err = d.dispatchNewListSiteDetectorsSlotPager(req) + case "DiagnosticsClient.NewListSiteDiagnosticCategoriesPager": + resp, err = d.dispatchNewListSiteDiagnosticCategoriesPager(req) + case "DiagnosticsClient.NewListSiteDiagnosticCategoriesSlotPager": + resp, err = d.dispatchNewListSiteDiagnosticCategoriesSlotPager(req) + default: + err = fmt.Errorf("unhandled API %s", method) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func (d *DiagnosticsServerTransport) dispatchExecuteSiteAnalysis(req *http.Request) (*http.Response, error) { + if d.srv.ExecuteSiteAnalysis == nil { + return nil, &nonRetriableError{errors.New("fake for method ExecuteSiteAnalysis not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/diagnostics/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/analyses/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/execute` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + siteNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("siteName")]) + if err != nil { + return nil, err + } + diagnosticCategoryParam, err := url.PathUnescape(matches[regex.SubexpIndex("diagnosticCategory")]) + if err != nil { + return nil, err + } + analysisNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("analysisName")]) + if err != nil { + return nil, err + } + startTimeUnescaped, err := url.QueryUnescape(qp.Get("startTime")) + if err != nil { + return nil, err + } + startTimeParam, err := parseOptional(startTimeUnescaped, func(v string) (time.Time, error) { return time.Parse(time.RFC3339Nano, v) }) + if err != nil { + return nil, err + } + endTimeUnescaped, err := url.QueryUnescape(qp.Get("endTime")) + if err != nil { + return nil, err + } + endTimeParam, err := parseOptional(endTimeUnescaped, func(v string) (time.Time, error) { return time.Parse(time.RFC3339Nano, v) }) + if err != nil { + return nil, err + } + timeGrainUnescaped, err := url.QueryUnescape(qp.Get("timeGrain")) + if err != nil { + return nil, err + } + timeGrainParam := getOptional(timeGrainUnescaped) + var options *armappservice.DiagnosticsClientExecuteSiteAnalysisOptions + if startTimeParam != nil || endTimeParam != nil || timeGrainParam != nil { + options = &armappservice.DiagnosticsClientExecuteSiteAnalysisOptions{ + StartTime: startTimeParam, + EndTime: endTimeParam, + TimeGrain: timeGrainParam, + } + } + respr, errRespr := d.srv.ExecuteSiteAnalysis(req.Context(), resourceGroupNameParam, siteNameParam, diagnosticCategoryParam, analysisNameParam, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).DiagnosticAnalysis, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (d *DiagnosticsServerTransport) dispatchExecuteSiteAnalysisSlot(req *http.Request) (*http.Response, error) { + if d.srv.ExecuteSiteAnalysisSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method ExecuteSiteAnalysisSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/diagnostics/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/analyses/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/execute` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 6 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + siteNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("siteName")]) + if err != nil { + return nil, err + } + diagnosticCategoryParam, err := url.PathUnescape(matches[regex.SubexpIndex("diagnosticCategory")]) + if err != nil { + return nil, err + } + analysisNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("analysisName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + startTimeUnescaped, err := url.QueryUnescape(qp.Get("startTime")) + if err != nil { + return nil, err + } + startTimeParam, err := parseOptional(startTimeUnescaped, func(v string) (time.Time, error) { return time.Parse(time.RFC3339Nano, v) }) + if err != nil { + return nil, err + } + endTimeUnescaped, err := url.QueryUnescape(qp.Get("endTime")) + if err != nil { + return nil, err + } + endTimeParam, err := parseOptional(endTimeUnescaped, func(v string) (time.Time, error) { return time.Parse(time.RFC3339Nano, v) }) + if err != nil { + return nil, err + } + timeGrainUnescaped, err := url.QueryUnescape(qp.Get("timeGrain")) + if err != nil { + return nil, err + } + timeGrainParam := getOptional(timeGrainUnescaped) + var options *armappservice.DiagnosticsClientExecuteSiteAnalysisSlotOptions + if startTimeParam != nil || endTimeParam != nil || timeGrainParam != nil { + options = &armappservice.DiagnosticsClientExecuteSiteAnalysisSlotOptions{ + StartTime: startTimeParam, + EndTime: endTimeParam, + TimeGrain: timeGrainParam, + } + } + respr, errRespr := d.srv.ExecuteSiteAnalysisSlot(req.Context(), resourceGroupNameParam, siteNameParam, diagnosticCategoryParam, analysisNameParam, slotParam, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).DiagnosticAnalysis, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (d *DiagnosticsServerTransport) dispatchExecuteSiteDetector(req *http.Request) (*http.Response, error) { + if d.srv.ExecuteSiteDetector == nil { + return nil, &nonRetriableError{errors.New("fake for method ExecuteSiteDetector not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/diagnostics/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/detectors/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/execute` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + siteNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("siteName")]) + if err != nil { + return nil, err + } + detectorNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("detectorName")]) + if err != nil { + return nil, err + } + diagnosticCategoryParam, err := url.PathUnescape(matches[regex.SubexpIndex("diagnosticCategory")]) + if err != nil { + return nil, err + } + startTimeUnescaped, err := url.QueryUnescape(qp.Get("startTime")) + if err != nil { + return nil, err + } + startTimeParam, err := parseOptional(startTimeUnescaped, func(v string) (time.Time, error) { return time.Parse(time.RFC3339Nano, v) }) + if err != nil { + return nil, err + } + endTimeUnescaped, err := url.QueryUnescape(qp.Get("endTime")) + if err != nil { + return nil, err + } + endTimeParam, err := parseOptional(endTimeUnescaped, func(v string) (time.Time, error) { return time.Parse(time.RFC3339Nano, v) }) + if err != nil { + return nil, err + } + timeGrainUnescaped, err := url.QueryUnescape(qp.Get("timeGrain")) + if err != nil { + return nil, err + } + timeGrainParam := getOptional(timeGrainUnescaped) + var options *armappservice.DiagnosticsClientExecuteSiteDetectorOptions + if startTimeParam != nil || endTimeParam != nil || timeGrainParam != nil { + options = &armappservice.DiagnosticsClientExecuteSiteDetectorOptions{ + StartTime: startTimeParam, + EndTime: endTimeParam, + TimeGrain: timeGrainParam, + } + } + respr, errRespr := d.srv.ExecuteSiteDetector(req.Context(), resourceGroupNameParam, siteNameParam, detectorNameParam, diagnosticCategoryParam, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).DiagnosticDetectorResponse, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (d *DiagnosticsServerTransport) dispatchExecuteSiteDetectorSlot(req *http.Request) (*http.Response, error) { + if d.srv.ExecuteSiteDetectorSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method ExecuteSiteDetectorSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/diagnostics/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/detectors/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/execute` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 6 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + siteNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("siteName")]) + if err != nil { + return nil, err + } + detectorNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("detectorName")]) + if err != nil { + return nil, err + } + diagnosticCategoryParam, err := url.PathUnescape(matches[regex.SubexpIndex("diagnosticCategory")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + startTimeUnescaped, err := url.QueryUnescape(qp.Get("startTime")) + if err != nil { + return nil, err + } + startTimeParam, err := parseOptional(startTimeUnescaped, func(v string) (time.Time, error) { return time.Parse(time.RFC3339Nano, v) }) + if err != nil { + return nil, err + } + endTimeUnescaped, err := url.QueryUnescape(qp.Get("endTime")) + if err != nil { + return nil, err + } + endTimeParam, err := parseOptional(endTimeUnescaped, func(v string) (time.Time, error) { return time.Parse(time.RFC3339Nano, v) }) + if err != nil { + return nil, err + } + timeGrainUnescaped, err := url.QueryUnescape(qp.Get("timeGrain")) + if err != nil { + return nil, err + } + timeGrainParam := getOptional(timeGrainUnescaped) + var options *armappservice.DiagnosticsClientExecuteSiteDetectorSlotOptions + if startTimeParam != nil || endTimeParam != nil || timeGrainParam != nil { + options = &armappservice.DiagnosticsClientExecuteSiteDetectorSlotOptions{ + StartTime: startTimeParam, + EndTime: endTimeParam, + TimeGrain: timeGrainParam, + } + } + respr, errRespr := d.srv.ExecuteSiteDetectorSlot(req.Context(), resourceGroupNameParam, siteNameParam, detectorNameParam, diagnosticCategoryParam, slotParam, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).DiagnosticDetectorResponse, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (d *DiagnosticsServerTransport) dispatchGetHostingEnvironmentDetectorResponse(req *http.Request) (*http.Response, error) { + if d.srv.GetHostingEnvironmentDetectorResponse == nil { + return nil, &nonRetriableError{errors.New("fake for method GetHostingEnvironmentDetectorResponse not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/detectors/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + detectorNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("detectorName")]) + if err != nil { + return nil, err + } + startTimeUnescaped, err := url.QueryUnescape(qp.Get("startTime")) + if err != nil { + return nil, err + } + startTimeParam, err := parseOptional(startTimeUnescaped, func(v string) (time.Time, error) { return time.Parse(time.RFC3339Nano, v) }) + if err != nil { + return nil, err + } + endTimeUnescaped, err := url.QueryUnescape(qp.Get("endTime")) + if err != nil { + return nil, err + } + endTimeParam, err := parseOptional(endTimeUnescaped, func(v string) (time.Time, error) { return time.Parse(time.RFC3339Nano, v) }) + if err != nil { + return nil, err + } + timeGrainUnescaped, err := url.QueryUnescape(qp.Get("timeGrain")) + if err != nil { + return nil, err + } + timeGrainParam := getOptional(timeGrainUnescaped) + var options *armappservice.DiagnosticsClientGetHostingEnvironmentDetectorResponseOptions + if startTimeParam != nil || endTimeParam != nil || timeGrainParam != nil { + options = &armappservice.DiagnosticsClientGetHostingEnvironmentDetectorResponseOptions{ + StartTime: startTimeParam, + EndTime: endTimeParam, + TimeGrain: timeGrainParam, + } + } + respr, errRespr := d.srv.GetHostingEnvironmentDetectorResponse(req.Context(), resourceGroupNameParam, nameParam, detectorNameParam, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).DetectorResponse, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (d *DiagnosticsServerTransport) dispatchGetSiteAnalysis(req *http.Request) (*http.Response, error) { + if d.srv.GetSiteAnalysis == nil { + return nil, &nonRetriableError{errors.New("fake for method GetSiteAnalysis not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/diagnostics/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/analyses/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + siteNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("siteName")]) + if err != nil { + return nil, err + } + diagnosticCategoryParam, err := url.PathUnescape(matches[regex.SubexpIndex("diagnosticCategory")]) + if err != nil { + return nil, err + } + analysisNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("analysisName")]) + if err != nil { + return nil, err + } + respr, errRespr := d.srv.GetSiteAnalysis(req.Context(), resourceGroupNameParam, siteNameParam, diagnosticCategoryParam, analysisNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).AnalysisDefinition, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (d *DiagnosticsServerTransport) dispatchGetSiteAnalysisSlot(req *http.Request) (*http.Response, error) { + if d.srv.GetSiteAnalysisSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetSiteAnalysisSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/diagnostics/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/analyses/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 6 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + siteNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("siteName")]) + if err != nil { + return nil, err + } + diagnosticCategoryParam, err := url.PathUnescape(matches[regex.SubexpIndex("diagnosticCategory")]) + if err != nil { + return nil, err + } + analysisNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("analysisName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := d.srv.GetSiteAnalysisSlot(req.Context(), resourceGroupNameParam, siteNameParam, diagnosticCategoryParam, analysisNameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).AnalysisDefinition, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (d *DiagnosticsServerTransport) dispatchGetSiteDetector(req *http.Request) (*http.Response, error) { + if d.srv.GetSiteDetector == nil { + return nil, &nonRetriableError{errors.New("fake for method GetSiteDetector not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/diagnostics/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/detectors/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + siteNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("siteName")]) + if err != nil { + return nil, err + } + diagnosticCategoryParam, err := url.PathUnescape(matches[regex.SubexpIndex("diagnosticCategory")]) + if err != nil { + return nil, err + } + detectorNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("detectorName")]) + if err != nil { + return nil, err + } + respr, errRespr := d.srv.GetSiteDetector(req.Context(), resourceGroupNameParam, siteNameParam, diagnosticCategoryParam, detectorNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).DetectorDefinitionResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (d *DiagnosticsServerTransport) dispatchGetSiteDetectorResponse(req *http.Request) (*http.Response, error) { + if d.srv.GetSiteDetectorResponse == nil { + return nil, &nonRetriableError{errors.New("fake for method GetSiteDetectorResponse not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/detectors/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + siteNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("siteName")]) + if err != nil { + return nil, err + } + detectorNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("detectorName")]) + if err != nil { + return nil, err + } + startTimeUnescaped, err := url.QueryUnescape(qp.Get("startTime")) + if err != nil { + return nil, err + } + startTimeParam, err := parseOptional(startTimeUnescaped, func(v string) (time.Time, error) { return time.Parse(time.RFC3339Nano, v) }) + if err != nil { + return nil, err + } + endTimeUnescaped, err := url.QueryUnescape(qp.Get("endTime")) + if err != nil { + return nil, err + } + endTimeParam, err := parseOptional(endTimeUnescaped, func(v string) (time.Time, error) { return time.Parse(time.RFC3339Nano, v) }) + if err != nil { + return nil, err + } + timeGrainUnescaped, err := url.QueryUnescape(qp.Get("timeGrain")) + if err != nil { + return nil, err + } + timeGrainParam := getOptional(timeGrainUnescaped) + var options *armappservice.DiagnosticsClientGetSiteDetectorResponseOptions + if startTimeParam != nil || endTimeParam != nil || timeGrainParam != nil { + options = &armappservice.DiagnosticsClientGetSiteDetectorResponseOptions{ + StartTime: startTimeParam, + EndTime: endTimeParam, + TimeGrain: timeGrainParam, + } + } + respr, errRespr := d.srv.GetSiteDetectorResponse(req.Context(), resourceGroupNameParam, siteNameParam, detectorNameParam, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).DetectorResponse, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (d *DiagnosticsServerTransport) dispatchGetSiteDetectorResponseSlot(req *http.Request) (*http.Response, error) { + if d.srv.GetSiteDetectorResponseSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetSiteDetectorResponseSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/detectors/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + siteNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("siteName")]) + if err != nil { + return nil, err + } + detectorNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("detectorName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + startTimeUnescaped, err := url.QueryUnescape(qp.Get("startTime")) + if err != nil { + return nil, err + } + startTimeParam, err := parseOptional(startTimeUnescaped, func(v string) (time.Time, error) { return time.Parse(time.RFC3339Nano, v) }) + if err != nil { + return nil, err + } + endTimeUnescaped, err := url.QueryUnescape(qp.Get("endTime")) + if err != nil { + return nil, err + } + endTimeParam, err := parseOptional(endTimeUnescaped, func(v string) (time.Time, error) { return time.Parse(time.RFC3339Nano, v) }) + if err != nil { + return nil, err + } + timeGrainUnescaped, err := url.QueryUnescape(qp.Get("timeGrain")) + if err != nil { + return nil, err + } + timeGrainParam := getOptional(timeGrainUnescaped) + var options *armappservice.DiagnosticsClientGetSiteDetectorResponseSlotOptions + if startTimeParam != nil || endTimeParam != nil || timeGrainParam != nil { + options = &armappservice.DiagnosticsClientGetSiteDetectorResponseSlotOptions{ + StartTime: startTimeParam, + EndTime: endTimeParam, + TimeGrain: timeGrainParam, + } + } + respr, errRespr := d.srv.GetSiteDetectorResponseSlot(req.Context(), resourceGroupNameParam, siteNameParam, detectorNameParam, slotParam, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).DetectorResponse, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (d *DiagnosticsServerTransport) dispatchGetSiteDetectorSlot(req *http.Request) (*http.Response, error) { + if d.srv.GetSiteDetectorSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetSiteDetectorSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/diagnostics/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/detectors/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 6 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + siteNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("siteName")]) + if err != nil { + return nil, err + } + diagnosticCategoryParam, err := url.PathUnescape(matches[regex.SubexpIndex("diagnosticCategory")]) + if err != nil { + return nil, err + } + detectorNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("detectorName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := d.srv.GetSiteDetectorSlot(req.Context(), resourceGroupNameParam, siteNameParam, diagnosticCategoryParam, detectorNameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).DetectorDefinitionResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (d *DiagnosticsServerTransport) dispatchGetSiteDiagnosticCategory(req *http.Request) (*http.Response, error) { + if d.srv.GetSiteDiagnosticCategory == nil { + return nil, &nonRetriableError{errors.New("fake for method GetSiteDiagnosticCategory not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/diagnostics/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + siteNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("siteName")]) + if err != nil { + return nil, err + } + diagnosticCategoryParam, err := url.PathUnescape(matches[regex.SubexpIndex("diagnosticCategory")]) + if err != nil { + return nil, err + } + respr, errRespr := d.srv.GetSiteDiagnosticCategory(req.Context(), resourceGroupNameParam, siteNameParam, diagnosticCategoryParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).DiagnosticCategory, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (d *DiagnosticsServerTransport) dispatchGetSiteDiagnosticCategorySlot(req *http.Request) (*http.Response, error) { + if d.srv.GetSiteDiagnosticCategorySlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetSiteDiagnosticCategorySlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/diagnostics/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + siteNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("siteName")]) + if err != nil { + return nil, err + } + diagnosticCategoryParam, err := url.PathUnescape(matches[regex.SubexpIndex("diagnosticCategory")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := d.srv.GetSiteDiagnosticCategorySlot(req.Context(), resourceGroupNameParam, siteNameParam, diagnosticCategoryParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).DiagnosticCategory, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (d *DiagnosticsServerTransport) dispatchNewListHostingEnvironmentDetectorResponsesPager(req *http.Request) (*http.Response, error) { + if d.srv.NewListHostingEnvironmentDetectorResponsesPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListHostingEnvironmentDetectorResponsesPager not implemented")} + } + newListHostingEnvironmentDetectorResponsesPager := d.newListHostingEnvironmentDetectorResponsesPager.get(req) + if newListHostingEnvironmentDetectorResponsesPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/detectors` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := d.srv.NewListHostingEnvironmentDetectorResponsesPager(resourceGroupNameParam, nameParam, nil) + newListHostingEnvironmentDetectorResponsesPager = &resp + d.newListHostingEnvironmentDetectorResponsesPager.add(req, newListHostingEnvironmentDetectorResponsesPager) + server.PagerResponderInjectNextLinks(newListHostingEnvironmentDetectorResponsesPager, req, func(page *armappservice.DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListHostingEnvironmentDetectorResponsesPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + d.newListHostingEnvironmentDetectorResponsesPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListHostingEnvironmentDetectorResponsesPager) { + d.newListHostingEnvironmentDetectorResponsesPager.remove(req) + } + return resp, nil +} + +func (d *DiagnosticsServerTransport) dispatchNewListSiteAnalysesPager(req *http.Request) (*http.Response, error) { + if d.srv.NewListSiteAnalysesPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListSiteAnalysesPager not implemented")} + } + newListSiteAnalysesPager := d.newListSiteAnalysesPager.get(req) + if newListSiteAnalysesPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/diagnostics/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/analyses` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + siteNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("siteName")]) + if err != nil { + return nil, err + } + diagnosticCategoryParam, err := url.PathUnescape(matches[regex.SubexpIndex("diagnosticCategory")]) + if err != nil { + return nil, err + } + resp := d.srv.NewListSiteAnalysesPager(resourceGroupNameParam, siteNameParam, diagnosticCategoryParam, nil) + newListSiteAnalysesPager = &resp + d.newListSiteAnalysesPager.add(req, newListSiteAnalysesPager) + server.PagerResponderInjectNextLinks(newListSiteAnalysesPager, req, func(page *armappservice.DiagnosticsClientListSiteAnalysesResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListSiteAnalysesPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + d.newListSiteAnalysesPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListSiteAnalysesPager) { + d.newListSiteAnalysesPager.remove(req) + } + return resp, nil +} + +func (d *DiagnosticsServerTransport) dispatchNewListSiteAnalysesSlotPager(req *http.Request) (*http.Response, error) { + if d.srv.NewListSiteAnalysesSlotPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListSiteAnalysesSlotPager not implemented")} + } + newListSiteAnalysesSlotPager := d.newListSiteAnalysesSlotPager.get(req) + if newListSiteAnalysesSlotPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/diagnostics/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/analyses` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + siteNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("siteName")]) + if err != nil { + return nil, err + } + diagnosticCategoryParam, err := url.PathUnescape(matches[regex.SubexpIndex("diagnosticCategory")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + resp := d.srv.NewListSiteAnalysesSlotPager(resourceGroupNameParam, siteNameParam, diagnosticCategoryParam, slotParam, nil) + newListSiteAnalysesSlotPager = &resp + d.newListSiteAnalysesSlotPager.add(req, newListSiteAnalysesSlotPager) + server.PagerResponderInjectNextLinks(newListSiteAnalysesSlotPager, req, func(page *armappservice.DiagnosticsClientListSiteAnalysesSlotResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListSiteAnalysesSlotPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + d.newListSiteAnalysesSlotPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListSiteAnalysesSlotPager) { + d.newListSiteAnalysesSlotPager.remove(req) + } + return resp, nil +} + +func (d *DiagnosticsServerTransport) dispatchNewListSiteDetectorResponsesPager(req *http.Request) (*http.Response, error) { + if d.srv.NewListSiteDetectorResponsesPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListSiteDetectorResponsesPager not implemented")} + } + newListSiteDetectorResponsesPager := d.newListSiteDetectorResponsesPager.get(req) + if newListSiteDetectorResponsesPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/detectors` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + siteNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("siteName")]) + if err != nil { + return nil, err + } + resp := d.srv.NewListSiteDetectorResponsesPager(resourceGroupNameParam, siteNameParam, nil) + newListSiteDetectorResponsesPager = &resp + d.newListSiteDetectorResponsesPager.add(req, newListSiteDetectorResponsesPager) + server.PagerResponderInjectNextLinks(newListSiteDetectorResponsesPager, req, func(page *armappservice.DiagnosticsClientListSiteDetectorResponsesResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListSiteDetectorResponsesPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + d.newListSiteDetectorResponsesPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListSiteDetectorResponsesPager) { + d.newListSiteDetectorResponsesPager.remove(req) + } + return resp, nil +} + +func (d *DiagnosticsServerTransport) dispatchNewListSiteDetectorResponsesSlotPager(req *http.Request) (*http.Response, error) { + if d.srv.NewListSiteDetectorResponsesSlotPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListSiteDetectorResponsesSlotPager not implemented")} + } + newListSiteDetectorResponsesSlotPager := d.newListSiteDetectorResponsesSlotPager.get(req) + if newListSiteDetectorResponsesSlotPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/detectors` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + siteNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("siteName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + resp := d.srv.NewListSiteDetectorResponsesSlotPager(resourceGroupNameParam, siteNameParam, slotParam, nil) + newListSiteDetectorResponsesSlotPager = &resp + d.newListSiteDetectorResponsesSlotPager.add(req, newListSiteDetectorResponsesSlotPager) + server.PagerResponderInjectNextLinks(newListSiteDetectorResponsesSlotPager, req, func(page *armappservice.DiagnosticsClientListSiteDetectorResponsesSlotResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListSiteDetectorResponsesSlotPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + d.newListSiteDetectorResponsesSlotPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListSiteDetectorResponsesSlotPager) { + d.newListSiteDetectorResponsesSlotPager.remove(req) + } + return resp, nil +} + +func (d *DiagnosticsServerTransport) dispatchNewListSiteDetectorsPager(req *http.Request) (*http.Response, error) { + if d.srv.NewListSiteDetectorsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListSiteDetectorsPager not implemented")} + } + newListSiteDetectorsPager := d.newListSiteDetectorsPager.get(req) + if newListSiteDetectorsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/diagnostics/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/detectors` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + siteNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("siteName")]) + if err != nil { + return nil, err + } + diagnosticCategoryParam, err := url.PathUnescape(matches[regex.SubexpIndex("diagnosticCategory")]) + if err != nil { + return nil, err + } + resp := d.srv.NewListSiteDetectorsPager(resourceGroupNameParam, siteNameParam, diagnosticCategoryParam, nil) + newListSiteDetectorsPager = &resp + d.newListSiteDetectorsPager.add(req, newListSiteDetectorsPager) + server.PagerResponderInjectNextLinks(newListSiteDetectorsPager, req, func(page *armappservice.DiagnosticsClientListSiteDetectorsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListSiteDetectorsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + d.newListSiteDetectorsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListSiteDetectorsPager) { + d.newListSiteDetectorsPager.remove(req) + } + return resp, nil +} + +func (d *DiagnosticsServerTransport) dispatchNewListSiteDetectorsSlotPager(req *http.Request) (*http.Response, error) { + if d.srv.NewListSiteDetectorsSlotPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListSiteDetectorsSlotPager not implemented")} + } + newListSiteDetectorsSlotPager := d.newListSiteDetectorsSlotPager.get(req) + if newListSiteDetectorsSlotPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/diagnostics/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/detectors` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + siteNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("siteName")]) + if err != nil { + return nil, err + } + diagnosticCategoryParam, err := url.PathUnescape(matches[regex.SubexpIndex("diagnosticCategory")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + resp := d.srv.NewListSiteDetectorsSlotPager(resourceGroupNameParam, siteNameParam, diagnosticCategoryParam, slotParam, nil) + newListSiteDetectorsSlotPager = &resp + d.newListSiteDetectorsSlotPager.add(req, newListSiteDetectorsSlotPager) + server.PagerResponderInjectNextLinks(newListSiteDetectorsSlotPager, req, func(page *armappservice.DiagnosticsClientListSiteDetectorsSlotResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListSiteDetectorsSlotPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + d.newListSiteDetectorsSlotPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListSiteDetectorsSlotPager) { + d.newListSiteDetectorsSlotPager.remove(req) + } + return resp, nil +} + +func (d *DiagnosticsServerTransport) dispatchNewListSiteDiagnosticCategoriesPager(req *http.Request) (*http.Response, error) { + if d.srv.NewListSiteDiagnosticCategoriesPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListSiteDiagnosticCategoriesPager not implemented")} + } + newListSiteDiagnosticCategoriesPager := d.newListSiteDiagnosticCategoriesPager.get(req) + if newListSiteDiagnosticCategoriesPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/diagnostics` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + siteNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("siteName")]) + if err != nil { + return nil, err + } + resp := d.srv.NewListSiteDiagnosticCategoriesPager(resourceGroupNameParam, siteNameParam, nil) + newListSiteDiagnosticCategoriesPager = &resp + d.newListSiteDiagnosticCategoriesPager.add(req, newListSiteDiagnosticCategoriesPager) + server.PagerResponderInjectNextLinks(newListSiteDiagnosticCategoriesPager, req, func(page *armappservice.DiagnosticsClientListSiteDiagnosticCategoriesResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListSiteDiagnosticCategoriesPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + d.newListSiteDiagnosticCategoriesPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListSiteDiagnosticCategoriesPager) { + d.newListSiteDiagnosticCategoriesPager.remove(req) + } + return resp, nil +} + +func (d *DiagnosticsServerTransport) dispatchNewListSiteDiagnosticCategoriesSlotPager(req *http.Request) (*http.Response, error) { + if d.srv.NewListSiteDiagnosticCategoriesSlotPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListSiteDiagnosticCategoriesSlotPager not implemented")} + } + newListSiteDiagnosticCategoriesSlotPager := d.newListSiteDiagnosticCategoriesSlotPager.get(req) + if newListSiteDiagnosticCategoriesSlotPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/diagnostics` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + siteNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("siteName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + resp := d.srv.NewListSiteDiagnosticCategoriesSlotPager(resourceGroupNameParam, siteNameParam, slotParam, nil) + newListSiteDiagnosticCategoriesSlotPager = &resp + d.newListSiteDiagnosticCategoriesSlotPager.add(req, newListSiteDiagnosticCategoriesSlotPager) + server.PagerResponderInjectNextLinks(newListSiteDiagnosticCategoriesSlotPager, req, func(page *armappservice.DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListSiteDiagnosticCategoriesSlotPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + d.newListSiteDiagnosticCategoriesSlotPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListSiteDiagnosticCategoriesSlotPager) { + d.newListSiteDiagnosticCategoriesSlotPager.remove(req) + } + return resp, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/fake/domainregistrationprovider_server.go b/sdk/resourcemanager/appservice/armappservice/fake/domainregistrationprovider_server.go new file mode 100644 index 000000000000..383b80c3a7eb --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/fake/domainregistrationprovider_server.go @@ -0,0 +1,96 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "errors" + "fmt" + azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" + "net/http" +) + +// DomainRegistrationProviderServer is a fake server for instances of the armappservice.DomainRegistrationProviderClient type. +type DomainRegistrationProviderServer struct { + // NewListOperationsPager is the fake for method DomainRegistrationProviderClient.NewListOperationsPager + // HTTP status codes to indicate success: http.StatusOK + NewListOperationsPager func(options *armappservice.DomainRegistrationProviderClientListOperationsOptions) (resp azfake.PagerResponder[armappservice.DomainRegistrationProviderClientListOperationsResponse]) +} + +// NewDomainRegistrationProviderServerTransport creates a new instance of DomainRegistrationProviderServerTransport with the provided implementation. +// The returned DomainRegistrationProviderServerTransport instance is connected to an instance of armappservice.DomainRegistrationProviderClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewDomainRegistrationProviderServerTransport(srv *DomainRegistrationProviderServer) *DomainRegistrationProviderServerTransport { + return &DomainRegistrationProviderServerTransport{ + srv: srv, + newListOperationsPager: newTracker[azfake.PagerResponder[armappservice.DomainRegistrationProviderClientListOperationsResponse]](), + } +} + +// DomainRegistrationProviderServerTransport connects instances of armappservice.DomainRegistrationProviderClient to instances of DomainRegistrationProviderServer. +// Don't use this type directly, use NewDomainRegistrationProviderServerTransport instead. +type DomainRegistrationProviderServerTransport struct { + srv *DomainRegistrationProviderServer + newListOperationsPager *tracker[azfake.PagerResponder[armappservice.DomainRegistrationProviderClientListOperationsResponse]] +} + +// Do implements the policy.Transporter interface for DomainRegistrationProviderServerTransport. +func (d *DomainRegistrationProviderServerTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + var resp *http.Response + var err error + + switch method { + case "DomainRegistrationProviderClient.NewListOperationsPager": + resp, err = d.dispatchNewListOperationsPager(req) + default: + err = fmt.Errorf("unhandled API %s", method) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func (d *DomainRegistrationProviderServerTransport) dispatchNewListOperationsPager(req *http.Request) (*http.Response, error) { + if d.srv.NewListOperationsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListOperationsPager not implemented")} + } + newListOperationsPager := d.newListOperationsPager.get(req) + if newListOperationsPager == nil { + resp := d.srv.NewListOperationsPager(nil) + newListOperationsPager = &resp + d.newListOperationsPager.add(req, newListOperationsPager) + server.PagerResponderInjectNextLinks(newListOperationsPager, req, func(page *armappservice.DomainRegistrationProviderClientListOperationsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListOperationsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + d.newListOperationsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListOperationsPager) { + d.newListOperationsPager.remove(req) + } + return resp, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/fake/domains_server.go b/sdk/resourcemanager/appservice/armappservice/fake/domains_server.go new file mode 100644 index 000000000000..bb63495efd95 --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/fake/domains_server.go @@ -0,0 +1,761 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "context" + "errors" + "fmt" + azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" + "net/http" + "net/url" + "regexp" + "strconv" +) + +// DomainsServer is a fake server for instances of the armappservice.DomainsClient type. +type DomainsServer struct { + // CheckAvailability is the fake for method DomainsClient.CheckAvailability + // HTTP status codes to indicate success: http.StatusOK + CheckAvailability func(ctx context.Context, identifier armappservice.NameIdentifier, options *armappservice.DomainsClientCheckAvailabilityOptions) (resp azfake.Responder[armappservice.DomainsClientCheckAvailabilityResponse], errResp azfake.ErrorResponder) + + // BeginCreateOrUpdate is the fake for method DomainsClient.BeginCreateOrUpdate + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginCreateOrUpdate func(ctx context.Context, resourceGroupName string, domainName string, domain armappservice.Domain, options *armappservice.DomainsClientBeginCreateOrUpdateOptions) (resp azfake.PollerResponder[armappservice.DomainsClientCreateOrUpdateResponse], errResp azfake.ErrorResponder) + + // CreateOrUpdateOwnershipIdentifier is the fake for method DomainsClient.CreateOrUpdateOwnershipIdentifier + // HTTP status codes to indicate success: http.StatusOK + CreateOrUpdateOwnershipIdentifier func(ctx context.Context, resourceGroupName string, domainName string, name string, domainOwnershipIdentifier armappservice.DomainOwnershipIdentifier, options *armappservice.DomainsClientCreateOrUpdateOwnershipIdentifierOptions) (resp azfake.Responder[armappservice.DomainsClientCreateOrUpdateOwnershipIdentifierResponse], errResp azfake.ErrorResponder) + + // Delete is the fake for method DomainsClient.Delete + // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent + Delete func(ctx context.Context, resourceGroupName string, domainName string, options *armappservice.DomainsClientDeleteOptions) (resp azfake.Responder[armappservice.DomainsClientDeleteResponse], errResp azfake.ErrorResponder) + + // DeleteOwnershipIdentifier is the fake for method DomainsClient.DeleteOwnershipIdentifier + // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent + DeleteOwnershipIdentifier func(ctx context.Context, resourceGroupName string, domainName string, name string, options *armappservice.DomainsClientDeleteOwnershipIdentifierOptions) (resp azfake.Responder[armappservice.DomainsClientDeleteOwnershipIdentifierResponse], errResp azfake.ErrorResponder) + + // Get is the fake for method DomainsClient.Get + // HTTP status codes to indicate success: http.StatusOK + Get func(ctx context.Context, resourceGroupName string, domainName string, options *armappservice.DomainsClientGetOptions) (resp azfake.Responder[armappservice.DomainsClientGetResponse], errResp azfake.ErrorResponder) + + // GetControlCenterSsoRequest is the fake for method DomainsClient.GetControlCenterSsoRequest + // HTTP status codes to indicate success: http.StatusOK + GetControlCenterSsoRequest func(ctx context.Context, options *armappservice.DomainsClientGetControlCenterSsoRequestOptions) (resp azfake.Responder[armappservice.DomainsClientGetControlCenterSsoRequestResponse], errResp azfake.ErrorResponder) + + // GetOwnershipIdentifier is the fake for method DomainsClient.GetOwnershipIdentifier + // HTTP status codes to indicate success: http.StatusOK + GetOwnershipIdentifier func(ctx context.Context, resourceGroupName string, domainName string, name string, options *armappservice.DomainsClientGetOwnershipIdentifierOptions) (resp azfake.Responder[armappservice.DomainsClientGetOwnershipIdentifierResponse], errResp azfake.ErrorResponder) + + // NewListPager is the fake for method DomainsClient.NewListPager + // HTTP status codes to indicate success: http.StatusOK + NewListPager func(options *armappservice.DomainsClientListOptions) (resp azfake.PagerResponder[armappservice.DomainsClientListResponse]) + + // NewListByResourceGroupPager is the fake for method DomainsClient.NewListByResourceGroupPager + // HTTP status codes to indicate success: http.StatusOK + NewListByResourceGroupPager func(resourceGroupName string, options *armappservice.DomainsClientListByResourceGroupOptions) (resp azfake.PagerResponder[armappservice.DomainsClientListByResourceGroupResponse]) + + // NewListOwnershipIdentifiersPager is the fake for method DomainsClient.NewListOwnershipIdentifiersPager + // HTTP status codes to indicate success: http.StatusOK + NewListOwnershipIdentifiersPager func(resourceGroupName string, domainName string, options *armappservice.DomainsClientListOwnershipIdentifiersOptions) (resp azfake.PagerResponder[armappservice.DomainsClientListOwnershipIdentifiersResponse]) + + // NewListRecommendationsPager is the fake for method DomainsClient.NewListRecommendationsPager + // HTTP status codes to indicate success: http.StatusOK + NewListRecommendationsPager func(parameters armappservice.DomainRecommendationSearchParameters, options *armappservice.DomainsClientListRecommendationsOptions) (resp azfake.PagerResponder[armappservice.DomainsClientListRecommendationsResponse]) + + // Renew is the fake for method DomainsClient.Renew + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent + Renew func(ctx context.Context, resourceGroupName string, domainName string, options *armappservice.DomainsClientRenewOptions) (resp azfake.Responder[armappservice.DomainsClientRenewResponse], errResp azfake.ErrorResponder) + + // TransferOut is the fake for method DomainsClient.TransferOut + // HTTP status codes to indicate success: http.StatusOK + TransferOut func(ctx context.Context, resourceGroupName string, domainName string, options *armappservice.DomainsClientTransferOutOptions) (resp azfake.Responder[armappservice.DomainsClientTransferOutResponse], errResp azfake.ErrorResponder) + + // Update is the fake for method DomainsClient.Update + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + Update func(ctx context.Context, resourceGroupName string, domainName string, domain armappservice.DomainPatchResource, options *armappservice.DomainsClientUpdateOptions) (resp azfake.Responder[armappservice.DomainsClientUpdateResponse], errResp azfake.ErrorResponder) + + // UpdateOwnershipIdentifier is the fake for method DomainsClient.UpdateOwnershipIdentifier + // HTTP status codes to indicate success: http.StatusOK + UpdateOwnershipIdentifier func(ctx context.Context, resourceGroupName string, domainName string, name string, domainOwnershipIdentifier armappservice.DomainOwnershipIdentifier, options *armappservice.DomainsClientUpdateOwnershipIdentifierOptions) (resp azfake.Responder[armappservice.DomainsClientUpdateOwnershipIdentifierResponse], errResp azfake.ErrorResponder) +} + +// NewDomainsServerTransport creates a new instance of DomainsServerTransport with the provided implementation. +// The returned DomainsServerTransport instance is connected to an instance of armappservice.DomainsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewDomainsServerTransport(srv *DomainsServer) *DomainsServerTransport { + return &DomainsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armappservice.DomainsClientCreateOrUpdateResponse]](), + newListPager: newTracker[azfake.PagerResponder[armappservice.DomainsClientListResponse]](), + newListByResourceGroupPager: newTracker[azfake.PagerResponder[armappservice.DomainsClientListByResourceGroupResponse]](), + newListOwnershipIdentifiersPager: newTracker[azfake.PagerResponder[armappservice.DomainsClientListOwnershipIdentifiersResponse]](), + newListRecommendationsPager: newTracker[azfake.PagerResponder[armappservice.DomainsClientListRecommendationsResponse]](), + } +} + +// DomainsServerTransport connects instances of armappservice.DomainsClient to instances of DomainsServer. +// Don't use this type directly, use NewDomainsServerTransport instead. +type DomainsServerTransport struct { + srv *DomainsServer + beginCreateOrUpdate *tracker[azfake.PollerResponder[armappservice.DomainsClientCreateOrUpdateResponse]] + newListPager *tracker[azfake.PagerResponder[armappservice.DomainsClientListResponse]] + newListByResourceGroupPager *tracker[azfake.PagerResponder[armappservice.DomainsClientListByResourceGroupResponse]] + newListOwnershipIdentifiersPager *tracker[azfake.PagerResponder[armappservice.DomainsClientListOwnershipIdentifiersResponse]] + newListRecommendationsPager *tracker[azfake.PagerResponder[armappservice.DomainsClientListRecommendationsResponse]] +} + +// Do implements the policy.Transporter interface for DomainsServerTransport. +func (d *DomainsServerTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + var resp *http.Response + var err error + + switch method { + case "DomainsClient.CheckAvailability": + resp, err = d.dispatchCheckAvailability(req) + case "DomainsClient.BeginCreateOrUpdate": + resp, err = d.dispatchBeginCreateOrUpdate(req) + case "DomainsClient.CreateOrUpdateOwnershipIdentifier": + resp, err = d.dispatchCreateOrUpdateOwnershipIdentifier(req) + case "DomainsClient.Delete": + resp, err = d.dispatchDelete(req) + case "DomainsClient.DeleteOwnershipIdentifier": + resp, err = d.dispatchDeleteOwnershipIdentifier(req) + case "DomainsClient.Get": + resp, err = d.dispatchGet(req) + case "DomainsClient.GetControlCenterSsoRequest": + resp, err = d.dispatchGetControlCenterSsoRequest(req) + case "DomainsClient.GetOwnershipIdentifier": + resp, err = d.dispatchGetOwnershipIdentifier(req) + case "DomainsClient.NewListPager": + resp, err = d.dispatchNewListPager(req) + case "DomainsClient.NewListByResourceGroupPager": + resp, err = d.dispatchNewListByResourceGroupPager(req) + case "DomainsClient.NewListOwnershipIdentifiersPager": + resp, err = d.dispatchNewListOwnershipIdentifiersPager(req) + case "DomainsClient.NewListRecommendationsPager": + resp, err = d.dispatchNewListRecommendationsPager(req) + case "DomainsClient.Renew": + resp, err = d.dispatchRenew(req) + case "DomainsClient.TransferOut": + resp, err = d.dispatchTransferOut(req) + case "DomainsClient.Update": + resp, err = d.dispatchUpdate(req) + case "DomainsClient.UpdateOwnershipIdentifier": + resp, err = d.dispatchUpdateOwnershipIdentifier(req) + default: + err = fmt.Errorf("unhandled API %s", method) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func (d *DomainsServerTransport) dispatchCheckAvailability(req *http.Request) (*http.Response, error) { + if d.srv.CheckAvailability == nil { + return nil, &nonRetriableError{errors.New("fake for method CheckAvailability not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DomainRegistration/checkDomainAvailability` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 1 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.NameIdentifier](req) + if err != nil { + return nil, err + } + respr, errRespr := d.srv.CheckAvailability(req.Context(), body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).DomainAvailabilityCheckResult, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (d *DomainsServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) (*http.Response, error) { + if d.srv.BeginCreateOrUpdate == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} + } + beginCreateOrUpdate := d.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DomainRegistration/domains/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.Domain](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + domainNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("domainName")]) + if err != nil { + return nil, err + } + respr, errRespr := d.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, domainNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginCreateOrUpdate = &respr + d.beginCreateOrUpdate.add(req, beginCreateOrUpdate) + } + + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + d.beginCreateOrUpdate.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginCreateOrUpdate) { + d.beginCreateOrUpdate.remove(req) + } + + return resp, nil +} + +func (d *DomainsServerTransport) dispatchCreateOrUpdateOwnershipIdentifier(req *http.Request) (*http.Response, error) { + if d.srv.CreateOrUpdateOwnershipIdentifier == nil { + return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdateOwnershipIdentifier not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DomainRegistration/domains/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/domainOwnershipIdentifiers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.DomainOwnershipIdentifier](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + domainNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("domainName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := d.srv.CreateOrUpdateOwnershipIdentifier(req.Context(), resourceGroupNameParam, domainNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).DomainOwnershipIdentifier, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (d *DomainsServerTransport) dispatchDelete(req *http.Request) (*http.Response, error) { + if d.srv.Delete == nil { + return nil, &nonRetriableError{errors.New("fake for method Delete not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DomainRegistration/domains/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + domainNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("domainName")]) + if err != nil { + return nil, err + } + forceHardDeleteDomainUnescaped, err := url.QueryUnescape(qp.Get("forceHardDeleteDomain")) + if err != nil { + return nil, err + } + forceHardDeleteDomainParam, err := parseOptional(forceHardDeleteDomainUnescaped, strconv.ParseBool) + if err != nil { + return nil, err + } + var options *armappservice.DomainsClientDeleteOptions + if forceHardDeleteDomainParam != nil { + options = &armappservice.DomainsClientDeleteOptions{ + ForceHardDeleteDomain: forceHardDeleteDomainParam, + } + } + respr, errRespr := d.srv.Delete(req.Context(), resourceGroupNameParam, domainNameParam, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (d *DomainsServerTransport) dispatchDeleteOwnershipIdentifier(req *http.Request) (*http.Response, error) { + if d.srv.DeleteOwnershipIdentifier == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteOwnershipIdentifier not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DomainRegistration/domains/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/domainOwnershipIdentifiers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + domainNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("domainName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := d.srv.DeleteOwnershipIdentifier(req.Context(), resourceGroupNameParam, domainNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (d *DomainsServerTransport) dispatchGet(req *http.Request) (*http.Response, error) { + if d.srv.Get == nil { + return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DomainRegistration/domains/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + domainNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("domainName")]) + if err != nil { + return nil, err + } + respr, errRespr := d.srv.Get(req.Context(), resourceGroupNameParam, domainNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).Domain, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (d *DomainsServerTransport) dispatchGetControlCenterSsoRequest(req *http.Request) (*http.Response, error) { + if d.srv.GetControlCenterSsoRequest == nil { + return nil, &nonRetriableError{errors.New("fake for method GetControlCenterSsoRequest not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DomainRegistration/generateSsoRequest` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 1 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + respr, errRespr := d.srv.GetControlCenterSsoRequest(req.Context(), nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).DomainControlCenterSsoRequest, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (d *DomainsServerTransport) dispatchGetOwnershipIdentifier(req *http.Request) (*http.Response, error) { + if d.srv.GetOwnershipIdentifier == nil { + return nil, &nonRetriableError{errors.New("fake for method GetOwnershipIdentifier not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DomainRegistration/domains/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/domainOwnershipIdentifiers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + domainNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("domainName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := d.srv.GetOwnershipIdentifier(req.Context(), resourceGroupNameParam, domainNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).DomainOwnershipIdentifier, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (d *DomainsServerTransport) dispatchNewListPager(req *http.Request) (*http.Response, error) { + if d.srv.NewListPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} + } + newListPager := d.newListPager.get(req) + if newListPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DomainRegistration/domains` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 1 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resp := d.srv.NewListPager(nil) + newListPager = &resp + d.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armappservice.DomainsClientListResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + d.newListPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListPager) { + d.newListPager.remove(req) + } + return resp, nil +} + +func (d *DomainsServerTransport) dispatchNewListByResourceGroupPager(req *http.Request) (*http.Response, error) { + if d.srv.NewListByResourceGroupPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListByResourceGroupPager not implemented")} + } + newListByResourceGroupPager := d.newListByResourceGroupPager.get(req) + if newListByResourceGroupPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DomainRegistration/domains` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 2 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + resp := d.srv.NewListByResourceGroupPager(resourceGroupNameParam, nil) + newListByResourceGroupPager = &resp + d.newListByResourceGroupPager.add(req, newListByResourceGroupPager) + server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armappservice.DomainsClientListByResourceGroupResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListByResourceGroupPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + d.newListByResourceGroupPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListByResourceGroupPager) { + d.newListByResourceGroupPager.remove(req) + } + return resp, nil +} + +func (d *DomainsServerTransport) dispatchNewListOwnershipIdentifiersPager(req *http.Request) (*http.Response, error) { + if d.srv.NewListOwnershipIdentifiersPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListOwnershipIdentifiersPager not implemented")} + } + newListOwnershipIdentifiersPager := d.newListOwnershipIdentifiersPager.get(req) + if newListOwnershipIdentifiersPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DomainRegistration/domains/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/domainOwnershipIdentifiers` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + domainNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("domainName")]) + if err != nil { + return nil, err + } + resp := d.srv.NewListOwnershipIdentifiersPager(resourceGroupNameParam, domainNameParam, nil) + newListOwnershipIdentifiersPager = &resp + d.newListOwnershipIdentifiersPager.add(req, newListOwnershipIdentifiersPager) + server.PagerResponderInjectNextLinks(newListOwnershipIdentifiersPager, req, func(page *armappservice.DomainsClientListOwnershipIdentifiersResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListOwnershipIdentifiersPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + d.newListOwnershipIdentifiersPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListOwnershipIdentifiersPager) { + d.newListOwnershipIdentifiersPager.remove(req) + } + return resp, nil +} + +func (d *DomainsServerTransport) dispatchNewListRecommendationsPager(req *http.Request) (*http.Response, error) { + if d.srv.NewListRecommendationsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListRecommendationsPager not implemented")} + } + newListRecommendationsPager := d.newListRecommendationsPager.get(req) + if newListRecommendationsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DomainRegistration/listDomainRecommendations` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 1 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.DomainRecommendationSearchParameters](req) + if err != nil { + return nil, err + } + resp := d.srv.NewListRecommendationsPager(body, nil) + newListRecommendationsPager = &resp + d.newListRecommendationsPager.add(req, newListRecommendationsPager) + server.PagerResponderInjectNextLinks(newListRecommendationsPager, req, func(page *armappservice.DomainsClientListRecommendationsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListRecommendationsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + d.newListRecommendationsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListRecommendationsPager) { + d.newListRecommendationsPager.remove(req) + } + return resp, nil +} + +func (d *DomainsServerTransport) dispatchRenew(req *http.Request) (*http.Response, error) { + if d.srv.Renew == nil { + return nil, &nonRetriableError{errors.New("fake for method Renew not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DomainRegistration/domains/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/renew` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + domainNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("domainName")]) + if err != nil { + return nil, err + } + respr, errRespr := d.srv.Renew(req.Context(), resourceGroupNameParam, domainNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (d *DomainsServerTransport) dispatchTransferOut(req *http.Request) (*http.Response, error) { + if d.srv.TransferOut == nil { + return nil, &nonRetriableError{errors.New("fake for method TransferOut not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DomainRegistration/domains/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/transferOut` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + domainNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("domainName")]) + if err != nil { + return nil, err + } + respr, errRespr := d.srv.TransferOut(req.Context(), resourceGroupNameParam, domainNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).Domain, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (d *DomainsServerTransport) dispatchUpdate(req *http.Request) (*http.Response, error) { + if d.srv.Update == nil { + return nil, &nonRetriableError{errors.New("fake for method Update not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DomainRegistration/domains/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.DomainPatchResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + domainNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("domainName")]) + if err != nil { + return nil, err + } + respr, errRespr := d.srv.Update(req.Context(), resourceGroupNameParam, domainNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusAccepted}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).Domain, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (d *DomainsServerTransport) dispatchUpdateOwnershipIdentifier(req *http.Request) (*http.Response, error) { + if d.srv.UpdateOwnershipIdentifier == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateOwnershipIdentifier not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DomainRegistration/domains/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/domainOwnershipIdentifiers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.DomainOwnershipIdentifier](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + domainNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("domainName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := d.srv.UpdateOwnershipIdentifier(req.Context(), resourceGroupNameParam, domainNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).DomainOwnershipIdentifier, req) + if err != nil { + return nil, err + } + return resp, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/fake/environments_server.go b/sdk/resourcemanager/appservice/armappservice/fake/environments_server.go new file mode 100644 index 000000000000..62f292a1a52b --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/fake/environments_server.go @@ -0,0 +1,2376 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "context" + "errors" + "fmt" + azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" + "net/http" + "net/url" + "regexp" + "strconv" +) + +// EnvironmentsServer is a fake server for instances of the armappservice.EnvironmentsClient type. +type EnvironmentsServer struct { + // BeginApproveOrRejectPrivateEndpointConnection is the fake for method EnvironmentsClient.BeginApproveOrRejectPrivateEndpointConnection + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginApproveOrRejectPrivateEndpointConnection func(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper armappservice.PrivateLinkConnectionApprovalRequestResource, options *armappservice.EnvironmentsClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (resp azfake.PollerResponder[armappservice.EnvironmentsClientApproveOrRejectPrivateEndpointConnectionResponse], errResp azfake.ErrorResponder) + + // BeginChangeVnet is the fake for method EnvironmentsClient.BeginChangeVnet + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginChangeVnet func(ctx context.Context, resourceGroupName string, name string, vnetInfo armappservice.VirtualNetworkProfile, options *armappservice.EnvironmentsClientBeginChangeVnetOptions) (resp azfake.PollerResponder[azfake.PagerResponder[armappservice.EnvironmentsClientChangeVnetResponse]], errResp azfake.ErrorResponder) + + // BeginCreateOrUpdate is the fake for method EnvironmentsClient.BeginCreateOrUpdate + // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated, http.StatusAccepted + BeginCreateOrUpdate func(ctx context.Context, resourceGroupName string, name string, hostingEnvironmentEnvelope armappservice.EnvironmentResource, options *armappservice.EnvironmentsClientBeginCreateOrUpdateOptions) (resp azfake.PollerResponder[armappservice.EnvironmentsClientCreateOrUpdateResponse], errResp azfake.ErrorResponder) + + // BeginCreateOrUpdateMultiRolePool is the fake for method EnvironmentsClient.BeginCreateOrUpdateMultiRolePool + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginCreateOrUpdateMultiRolePool func(ctx context.Context, resourceGroupName string, name string, multiRolePoolEnvelope armappservice.WorkerPoolResource, options *armappservice.EnvironmentsClientBeginCreateOrUpdateMultiRolePoolOptions) (resp azfake.PollerResponder[armappservice.EnvironmentsClientCreateOrUpdateMultiRolePoolResponse], errResp azfake.ErrorResponder) + + // BeginCreateOrUpdateWorkerPool is the fake for method EnvironmentsClient.BeginCreateOrUpdateWorkerPool + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginCreateOrUpdateWorkerPool func(ctx context.Context, resourceGroupName string, name string, workerPoolName string, workerPoolEnvelope armappservice.WorkerPoolResource, options *armappservice.EnvironmentsClientBeginCreateOrUpdateWorkerPoolOptions) (resp azfake.PollerResponder[armappservice.EnvironmentsClientCreateOrUpdateWorkerPoolResponse], errResp azfake.ErrorResponder) + + // BeginDelete is the fake for method EnvironmentsClient.BeginDelete + // HTTP status codes to indicate success: http.StatusAccepted, http.StatusNoContent + BeginDelete func(ctx context.Context, resourceGroupName string, name string, options *armappservice.EnvironmentsClientBeginDeleteOptions) (resp azfake.PollerResponder[armappservice.EnvironmentsClientDeleteResponse], errResp azfake.ErrorResponder) + + // DeleteAseCustomDNSSuffixConfiguration is the fake for method EnvironmentsClient.DeleteAseCustomDNSSuffixConfiguration + // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent + DeleteAseCustomDNSSuffixConfiguration func(ctx context.Context, resourceGroupName string, name string, options *armappservice.EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationOptions) (resp azfake.Responder[armappservice.EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationResponse], errResp azfake.ErrorResponder) + + // BeginDeletePrivateEndpointConnection is the fake for method EnvironmentsClient.BeginDeletePrivateEndpointConnection + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent + BeginDeletePrivateEndpointConnection func(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *armappservice.EnvironmentsClientBeginDeletePrivateEndpointConnectionOptions) (resp azfake.PollerResponder[armappservice.EnvironmentsClientDeletePrivateEndpointConnectionResponse], errResp azfake.ErrorResponder) + + // Get is the fake for method EnvironmentsClient.Get + // HTTP status codes to indicate success: http.StatusOK + Get func(ctx context.Context, resourceGroupName string, name string, options *armappservice.EnvironmentsClientGetOptions) (resp azfake.Responder[armappservice.EnvironmentsClientGetResponse], errResp azfake.ErrorResponder) + + // GetAseCustomDNSSuffixConfiguration is the fake for method EnvironmentsClient.GetAseCustomDNSSuffixConfiguration + // HTTP status codes to indicate success: http.StatusOK + GetAseCustomDNSSuffixConfiguration func(ctx context.Context, resourceGroupName string, name string, options *armappservice.EnvironmentsClientGetAseCustomDNSSuffixConfigurationOptions) (resp azfake.Responder[armappservice.EnvironmentsClientGetAseCustomDNSSuffixConfigurationResponse], errResp azfake.ErrorResponder) + + // GetAseV3NetworkingConfiguration is the fake for method EnvironmentsClient.GetAseV3NetworkingConfiguration + // HTTP status codes to indicate success: http.StatusOK + GetAseV3NetworkingConfiguration func(ctx context.Context, resourceGroupName string, name string, options *armappservice.EnvironmentsClientGetAseV3NetworkingConfigurationOptions) (resp azfake.Responder[armappservice.EnvironmentsClientGetAseV3NetworkingConfigurationResponse], errResp azfake.ErrorResponder) + + // GetDiagnosticsItem is the fake for method EnvironmentsClient.GetDiagnosticsItem + // HTTP status codes to indicate success: http.StatusOK + GetDiagnosticsItem func(ctx context.Context, resourceGroupName string, name string, diagnosticsName string, options *armappservice.EnvironmentsClientGetDiagnosticsItemOptions) (resp azfake.Responder[armappservice.EnvironmentsClientGetDiagnosticsItemResponse], errResp azfake.ErrorResponder) + + // NewGetInboundNetworkDependenciesEndpointsPager is the fake for method EnvironmentsClient.NewGetInboundNetworkDependenciesEndpointsPager + // HTTP status codes to indicate success: http.StatusOK + NewGetInboundNetworkDependenciesEndpointsPager func(resourceGroupName string, name string, options *armappservice.EnvironmentsClientGetInboundNetworkDependenciesEndpointsOptions) (resp azfake.PagerResponder[armappservice.EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse]) + + // GetMultiRolePool is the fake for method EnvironmentsClient.GetMultiRolePool + // HTTP status codes to indicate success: http.StatusOK + GetMultiRolePool func(ctx context.Context, resourceGroupName string, name string, options *armappservice.EnvironmentsClientGetMultiRolePoolOptions) (resp azfake.Responder[armappservice.EnvironmentsClientGetMultiRolePoolResponse], errResp azfake.ErrorResponder) + + // NewGetOutboundNetworkDependenciesEndpointsPager is the fake for method EnvironmentsClient.NewGetOutboundNetworkDependenciesEndpointsPager + // HTTP status codes to indicate success: http.StatusOK + NewGetOutboundNetworkDependenciesEndpointsPager func(resourceGroupName string, name string, options *armappservice.EnvironmentsClientGetOutboundNetworkDependenciesEndpointsOptions) (resp azfake.PagerResponder[armappservice.EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse]) + + // GetPrivateEndpointConnection is the fake for method EnvironmentsClient.GetPrivateEndpointConnection + // HTTP status codes to indicate success: http.StatusOK + GetPrivateEndpointConnection func(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *armappservice.EnvironmentsClientGetPrivateEndpointConnectionOptions) (resp azfake.Responder[armappservice.EnvironmentsClientGetPrivateEndpointConnectionResponse], errResp azfake.ErrorResponder) + + // NewGetPrivateEndpointConnectionListPager is the fake for method EnvironmentsClient.NewGetPrivateEndpointConnectionListPager + // HTTP status codes to indicate success: http.StatusOK + NewGetPrivateEndpointConnectionListPager func(resourceGroupName string, name string, options *armappservice.EnvironmentsClientGetPrivateEndpointConnectionListOptions) (resp azfake.PagerResponder[armappservice.EnvironmentsClientGetPrivateEndpointConnectionListResponse]) + + // GetPrivateLinkResources is the fake for method EnvironmentsClient.GetPrivateLinkResources + // HTTP status codes to indicate success: http.StatusOK + GetPrivateLinkResources func(ctx context.Context, resourceGroupName string, name string, options *armappservice.EnvironmentsClientGetPrivateLinkResourcesOptions) (resp azfake.Responder[armappservice.EnvironmentsClientGetPrivateLinkResourcesResponse], errResp azfake.ErrorResponder) + + // GetVipInfo is the fake for method EnvironmentsClient.GetVipInfo + // HTTP status codes to indicate success: http.StatusOK + GetVipInfo func(ctx context.Context, resourceGroupName string, name string, options *armappservice.EnvironmentsClientGetVipInfoOptions) (resp azfake.Responder[armappservice.EnvironmentsClientGetVipInfoResponse], errResp azfake.ErrorResponder) + + // GetWorkerPool is the fake for method EnvironmentsClient.GetWorkerPool + // HTTP status codes to indicate success: http.StatusOK + GetWorkerPool func(ctx context.Context, resourceGroupName string, name string, workerPoolName string, options *armappservice.EnvironmentsClientGetWorkerPoolOptions) (resp azfake.Responder[armappservice.EnvironmentsClientGetWorkerPoolResponse], errResp azfake.ErrorResponder) + + // NewListPager is the fake for method EnvironmentsClient.NewListPager + // HTTP status codes to indicate success: http.StatusOK + NewListPager func(options *armappservice.EnvironmentsClientListOptions) (resp azfake.PagerResponder[armappservice.EnvironmentsClientListResponse]) + + // NewListAppServicePlansPager is the fake for method EnvironmentsClient.NewListAppServicePlansPager + // HTTP status codes to indicate success: http.StatusOK + NewListAppServicePlansPager func(resourceGroupName string, name string, options *armappservice.EnvironmentsClientListAppServicePlansOptions) (resp azfake.PagerResponder[armappservice.EnvironmentsClientListAppServicePlansResponse]) + + // NewListByResourceGroupPager is the fake for method EnvironmentsClient.NewListByResourceGroupPager + // HTTP status codes to indicate success: http.StatusOK + NewListByResourceGroupPager func(resourceGroupName string, options *armappservice.EnvironmentsClientListByResourceGroupOptions) (resp azfake.PagerResponder[armappservice.EnvironmentsClientListByResourceGroupResponse]) + + // NewListCapacitiesPager is the fake for method EnvironmentsClient.NewListCapacitiesPager + // HTTP status codes to indicate success: http.StatusOK + NewListCapacitiesPager func(resourceGroupName string, name string, options *armappservice.EnvironmentsClientListCapacitiesOptions) (resp azfake.PagerResponder[armappservice.EnvironmentsClientListCapacitiesResponse]) + + // ListDiagnostics is the fake for method EnvironmentsClient.ListDiagnostics + // HTTP status codes to indicate success: http.StatusOK + ListDiagnostics func(ctx context.Context, resourceGroupName string, name string, options *armappservice.EnvironmentsClientListDiagnosticsOptions) (resp azfake.Responder[armappservice.EnvironmentsClientListDiagnosticsResponse], errResp azfake.ErrorResponder) + + // NewListMultiRoleMetricDefinitionsPager is the fake for method EnvironmentsClient.NewListMultiRoleMetricDefinitionsPager + // HTTP status codes to indicate success: http.StatusOK + NewListMultiRoleMetricDefinitionsPager func(resourceGroupName string, name string, options *armappservice.EnvironmentsClientListMultiRoleMetricDefinitionsOptions) (resp azfake.PagerResponder[armappservice.EnvironmentsClientListMultiRoleMetricDefinitionsResponse]) + + // NewListMultiRolePoolInstanceMetricDefinitionsPager is the fake for method EnvironmentsClient.NewListMultiRolePoolInstanceMetricDefinitionsPager + // HTTP status codes to indicate success: http.StatusOK + NewListMultiRolePoolInstanceMetricDefinitionsPager func(resourceGroupName string, name string, instance string, options *armappservice.EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsOptions) (resp azfake.PagerResponder[armappservice.EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse]) + + // NewListMultiRolePoolSKUsPager is the fake for method EnvironmentsClient.NewListMultiRolePoolSKUsPager + // HTTP status codes to indicate success: http.StatusOK + NewListMultiRolePoolSKUsPager func(resourceGroupName string, name string, options *armappservice.EnvironmentsClientListMultiRolePoolSKUsOptions) (resp azfake.PagerResponder[armappservice.EnvironmentsClientListMultiRolePoolSKUsResponse]) + + // NewListMultiRolePoolsPager is the fake for method EnvironmentsClient.NewListMultiRolePoolsPager + // HTTP status codes to indicate success: http.StatusOK + NewListMultiRolePoolsPager func(resourceGroupName string, name string, options *armappservice.EnvironmentsClientListMultiRolePoolsOptions) (resp azfake.PagerResponder[armappservice.EnvironmentsClientListMultiRolePoolsResponse]) + + // NewListMultiRoleUsagesPager is the fake for method EnvironmentsClient.NewListMultiRoleUsagesPager + // HTTP status codes to indicate success: http.StatusOK + NewListMultiRoleUsagesPager func(resourceGroupName string, name string, options *armappservice.EnvironmentsClientListMultiRoleUsagesOptions) (resp azfake.PagerResponder[armappservice.EnvironmentsClientListMultiRoleUsagesResponse]) + + // ListOperations is the fake for method EnvironmentsClient.ListOperations + // HTTP status codes to indicate success: http.StatusOK + ListOperations func(ctx context.Context, resourceGroupName string, name string, options *armappservice.EnvironmentsClientListOperationsOptions) (resp azfake.Responder[armappservice.EnvironmentsClientListOperationsResponse], errResp azfake.ErrorResponder) + + // NewListUsagesPager is the fake for method EnvironmentsClient.NewListUsagesPager + // HTTP status codes to indicate success: http.StatusOK + NewListUsagesPager func(resourceGroupName string, name string, options *armappservice.EnvironmentsClientListUsagesOptions) (resp azfake.PagerResponder[armappservice.EnvironmentsClientListUsagesResponse]) + + // NewListWebAppsPager is the fake for method EnvironmentsClient.NewListWebAppsPager + // HTTP status codes to indicate success: http.StatusOK + NewListWebAppsPager func(resourceGroupName string, name string, options *armappservice.EnvironmentsClientListWebAppsOptions) (resp azfake.PagerResponder[armappservice.EnvironmentsClientListWebAppsResponse]) + + // NewListWebWorkerMetricDefinitionsPager is the fake for method EnvironmentsClient.NewListWebWorkerMetricDefinitionsPager + // HTTP status codes to indicate success: http.StatusOK + NewListWebWorkerMetricDefinitionsPager func(resourceGroupName string, name string, workerPoolName string, options *armappservice.EnvironmentsClientListWebWorkerMetricDefinitionsOptions) (resp azfake.PagerResponder[armappservice.EnvironmentsClientListWebWorkerMetricDefinitionsResponse]) + + // NewListWebWorkerUsagesPager is the fake for method EnvironmentsClient.NewListWebWorkerUsagesPager + // HTTP status codes to indicate success: http.StatusOK + NewListWebWorkerUsagesPager func(resourceGroupName string, name string, workerPoolName string, options *armappservice.EnvironmentsClientListWebWorkerUsagesOptions) (resp azfake.PagerResponder[armappservice.EnvironmentsClientListWebWorkerUsagesResponse]) + + // NewListWorkerPoolInstanceMetricDefinitionsPager is the fake for method EnvironmentsClient.NewListWorkerPoolInstanceMetricDefinitionsPager + // HTTP status codes to indicate success: http.StatusOK + NewListWorkerPoolInstanceMetricDefinitionsPager func(resourceGroupName string, name string, workerPoolName string, instance string, options *armappservice.EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsOptions) (resp azfake.PagerResponder[armappservice.EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse]) + + // NewListWorkerPoolSKUsPager is the fake for method EnvironmentsClient.NewListWorkerPoolSKUsPager + // HTTP status codes to indicate success: http.StatusOK + NewListWorkerPoolSKUsPager func(resourceGroupName string, name string, workerPoolName string, options *armappservice.EnvironmentsClientListWorkerPoolSKUsOptions) (resp azfake.PagerResponder[armappservice.EnvironmentsClientListWorkerPoolSKUsResponse]) + + // NewListWorkerPoolsPager is the fake for method EnvironmentsClient.NewListWorkerPoolsPager + // HTTP status codes to indicate success: http.StatusOK + NewListWorkerPoolsPager func(resourceGroupName string, name string, options *armappservice.EnvironmentsClientListWorkerPoolsOptions) (resp azfake.PagerResponder[armappservice.EnvironmentsClientListWorkerPoolsResponse]) + + // Reboot is the fake for method EnvironmentsClient.Reboot + // HTTP status codes to indicate success: http.StatusAccepted + Reboot func(ctx context.Context, resourceGroupName string, name string, options *armappservice.EnvironmentsClientRebootOptions) (resp azfake.Responder[armappservice.EnvironmentsClientRebootResponse], errResp azfake.ErrorResponder) + + // BeginResume is the fake for method EnvironmentsClient.BeginResume + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginResume func(ctx context.Context, resourceGroupName string, name string, options *armappservice.EnvironmentsClientBeginResumeOptions) (resp azfake.PollerResponder[azfake.PagerResponder[armappservice.EnvironmentsClientResumeResponse]], errResp azfake.ErrorResponder) + + // BeginSuspend is the fake for method EnvironmentsClient.BeginSuspend + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginSuspend func(ctx context.Context, resourceGroupName string, name string, options *armappservice.EnvironmentsClientBeginSuspendOptions) (resp azfake.PollerResponder[azfake.PagerResponder[armappservice.EnvironmentsClientSuspendResponse]], errResp azfake.ErrorResponder) + + // TestUpgradeAvailableNotification is the fake for method EnvironmentsClient.TestUpgradeAvailableNotification + // HTTP status codes to indicate success: http.StatusOK + TestUpgradeAvailableNotification func(ctx context.Context, resourceGroupName string, name string, options *armappservice.EnvironmentsClientTestUpgradeAvailableNotificationOptions) (resp azfake.Responder[armappservice.EnvironmentsClientTestUpgradeAvailableNotificationResponse], errResp azfake.ErrorResponder) + + // Update is the fake for method EnvironmentsClient.Update + // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated, http.StatusAccepted + Update func(ctx context.Context, resourceGroupName string, name string, hostingEnvironmentEnvelope armappservice.EnvironmentPatchResource, options *armappservice.EnvironmentsClientUpdateOptions) (resp azfake.Responder[armappservice.EnvironmentsClientUpdateResponse], errResp azfake.ErrorResponder) + + // UpdateAseCustomDNSSuffixConfiguration is the fake for method EnvironmentsClient.UpdateAseCustomDNSSuffixConfiguration + // HTTP status codes to indicate success: http.StatusOK + UpdateAseCustomDNSSuffixConfiguration func(ctx context.Context, resourceGroupName string, name string, customDNSSuffixConfiguration armappservice.CustomDNSSuffixConfiguration, options *armappservice.EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationOptions) (resp azfake.Responder[armappservice.EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationResponse], errResp azfake.ErrorResponder) + + // UpdateAseNetworkingConfiguration is the fake for method EnvironmentsClient.UpdateAseNetworkingConfiguration + // HTTP status codes to indicate success: http.StatusOK + UpdateAseNetworkingConfiguration func(ctx context.Context, resourceGroupName string, name string, aseNetworkingConfiguration armappservice.AseV3NetworkingConfiguration, options *armappservice.EnvironmentsClientUpdateAseNetworkingConfigurationOptions) (resp azfake.Responder[armappservice.EnvironmentsClientUpdateAseNetworkingConfigurationResponse], errResp azfake.ErrorResponder) + + // UpdateMultiRolePool is the fake for method EnvironmentsClient.UpdateMultiRolePool + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + UpdateMultiRolePool func(ctx context.Context, resourceGroupName string, name string, multiRolePoolEnvelope armappservice.WorkerPoolResource, options *armappservice.EnvironmentsClientUpdateMultiRolePoolOptions) (resp azfake.Responder[armappservice.EnvironmentsClientUpdateMultiRolePoolResponse], errResp azfake.ErrorResponder) + + // UpdateWorkerPool is the fake for method EnvironmentsClient.UpdateWorkerPool + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + UpdateWorkerPool func(ctx context.Context, resourceGroupName string, name string, workerPoolName string, workerPoolEnvelope armappservice.WorkerPoolResource, options *armappservice.EnvironmentsClientUpdateWorkerPoolOptions) (resp azfake.Responder[armappservice.EnvironmentsClientUpdateWorkerPoolResponse], errResp azfake.ErrorResponder) + + // BeginUpgrade is the fake for method EnvironmentsClient.BeginUpgrade + // HTTP status codes to indicate success: http.StatusAccepted + BeginUpgrade func(ctx context.Context, resourceGroupName string, name string, options *armappservice.EnvironmentsClientBeginUpgradeOptions) (resp azfake.PollerResponder[armappservice.EnvironmentsClientUpgradeResponse], errResp azfake.ErrorResponder) +} + +// NewEnvironmentsServerTransport creates a new instance of EnvironmentsServerTransport with the provided implementation. +// The returned EnvironmentsServerTransport instance is connected to an instance of armappservice.EnvironmentsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewEnvironmentsServerTransport(srv *EnvironmentsServer) *EnvironmentsServerTransport { + return &EnvironmentsServerTransport{ + srv: srv, + beginApproveOrRejectPrivateEndpointConnection: newTracker[azfake.PollerResponder[armappservice.EnvironmentsClientApproveOrRejectPrivateEndpointConnectionResponse]](), + beginChangeVnet: newTracker[azfake.PollerResponder[azfake.PagerResponder[armappservice.EnvironmentsClientChangeVnetResponse]]](), + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armappservice.EnvironmentsClientCreateOrUpdateResponse]](), + beginCreateOrUpdateMultiRolePool: newTracker[azfake.PollerResponder[armappservice.EnvironmentsClientCreateOrUpdateMultiRolePoolResponse]](), + beginCreateOrUpdateWorkerPool: newTracker[azfake.PollerResponder[armappservice.EnvironmentsClientCreateOrUpdateWorkerPoolResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armappservice.EnvironmentsClientDeleteResponse]](), + beginDeletePrivateEndpointConnection: newTracker[azfake.PollerResponder[armappservice.EnvironmentsClientDeletePrivateEndpointConnectionResponse]](), + newGetInboundNetworkDependenciesEndpointsPager: newTracker[azfake.PagerResponder[armappservice.EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse]](), + newGetOutboundNetworkDependenciesEndpointsPager: newTracker[azfake.PagerResponder[armappservice.EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse]](), + newGetPrivateEndpointConnectionListPager: newTracker[azfake.PagerResponder[armappservice.EnvironmentsClientGetPrivateEndpointConnectionListResponse]](), + newListPager: newTracker[azfake.PagerResponder[armappservice.EnvironmentsClientListResponse]](), + newListAppServicePlansPager: newTracker[azfake.PagerResponder[armappservice.EnvironmentsClientListAppServicePlansResponse]](), + newListByResourceGroupPager: newTracker[azfake.PagerResponder[armappservice.EnvironmentsClientListByResourceGroupResponse]](), + newListCapacitiesPager: newTracker[azfake.PagerResponder[armappservice.EnvironmentsClientListCapacitiesResponse]](), + newListMultiRoleMetricDefinitionsPager: newTracker[azfake.PagerResponder[armappservice.EnvironmentsClientListMultiRoleMetricDefinitionsResponse]](), + newListMultiRolePoolInstanceMetricDefinitionsPager: newTracker[azfake.PagerResponder[armappservice.EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse]](), + newListMultiRolePoolSKUsPager: newTracker[azfake.PagerResponder[armappservice.EnvironmentsClientListMultiRolePoolSKUsResponse]](), + newListMultiRolePoolsPager: newTracker[azfake.PagerResponder[armappservice.EnvironmentsClientListMultiRolePoolsResponse]](), + newListMultiRoleUsagesPager: newTracker[azfake.PagerResponder[armappservice.EnvironmentsClientListMultiRoleUsagesResponse]](), + newListUsagesPager: newTracker[azfake.PagerResponder[armappservice.EnvironmentsClientListUsagesResponse]](), + newListWebAppsPager: newTracker[azfake.PagerResponder[armappservice.EnvironmentsClientListWebAppsResponse]](), + newListWebWorkerMetricDefinitionsPager: newTracker[azfake.PagerResponder[armappservice.EnvironmentsClientListWebWorkerMetricDefinitionsResponse]](), + newListWebWorkerUsagesPager: newTracker[azfake.PagerResponder[armappservice.EnvironmentsClientListWebWorkerUsagesResponse]](), + newListWorkerPoolInstanceMetricDefinitionsPager: newTracker[azfake.PagerResponder[armappservice.EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse]](), + newListWorkerPoolSKUsPager: newTracker[azfake.PagerResponder[armappservice.EnvironmentsClientListWorkerPoolSKUsResponse]](), + newListWorkerPoolsPager: newTracker[azfake.PagerResponder[armappservice.EnvironmentsClientListWorkerPoolsResponse]](), + beginResume: newTracker[azfake.PollerResponder[azfake.PagerResponder[armappservice.EnvironmentsClientResumeResponse]]](), + beginSuspend: newTracker[azfake.PollerResponder[azfake.PagerResponder[armappservice.EnvironmentsClientSuspendResponse]]](), + beginUpgrade: newTracker[azfake.PollerResponder[armappservice.EnvironmentsClientUpgradeResponse]](), + } +} + +// EnvironmentsServerTransport connects instances of armappservice.EnvironmentsClient to instances of EnvironmentsServer. +// Don't use this type directly, use NewEnvironmentsServerTransport instead. +type EnvironmentsServerTransport struct { + srv *EnvironmentsServer + beginApproveOrRejectPrivateEndpointConnection *tracker[azfake.PollerResponder[armappservice.EnvironmentsClientApproveOrRejectPrivateEndpointConnectionResponse]] + beginChangeVnet *tracker[azfake.PollerResponder[azfake.PagerResponder[armappservice.EnvironmentsClientChangeVnetResponse]]] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armappservice.EnvironmentsClientCreateOrUpdateResponse]] + beginCreateOrUpdateMultiRolePool *tracker[azfake.PollerResponder[armappservice.EnvironmentsClientCreateOrUpdateMultiRolePoolResponse]] + beginCreateOrUpdateWorkerPool *tracker[azfake.PollerResponder[armappservice.EnvironmentsClientCreateOrUpdateWorkerPoolResponse]] + beginDelete *tracker[azfake.PollerResponder[armappservice.EnvironmentsClientDeleteResponse]] + beginDeletePrivateEndpointConnection *tracker[azfake.PollerResponder[armappservice.EnvironmentsClientDeletePrivateEndpointConnectionResponse]] + newGetInboundNetworkDependenciesEndpointsPager *tracker[azfake.PagerResponder[armappservice.EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse]] + newGetOutboundNetworkDependenciesEndpointsPager *tracker[azfake.PagerResponder[armappservice.EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse]] + newGetPrivateEndpointConnectionListPager *tracker[azfake.PagerResponder[armappservice.EnvironmentsClientGetPrivateEndpointConnectionListResponse]] + newListPager *tracker[azfake.PagerResponder[armappservice.EnvironmentsClientListResponse]] + newListAppServicePlansPager *tracker[azfake.PagerResponder[armappservice.EnvironmentsClientListAppServicePlansResponse]] + newListByResourceGroupPager *tracker[azfake.PagerResponder[armappservice.EnvironmentsClientListByResourceGroupResponse]] + newListCapacitiesPager *tracker[azfake.PagerResponder[armappservice.EnvironmentsClientListCapacitiesResponse]] + newListMultiRoleMetricDefinitionsPager *tracker[azfake.PagerResponder[armappservice.EnvironmentsClientListMultiRoleMetricDefinitionsResponse]] + newListMultiRolePoolInstanceMetricDefinitionsPager *tracker[azfake.PagerResponder[armappservice.EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse]] + newListMultiRolePoolSKUsPager *tracker[azfake.PagerResponder[armappservice.EnvironmentsClientListMultiRolePoolSKUsResponse]] + newListMultiRolePoolsPager *tracker[azfake.PagerResponder[armappservice.EnvironmentsClientListMultiRolePoolsResponse]] + newListMultiRoleUsagesPager *tracker[azfake.PagerResponder[armappservice.EnvironmentsClientListMultiRoleUsagesResponse]] + newListUsagesPager *tracker[azfake.PagerResponder[armappservice.EnvironmentsClientListUsagesResponse]] + newListWebAppsPager *tracker[azfake.PagerResponder[armappservice.EnvironmentsClientListWebAppsResponse]] + newListWebWorkerMetricDefinitionsPager *tracker[azfake.PagerResponder[armappservice.EnvironmentsClientListWebWorkerMetricDefinitionsResponse]] + newListWebWorkerUsagesPager *tracker[azfake.PagerResponder[armappservice.EnvironmentsClientListWebWorkerUsagesResponse]] + newListWorkerPoolInstanceMetricDefinitionsPager *tracker[azfake.PagerResponder[armappservice.EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse]] + newListWorkerPoolSKUsPager *tracker[azfake.PagerResponder[armappservice.EnvironmentsClientListWorkerPoolSKUsResponse]] + newListWorkerPoolsPager *tracker[azfake.PagerResponder[armappservice.EnvironmentsClientListWorkerPoolsResponse]] + beginResume *tracker[azfake.PollerResponder[azfake.PagerResponder[armappservice.EnvironmentsClientResumeResponse]]] + beginSuspend *tracker[azfake.PollerResponder[azfake.PagerResponder[armappservice.EnvironmentsClientSuspendResponse]]] + beginUpgrade *tracker[azfake.PollerResponder[armappservice.EnvironmentsClientUpgradeResponse]] +} + +// Do implements the policy.Transporter interface for EnvironmentsServerTransport. +func (e *EnvironmentsServerTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + var resp *http.Response + var err error + + switch method { + case "EnvironmentsClient.BeginApproveOrRejectPrivateEndpointConnection": + resp, err = e.dispatchBeginApproveOrRejectPrivateEndpointConnection(req) + case "EnvironmentsClient.BeginChangeVnet": + resp, err = e.dispatchBeginChangeVnet(req) + case "EnvironmentsClient.BeginCreateOrUpdate": + resp, err = e.dispatchBeginCreateOrUpdate(req) + case "EnvironmentsClient.BeginCreateOrUpdateMultiRolePool": + resp, err = e.dispatchBeginCreateOrUpdateMultiRolePool(req) + case "EnvironmentsClient.BeginCreateOrUpdateWorkerPool": + resp, err = e.dispatchBeginCreateOrUpdateWorkerPool(req) + case "EnvironmentsClient.BeginDelete": + resp, err = e.dispatchBeginDelete(req) + case "EnvironmentsClient.DeleteAseCustomDNSSuffixConfiguration": + resp, err = e.dispatchDeleteAseCustomDNSSuffixConfiguration(req) + case "EnvironmentsClient.BeginDeletePrivateEndpointConnection": + resp, err = e.dispatchBeginDeletePrivateEndpointConnection(req) + case "EnvironmentsClient.Get": + resp, err = e.dispatchGet(req) + case "EnvironmentsClient.GetAseCustomDNSSuffixConfiguration": + resp, err = e.dispatchGetAseCustomDNSSuffixConfiguration(req) + case "EnvironmentsClient.GetAseV3NetworkingConfiguration": + resp, err = e.dispatchGetAseV3NetworkingConfiguration(req) + case "EnvironmentsClient.GetDiagnosticsItem": + resp, err = e.dispatchGetDiagnosticsItem(req) + case "EnvironmentsClient.NewGetInboundNetworkDependenciesEndpointsPager": + resp, err = e.dispatchNewGetInboundNetworkDependenciesEndpointsPager(req) + case "EnvironmentsClient.GetMultiRolePool": + resp, err = e.dispatchGetMultiRolePool(req) + case "EnvironmentsClient.NewGetOutboundNetworkDependenciesEndpointsPager": + resp, err = e.dispatchNewGetOutboundNetworkDependenciesEndpointsPager(req) + case "EnvironmentsClient.GetPrivateEndpointConnection": + resp, err = e.dispatchGetPrivateEndpointConnection(req) + case "EnvironmentsClient.NewGetPrivateEndpointConnectionListPager": + resp, err = e.dispatchNewGetPrivateEndpointConnectionListPager(req) + case "EnvironmentsClient.GetPrivateLinkResources": + resp, err = e.dispatchGetPrivateLinkResources(req) + case "EnvironmentsClient.GetVipInfo": + resp, err = e.dispatchGetVipInfo(req) + case "EnvironmentsClient.GetWorkerPool": + resp, err = e.dispatchGetWorkerPool(req) + case "EnvironmentsClient.NewListPager": + resp, err = e.dispatchNewListPager(req) + case "EnvironmentsClient.NewListAppServicePlansPager": + resp, err = e.dispatchNewListAppServicePlansPager(req) + case "EnvironmentsClient.NewListByResourceGroupPager": + resp, err = e.dispatchNewListByResourceGroupPager(req) + case "EnvironmentsClient.NewListCapacitiesPager": + resp, err = e.dispatchNewListCapacitiesPager(req) + case "EnvironmentsClient.ListDiagnostics": + resp, err = e.dispatchListDiagnostics(req) + case "EnvironmentsClient.NewListMultiRoleMetricDefinitionsPager": + resp, err = e.dispatchNewListMultiRoleMetricDefinitionsPager(req) + case "EnvironmentsClient.NewListMultiRolePoolInstanceMetricDefinitionsPager": + resp, err = e.dispatchNewListMultiRolePoolInstanceMetricDefinitionsPager(req) + case "EnvironmentsClient.NewListMultiRolePoolSKUsPager": + resp, err = e.dispatchNewListMultiRolePoolSKUsPager(req) + case "EnvironmentsClient.NewListMultiRolePoolsPager": + resp, err = e.dispatchNewListMultiRolePoolsPager(req) + case "EnvironmentsClient.NewListMultiRoleUsagesPager": + resp, err = e.dispatchNewListMultiRoleUsagesPager(req) + case "EnvironmentsClient.ListOperations": + resp, err = e.dispatchListOperations(req) + case "EnvironmentsClient.NewListUsagesPager": + resp, err = e.dispatchNewListUsagesPager(req) + case "EnvironmentsClient.NewListWebAppsPager": + resp, err = e.dispatchNewListWebAppsPager(req) + case "EnvironmentsClient.NewListWebWorkerMetricDefinitionsPager": + resp, err = e.dispatchNewListWebWorkerMetricDefinitionsPager(req) + case "EnvironmentsClient.NewListWebWorkerUsagesPager": + resp, err = e.dispatchNewListWebWorkerUsagesPager(req) + case "EnvironmentsClient.NewListWorkerPoolInstanceMetricDefinitionsPager": + resp, err = e.dispatchNewListWorkerPoolInstanceMetricDefinitionsPager(req) + case "EnvironmentsClient.NewListWorkerPoolSKUsPager": + resp, err = e.dispatchNewListWorkerPoolSKUsPager(req) + case "EnvironmentsClient.NewListWorkerPoolsPager": + resp, err = e.dispatchNewListWorkerPoolsPager(req) + case "EnvironmentsClient.Reboot": + resp, err = e.dispatchReboot(req) + case "EnvironmentsClient.BeginResume": + resp, err = e.dispatchBeginResume(req) + case "EnvironmentsClient.BeginSuspend": + resp, err = e.dispatchBeginSuspend(req) + case "EnvironmentsClient.TestUpgradeAvailableNotification": + resp, err = e.dispatchTestUpgradeAvailableNotification(req) + case "EnvironmentsClient.Update": + resp, err = e.dispatchUpdate(req) + case "EnvironmentsClient.UpdateAseCustomDNSSuffixConfiguration": + resp, err = e.dispatchUpdateAseCustomDNSSuffixConfiguration(req) + case "EnvironmentsClient.UpdateAseNetworkingConfiguration": + resp, err = e.dispatchUpdateAseNetworkingConfiguration(req) + case "EnvironmentsClient.UpdateMultiRolePool": + resp, err = e.dispatchUpdateMultiRolePool(req) + case "EnvironmentsClient.UpdateWorkerPool": + resp, err = e.dispatchUpdateWorkerPool(req) + case "EnvironmentsClient.BeginUpgrade": + resp, err = e.dispatchBeginUpgrade(req) + default: + err = fmt.Errorf("unhandled API %s", method) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchBeginApproveOrRejectPrivateEndpointConnection(req *http.Request) (*http.Response, error) { + if e.srv.BeginApproveOrRejectPrivateEndpointConnection == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginApproveOrRejectPrivateEndpointConnection not implemented")} + } + beginApproveOrRejectPrivateEndpointConnection := e.beginApproveOrRejectPrivateEndpointConnection.get(req) + if beginApproveOrRejectPrivateEndpointConnection == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateEndpointConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.PrivateLinkConnectionApprovalRequestResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + privateEndpointConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("privateEndpointConnectionName")]) + if err != nil { + return nil, err + } + respr, errRespr := e.srv.BeginApproveOrRejectPrivateEndpointConnection(req.Context(), resourceGroupNameParam, nameParam, privateEndpointConnectionNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginApproveOrRejectPrivateEndpointConnection = &respr + e.beginApproveOrRejectPrivateEndpointConnection.add(req, beginApproveOrRejectPrivateEndpointConnection) + } + + resp, err := server.PollerResponderNext(beginApproveOrRejectPrivateEndpointConnection, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + e.beginApproveOrRejectPrivateEndpointConnection.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginApproveOrRejectPrivateEndpointConnection) { + e.beginApproveOrRejectPrivateEndpointConnection.remove(req) + } + + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchBeginChangeVnet(req *http.Request) (*http.Response, error) { + if e.srv.BeginChangeVnet == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginChangeVnet not implemented")} + } + beginChangeVnet := e.beginChangeVnet.get(req) + if beginChangeVnet == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/changeVirtualNetwork` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.VirtualNetworkProfile](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := e.srv.BeginChangeVnet(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginChangeVnet = &respr + e.beginChangeVnet.add(req, beginChangeVnet) + } + + resp, err := server.PollerResponderNext(beginChangeVnet, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + e.beginChangeVnet.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginChangeVnet) { + e.beginChangeVnet.remove(req) + } + + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) (*http.Response, error) { + if e.srv.BeginCreateOrUpdate == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} + } + beginCreateOrUpdate := e.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.EnvironmentResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := e.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginCreateOrUpdate = &respr + e.beginCreateOrUpdate.add(req, beginCreateOrUpdate) + } + + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusCreated, http.StatusAccepted}, resp.StatusCode) { + e.beginCreateOrUpdate.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginCreateOrUpdate) { + e.beginCreateOrUpdate.remove(req) + } + + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchBeginCreateOrUpdateMultiRolePool(req *http.Request) (*http.Response, error) { + if e.srv.BeginCreateOrUpdateMultiRolePool == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdateMultiRolePool not implemented")} + } + beginCreateOrUpdateMultiRolePool := e.beginCreateOrUpdateMultiRolePool.get(req) + if beginCreateOrUpdateMultiRolePool == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/multiRolePools/default` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.WorkerPoolResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := e.srv.BeginCreateOrUpdateMultiRolePool(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginCreateOrUpdateMultiRolePool = &respr + e.beginCreateOrUpdateMultiRolePool.add(req, beginCreateOrUpdateMultiRolePool) + } + + resp, err := server.PollerResponderNext(beginCreateOrUpdateMultiRolePool, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + e.beginCreateOrUpdateMultiRolePool.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginCreateOrUpdateMultiRolePool) { + e.beginCreateOrUpdateMultiRolePool.remove(req) + } + + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchBeginCreateOrUpdateWorkerPool(req *http.Request) (*http.Response, error) { + if e.srv.BeginCreateOrUpdateWorkerPool == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdateWorkerPool not implemented")} + } + beginCreateOrUpdateWorkerPool := e.beginCreateOrUpdateWorkerPool.get(req) + if beginCreateOrUpdateWorkerPool == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/workerPools/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.WorkerPoolResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + workerPoolNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("workerPoolName")]) + if err != nil { + return nil, err + } + respr, errRespr := e.srv.BeginCreateOrUpdateWorkerPool(req.Context(), resourceGroupNameParam, nameParam, workerPoolNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginCreateOrUpdateWorkerPool = &respr + e.beginCreateOrUpdateWorkerPool.add(req, beginCreateOrUpdateWorkerPool) + } + + resp, err := server.PollerResponderNext(beginCreateOrUpdateWorkerPool, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + e.beginCreateOrUpdateWorkerPool.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginCreateOrUpdateWorkerPool) { + e.beginCreateOrUpdateWorkerPool.remove(req) + } + + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchBeginDelete(req *http.Request) (*http.Response, error) { + if e.srv.BeginDelete == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} + } + beginDelete := e.beginDelete.get(req) + if beginDelete == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + forceDeleteUnescaped, err := url.QueryUnescape(qp.Get("forceDelete")) + if err != nil { + return nil, err + } + forceDeleteParam, err := parseOptional(forceDeleteUnescaped, strconv.ParseBool) + if err != nil { + return nil, err + } + var options *armappservice.EnvironmentsClientBeginDeleteOptions + if forceDeleteParam != nil { + options = &armappservice.EnvironmentsClientBeginDeleteOptions{ + ForceDelete: forceDeleteParam, + } + } + respr, errRespr := e.srv.BeginDelete(req.Context(), resourceGroupNameParam, nameParam, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginDelete = &respr + e.beginDelete.add(req, beginDelete) + } + + resp, err := server.PollerResponderNext(beginDelete, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + e.beginDelete.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + } + if !server.PollerResponderMore(beginDelete) { + e.beginDelete.remove(req) + } + + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchDeleteAseCustomDNSSuffixConfiguration(req *http.Request) (*http.Response, error) { + if e.srv.DeleteAseCustomDNSSuffixConfiguration == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteAseCustomDNSSuffixConfiguration not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/configurations/customdnssuffix` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := e.srv.DeleteAseCustomDNSSuffixConfiguration(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).Interface, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchBeginDeletePrivateEndpointConnection(req *http.Request) (*http.Response, error) { + if e.srv.BeginDeletePrivateEndpointConnection == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginDeletePrivateEndpointConnection not implemented")} + } + beginDeletePrivateEndpointConnection := e.beginDeletePrivateEndpointConnection.get(req) + if beginDeletePrivateEndpointConnection == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateEndpointConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + privateEndpointConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("privateEndpointConnectionName")]) + if err != nil { + return nil, err + } + respr, errRespr := e.srv.BeginDeletePrivateEndpointConnection(req.Context(), resourceGroupNameParam, nameParam, privateEndpointConnectionNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginDeletePrivateEndpointConnection = &respr + e.beginDeletePrivateEndpointConnection.add(req, beginDeletePrivateEndpointConnection) + } + + resp, err := server.PollerResponderNext(beginDeletePrivateEndpointConnection, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + e.beginDeletePrivateEndpointConnection.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + } + if !server.PollerResponderMore(beginDeletePrivateEndpointConnection) { + e.beginDeletePrivateEndpointConnection.remove(req) + } + + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchGet(req *http.Request) (*http.Response, error) { + if e.srv.Get == nil { + return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := e.srv.Get(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).EnvironmentResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchGetAseCustomDNSSuffixConfiguration(req *http.Request) (*http.Response, error) { + if e.srv.GetAseCustomDNSSuffixConfiguration == nil { + return nil, &nonRetriableError{errors.New("fake for method GetAseCustomDNSSuffixConfiguration not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/configurations/customdnssuffix` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := e.srv.GetAseCustomDNSSuffixConfiguration(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).CustomDNSSuffixConfiguration, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchGetAseV3NetworkingConfiguration(req *http.Request) (*http.Response, error) { + if e.srv.GetAseV3NetworkingConfiguration == nil { + return nil, &nonRetriableError{errors.New("fake for method GetAseV3NetworkingConfiguration not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/configurations/networking` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := e.srv.GetAseV3NetworkingConfiguration(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).AseV3NetworkingConfiguration, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchGetDiagnosticsItem(req *http.Request) (*http.Response, error) { + if e.srv.GetDiagnosticsItem == nil { + return nil, &nonRetriableError{errors.New("fake for method GetDiagnosticsItem not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/diagnostics/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + diagnosticsNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("diagnosticsName")]) + if err != nil { + return nil, err + } + respr, errRespr := e.srv.GetDiagnosticsItem(req.Context(), resourceGroupNameParam, nameParam, diagnosticsNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).HostingEnvironmentDiagnostics, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchNewGetInboundNetworkDependenciesEndpointsPager(req *http.Request) (*http.Response, error) { + if e.srv.NewGetInboundNetworkDependenciesEndpointsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewGetInboundNetworkDependenciesEndpointsPager not implemented")} + } + newGetInboundNetworkDependenciesEndpointsPager := e.newGetInboundNetworkDependenciesEndpointsPager.get(req) + if newGetInboundNetworkDependenciesEndpointsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/inboundNetworkDependenciesEndpoints` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := e.srv.NewGetInboundNetworkDependenciesEndpointsPager(resourceGroupNameParam, nameParam, nil) + newGetInboundNetworkDependenciesEndpointsPager = &resp + e.newGetInboundNetworkDependenciesEndpointsPager.add(req, newGetInboundNetworkDependenciesEndpointsPager) + server.PagerResponderInjectNextLinks(newGetInboundNetworkDependenciesEndpointsPager, req, func(page *armappservice.EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newGetInboundNetworkDependenciesEndpointsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + e.newGetInboundNetworkDependenciesEndpointsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newGetInboundNetworkDependenciesEndpointsPager) { + e.newGetInboundNetworkDependenciesEndpointsPager.remove(req) + } + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchGetMultiRolePool(req *http.Request) (*http.Response, error) { + if e.srv.GetMultiRolePool == nil { + return nil, &nonRetriableError{errors.New("fake for method GetMultiRolePool not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/multiRolePools/default` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := e.srv.GetMultiRolePool(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).WorkerPoolResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchNewGetOutboundNetworkDependenciesEndpointsPager(req *http.Request) (*http.Response, error) { + if e.srv.NewGetOutboundNetworkDependenciesEndpointsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewGetOutboundNetworkDependenciesEndpointsPager not implemented")} + } + newGetOutboundNetworkDependenciesEndpointsPager := e.newGetOutboundNetworkDependenciesEndpointsPager.get(req) + if newGetOutboundNetworkDependenciesEndpointsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/outboundNetworkDependenciesEndpoints` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := e.srv.NewGetOutboundNetworkDependenciesEndpointsPager(resourceGroupNameParam, nameParam, nil) + newGetOutboundNetworkDependenciesEndpointsPager = &resp + e.newGetOutboundNetworkDependenciesEndpointsPager.add(req, newGetOutboundNetworkDependenciesEndpointsPager) + server.PagerResponderInjectNextLinks(newGetOutboundNetworkDependenciesEndpointsPager, req, func(page *armappservice.EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newGetOutboundNetworkDependenciesEndpointsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + e.newGetOutboundNetworkDependenciesEndpointsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newGetOutboundNetworkDependenciesEndpointsPager) { + e.newGetOutboundNetworkDependenciesEndpointsPager.remove(req) + } + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchGetPrivateEndpointConnection(req *http.Request) (*http.Response, error) { + if e.srv.GetPrivateEndpointConnection == nil { + return nil, &nonRetriableError{errors.New("fake for method GetPrivateEndpointConnection not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateEndpointConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + privateEndpointConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("privateEndpointConnectionName")]) + if err != nil { + return nil, err + } + respr, errRespr := e.srv.GetPrivateEndpointConnection(req.Context(), resourceGroupNameParam, nameParam, privateEndpointConnectionNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).RemotePrivateEndpointConnectionARMResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchNewGetPrivateEndpointConnectionListPager(req *http.Request) (*http.Response, error) { + if e.srv.NewGetPrivateEndpointConnectionListPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewGetPrivateEndpointConnectionListPager not implemented")} + } + newGetPrivateEndpointConnectionListPager := e.newGetPrivateEndpointConnectionListPager.get(req) + if newGetPrivateEndpointConnectionListPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateEndpointConnections` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := e.srv.NewGetPrivateEndpointConnectionListPager(resourceGroupNameParam, nameParam, nil) + newGetPrivateEndpointConnectionListPager = &resp + e.newGetPrivateEndpointConnectionListPager.add(req, newGetPrivateEndpointConnectionListPager) + server.PagerResponderInjectNextLinks(newGetPrivateEndpointConnectionListPager, req, func(page *armappservice.EnvironmentsClientGetPrivateEndpointConnectionListResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newGetPrivateEndpointConnectionListPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + e.newGetPrivateEndpointConnectionListPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newGetPrivateEndpointConnectionListPager) { + e.newGetPrivateEndpointConnectionListPager.remove(req) + } + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchGetPrivateLinkResources(req *http.Request) (*http.Response, error) { + if e.srv.GetPrivateLinkResources == nil { + return nil, &nonRetriableError{errors.New("fake for method GetPrivateLinkResources not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateLinkResources` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := e.srv.GetPrivateLinkResources(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).PrivateLinkResourcesWrapper, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchGetVipInfo(req *http.Request) (*http.Response, error) { + if e.srv.GetVipInfo == nil { + return nil, &nonRetriableError{errors.New("fake for method GetVipInfo not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/capacities/virtualip` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := e.srv.GetVipInfo(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).AddressResponse, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchGetWorkerPool(req *http.Request) (*http.Response, error) { + if e.srv.GetWorkerPool == nil { + return nil, &nonRetriableError{errors.New("fake for method GetWorkerPool not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/workerPools/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + workerPoolNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("workerPoolName")]) + if err != nil { + return nil, err + } + respr, errRespr := e.srv.GetWorkerPool(req.Context(), resourceGroupNameParam, nameParam, workerPoolNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).WorkerPoolResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchNewListPager(req *http.Request) (*http.Response, error) { + if e.srv.NewListPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} + } + newListPager := e.newListPager.get(req) + if newListPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 1 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resp := e.srv.NewListPager(nil) + newListPager = &resp + e.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armappservice.EnvironmentsClientListResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + e.newListPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListPager) { + e.newListPager.remove(req) + } + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchNewListAppServicePlansPager(req *http.Request) (*http.Response, error) { + if e.srv.NewListAppServicePlansPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListAppServicePlansPager not implemented")} + } + newListAppServicePlansPager := e.newListAppServicePlansPager.get(req) + if newListAppServicePlansPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/serverfarms` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := e.srv.NewListAppServicePlansPager(resourceGroupNameParam, nameParam, nil) + newListAppServicePlansPager = &resp + e.newListAppServicePlansPager.add(req, newListAppServicePlansPager) + server.PagerResponderInjectNextLinks(newListAppServicePlansPager, req, func(page *armappservice.EnvironmentsClientListAppServicePlansResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListAppServicePlansPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + e.newListAppServicePlansPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListAppServicePlansPager) { + e.newListAppServicePlansPager.remove(req) + } + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchNewListByResourceGroupPager(req *http.Request) (*http.Response, error) { + if e.srv.NewListByResourceGroupPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListByResourceGroupPager not implemented")} + } + newListByResourceGroupPager := e.newListByResourceGroupPager.get(req) + if newListByResourceGroupPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 2 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + resp := e.srv.NewListByResourceGroupPager(resourceGroupNameParam, nil) + newListByResourceGroupPager = &resp + e.newListByResourceGroupPager.add(req, newListByResourceGroupPager) + server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armappservice.EnvironmentsClientListByResourceGroupResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListByResourceGroupPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + e.newListByResourceGroupPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListByResourceGroupPager) { + e.newListByResourceGroupPager.remove(req) + } + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchNewListCapacitiesPager(req *http.Request) (*http.Response, error) { + if e.srv.NewListCapacitiesPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListCapacitiesPager not implemented")} + } + newListCapacitiesPager := e.newListCapacitiesPager.get(req) + if newListCapacitiesPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/capacities/compute` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := e.srv.NewListCapacitiesPager(resourceGroupNameParam, nameParam, nil) + newListCapacitiesPager = &resp + e.newListCapacitiesPager.add(req, newListCapacitiesPager) + server.PagerResponderInjectNextLinks(newListCapacitiesPager, req, func(page *armappservice.EnvironmentsClientListCapacitiesResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListCapacitiesPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + e.newListCapacitiesPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListCapacitiesPager) { + e.newListCapacitiesPager.remove(req) + } + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchListDiagnostics(req *http.Request) (*http.Response, error) { + if e.srv.ListDiagnostics == nil { + return nil, &nonRetriableError{errors.New("fake for method ListDiagnostics not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/diagnostics` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := e.srv.ListDiagnostics(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).HostingEnvironmentDiagnosticsArray, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchNewListMultiRoleMetricDefinitionsPager(req *http.Request) (*http.Response, error) { + if e.srv.NewListMultiRoleMetricDefinitionsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListMultiRoleMetricDefinitionsPager not implemented")} + } + newListMultiRoleMetricDefinitionsPager := e.newListMultiRoleMetricDefinitionsPager.get(req) + if newListMultiRoleMetricDefinitionsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/multiRolePools/default/metricdefinitions` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := e.srv.NewListMultiRoleMetricDefinitionsPager(resourceGroupNameParam, nameParam, nil) + newListMultiRoleMetricDefinitionsPager = &resp + e.newListMultiRoleMetricDefinitionsPager.add(req, newListMultiRoleMetricDefinitionsPager) + server.PagerResponderInjectNextLinks(newListMultiRoleMetricDefinitionsPager, req, func(page *armappservice.EnvironmentsClientListMultiRoleMetricDefinitionsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListMultiRoleMetricDefinitionsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + e.newListMultiRoleMetricDefinitionsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListMultiRoleMetricDefinitionsPager) { + e.newListMultiRoleMetricDefinitionsPager.remove(req) + } + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchNewListMultiRolePoolInstanceMetricDefinitionsPager(req *http.Request) (*http.Response, error) { + if e.srv.NewListMultiRolePoolInstanceMetricDefinitionsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListMultiRolePoolInstanceMetricDefinitionsPager not implemented")} + } + newListMultiRolePoolInstanceMetricDefinitionsPager := e.newListMultiRolePoolInstanceMetricDefinitionsPager.get(req) + if newListMultiRolePoolInstanceMetricDefinitionsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/multiRolePools/default/instances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/metricdefinitions` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + instanceParam, err := url.PathUnescape(matches[regex.SubexpIndex("instance")]) + if err != nil { + return nil, err + } + resp := e.srv.NewListMultiRolePoolInstanceMetricDefinitionsPager(resourceGroupNameParam, nameParam, instanceParam, nil) + newListMultiRolePoolInstanceMetricDefinitionsPager = &resp + e.newListMultiRolePoolInstanceMetricDefinitionsPager.add(req, newListMultiRolePoolInstanceMetricDefinitionsPager) + server.PagerResponderInjectNextLinks(newListMultiRolePoolInstanceMetricDefinitionsPager, req, func(page *armappservice.EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListMultiRolePoolInstanceMetricDefinitionsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + e.newListMultiRolePoolInstanceMetricDefinitionsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListMultiRolePoolInstanceMetricDefinitionsPager) { + e.newListMultiRolePoolInstanceMetricDefinitionsPager.remove(req) + } + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchNewListMultiRolePoolSKUsPager(req *http.Request) (*http.Response, error) { + if e.srv.NewListMultiRolePoolSKUsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListMultiRolePoolSKUsPager not implemented")} + } + newListMultiRolePoolSKUsPager := e.newListMultiRolePoolSKUsPager.get(req) + if newListMultiRolePoolSKUsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/multiRolePools/default/skus` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := e.srv.NewListMultiRolePoolSKUsPager(resourceGroupNameParam, nameParam, nil) + newListMultiRolePoolSKUsPager = &resp + e.newListMultiRolePoolSKUsPager.add(req, newListMultiRolePoolSKUsPager) + server.PagerResponderInjectNextLinks(newListMultiRolePoolSKUsPager, req, func(page *armappservice.EnvironmentsClientListMultiRolePoolSKUsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListMultiRolePoolSKUsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + e.newListMultiRolePoolSKUsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListMultiRolePoolSKUsPager) { + e.newListMultiRolePoolSKUsPager.remove(req) + } + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchNewListMultiRolePoolsPager(req *http.Request) (*http.Response, error) { + if e.srv.NewListMultiRolePoolsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListMultiRolePoolsPager not implemented")} + } + newListMultiRolePoolsPager := e.newListMultiRolePoolsPager.get(req) + if newListMultiRolePoolsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/multiRolePools` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := e.srv.NewListMultiRolePoolsPager(resourceGroupNameParam, nameParam, nil) + newListMultiRolePoolsPager = &resp + e.newListMultiRolePoolsPager.add(req, newListMultiRolePoolsPager) + server.PagerResponderInjectNextLinks(newListMultiRolePoolsPager, req, func(page *armappservice.EnvironmentsClientListMultiRolePoolsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListMultiRolePoolsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + e.newListMultiRolePoolsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListMultiRolePoolsPager) { + e.newListMultiRolePoolsPager.remove(req) + } + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchNewListMultiRoleUsagesPager(req *http.Request) (*http.Response, error) { + if e.srv.NewListMultiRoleUsagesPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListMultiRoleUsagesPager not implemented")} + } + newListMultiRoleUsagesPager := e.newListMultiRoleUsagesPager.get(req) + if newListMultiRoleUsagesPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/multiRolePools/default/usages` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := e.srv.NewListMultiRoleUsagesPager(resourceGroupNameParam, nameParam, nil) + newListMultiRoleUsagesPager = &resp + e.newListMultiRoleUsagesPager.add(req, newListMultiRoleUsagesPager) + server.PagerResponderInjectNextLinks(newListMultiRoleUsagesPager, req, func(page *armappservice.EnvironmentsClientListMultiRoleUsagesResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListMultiRoleUsagesPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + e.newListMultiRoleUsagesPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListMultiRoleUsagesPager) { + e.newListMultiRoleUsagesPager.remove(req) + } + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchListOperations(req *http.Request) (*http.Response, error) { + if e.srv.ListOperations == nil { + return nil, &nonRetriableError{errors.New("fake for method ListOperations not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/operations` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := e.srv.ListOperations(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).OperationArray, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchNewListUsagesPager(req *http.Request) (*http.Response, error) { + if e.srv.NewListUsagesPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListUsagesPager not implemented")} + } + newListUsagesPager := e.newListUsagesPager.get(req) + if newListUsagesPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/usages` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + filterUnescaped, err := url.QueryUnescape(qp.Get("$filter")) + if err != nil { + return nil, err + } + filterParam := getOptional(filterUnescaped) + var options *armappservice.EnvironmentsClientListUsagesOptions + if filterParam != nil { + options = &armappservice.EnvironmentsClientListUsagesOptions{ + Filter: filterParam, + } + } + resp := e.srv.NewListUsagesPager(resourceGroupNameParam, nameParam, options) + newListUsagesPager = &resp + e.newListUsagesPager.add(req, newListUsagesPager) + server.PagerResponderInjectNextLinks(newListUsagesPager, req, func(page *armappservice.EnvironmentsClientListUsagesResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListUsagesPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + e.newListUsagesPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListUsagesPager) { + e.newListUsagesPager.remove(req) + } + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchNewListWebAppsPager(req *http.Request) (*http.Response, error) { + if e.srv.NewListWebAppsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListWebAppsPager not implemented")} + } + newListWebAppsPager := e.newListWebAppsPager.get(req) + if newListWebAppsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/sites` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + propertiesToIncludeUnescaped, err := url.QueryUnescape(qp.Get("propertiesToInclude")) + if err != nil { + return nil, err + } + propertiesToIncludeParam := getOptional(propertiesToIncludeUnescaped) + var options *armappservice.EnvironmentsClientListWebAppsOptions + if propertiesToIncludeParam != nil { + options = &armappservice.EnvironmentsClientListWebAppsOptions{ + PropertiesToInclude: propertiesToIncludeParam, + } + } + resp := e.srv.NewListWebAppsPager(resourceGroupNameParam, nameParam, options) + newListWebAppsPager = &resp + e.newListWebAppsPager.add(req, newListWebAppsPager) + server.PagerResponderInjectNextLinks(newListWebAppsPager, req, func(page *armappservice.EnvironmentsClientListWebAppsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListWebAppsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + e.newListWebAppsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListWebAppsPager) { + e.newListWebAppsPager.remove(req) + } + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchNewListWebWorkerMetricDefinitionsPager(req *http.Request) (*http.Response, error) { + if e.srv.NewListWebWorkerMetricDefinitionsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListWebWorkerMetricDefinitionsPager not implemented")} + } + newListWebWorkerMetricDefinitionsPager := e.newListWebWorkerMetricDefinitionsPager.get(req) + if newListWebWorkerMetricDefinitionsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/workerPools/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/metricdefinitions` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + workerPoolNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("workerPoolName")]) + if err != nil { + return nil, err + } + resp := e.srv.NewListWebWorkerMetricDefinitionsPager(resourceGroupNameParam, nameParam, workerPoolNameParam, nil) + newListWebWorkerMetricDefinitionsPager = &resp + e.newListWebWorkerMetricDefinitionsPager.add(req, newListWebWorkerMetricDefinitionsPager) + server.PagerResponderInjectNextLinks(newListWebWorkerMetricDefinitionsPager, req, func(page *armappservice.EnvironmentsClientListWebWorkerMetricDefinitionsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListWebWorkerMetricDefinitionsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + e.newListWebWorkerMetricDefinitionsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListWebWorkerMetricDefinitionsPager) { + e.newListWebWorkerMetricDefinitionsPager.remove(req) + } + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchNewListWebWorkerUsagesPager(req *http.Request) (*http.Response, error) { + if e.srv.NewListWebWorkerUsagesPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListWebWorkerUsagesPager not implemented")} + } + newListWebWorkerUsagesPager := e.newListWebWorkerUsagesPager.get(req) + if newListWebWorkerUsagesPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/workerPools/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/usages` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + workerPoolNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("workerPoolName")]) + if err != nil { + return nil, err + } + resp := e.srv.NewListWebWorkerUsagesPager(resourceGroupNameParam, nameParam, workerPoolNameParam, nil) + newListWebWorkerUsagesPager = &resp + e.newListWebWorkerUsagesPager.add(req, newListWebWorkerUsagesPager) + server.PagerResponderInjectNextLinks(newListWebWorkerUsagesPager, req, func(page *armappservice.EnvironmentsClientListWebWorkerUsagesResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListWebWorkerUsagesPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + e.newListWebWorkerUsagesPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListWebWorkerUsagesPager) { + e.newListWebWorkerUsagesPager.remove(req) + } + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchNewListWorkerPoolInstanceMetricDefinitionsPager(req *http.Request) (*http.Response, error) { + if e.srv.NewListWorkerPoolInstanceMetricDefinitionsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListWorkerPoolInstanceMetricDefinitionsPager not implemented")} + } + newListWorkerPoolInstanceMetricDefinitionsPager := e.newListWorkerPoolInstanceMetricDefinitionsPager.get(req) + if newListWorkerPoolInstanceMetricDefinitionsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/workerPools/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/instances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/metricdefinitions` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + workerPoolNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("workerPoolName")]) + if err != nil { + return nil, err + } + instanceParam, err := url.PathUnescape(matches[regex.SubexpIndex("instance")]) + if err != nil { + return nil, err + } + resp := e.srv.NewListWorkerPoolInstanceMetricDefinitionsPager(resourceGroupNameParam, nameParam, workerPoolNameParam, instanceParam, nil) + newListWorkerPoolInstanceMetricDefinitionsPager = &resp + e.newListWorkerPoolInstanceMetricDefinitionsPager.add(req, newListWorkerPoolInstanceMetricDefinitionsPager) + server.PagerResponderInjectNextLinks(newListWorkerPoolInstanceMetricDefinitionsPager, req, func(page *armappservice.EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListWorkerPoolInstanceMetricDefinitionsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + e.newListWorkerPoolInstanceMetricDefinitionsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListWorkerPoolInstanceMetricDefinitionsPager) { + e.newListWorkerPoolInstanceMetricDefinitionsPager.remove(req) + } + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchNewListWorkerPoolSKUsPager(req *http.Request) (*http.Response, error) { + if e.srv.NewListWorkerPoolSKUsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListWorkerPoolSKUsPager not implemented")} + } + newListWorkerPoolSKUsPager := e.newListWorkerPoolSKUsPager.get(req) + if newListWorkerPoolSKUsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/workerPools/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/skus` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + workerPoolNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("workerPoolName")]) + if err != nil { + return nil, err + } + resp := e.srv.NewListWorkerPoolSKUsPager(resourceGroupNameParam, nameParam, workerPoolNameParam, nil) + newListWorkerPoolSKUsPager = &resp + e.newListWorkerPoolSKUsPager.add(req, newListWorkerPoolSKUsPager) + server.PagerResponderInjectNextLinks(newListWorkerPoolSKUsPager, req, func(page *armappservice.EnvironmentsClientListWorkerPoolSKUsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListWorkerPoolSKUsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + e.newListWorkerPoolSKUsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListWorkerPoolSKUsPager) { + e.newListWorkerPoolSKUsPager.remove(req) + } + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchNewListWorkerPoolsPager(req *http.Request) (*http.Response, error) { + if e.srv.NewListWorkerPoolsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListWorkerPoolsPager not implemented")} + } + newListWorkerPoolsPager := e.newListWorkerPoolsPager.get(req) + if newListWorkerPoolsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/workerPools` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := e.srv.NewListWorkerPoolsPager(resourceGroupNameParam, nameParam, nil) + newListWorkerPoolsPager = &resp + e.newListWorkerPoolsPager.add(req, newListWorkerPoolsPager) + server.PagerResponderInjectNextLinks(newListWorkerPoolsPager, req, func(page *armappservice.EnvironmentsClientListWorkerPoolsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListWorkerPoolsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + e.newListWorkerPoolsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListWorkerPoolsPager) { + e.newListWorkerPoolsPager.remove(req) + } + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchReboot(req *http.Request) (*http.Response, error) { + if e.srv.Reboot == nil { + return nil, &nonRetriableError{errors.New("fake for method Reboot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/reboot` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := e.srv.Reboot(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusAccepted}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchBeginResume(req *http.Request) (*http.Response, error) { + if e.srv.BeginResume == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginResume not implemented")} + } + beginResume := e.beginResume.get(req) + if beginResume == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resume` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := e.srv.BeginResume(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginResume = &respr + e.beginResume.add(req, beginResume) + } + + resp, err := server.PollerResponderNext(beginResume, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + e.beginResume.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginResume) { + e.beginResume.remove(req) + } + + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchBeginSuspend(req *http.Request) (*http.Response, error) { + if e.srv.BeginSuspend == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginSuspend not implemented")} + } + beginSuspend := e.beginSuspend.get(req) + if beginSuspend == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/suspend` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := e.srv.BeginSuspend(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginSuspend = &respr + e.beginSuspend.add(req, beginSuspend) + } + + resp, err := server.PollerResponderNext(beginSuspend, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + e.beginSuspend.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginSuspend) { + e.beginSuspend.remove(req) + } + + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchTestUpgradeAvailableNotification(req *http.Request) (*http.Response, error) { + if e.srv.TestUpgradeAvailableNotification == nil { + return nil, &nonRetriableError{errors.New("fake for method TestUpgradeAvailableNotification not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/testUpgradeAvailableNotification` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := e.srv.TestUpgradeAvailableNotification(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchUpdate(req *http.Request) (*http.Response, error) { + if e.srv.Update == nil { + return nil, &nonRetriableError{errors.New("fake for method Update not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.EnvironmentPatchResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := e.srv.Update(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusCreated, http.StatusAccepted}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated, http.StatusAccepted", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).EnvironmentResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchUpdateAseCustomDNSSuffixConfiguration(req *http.Request) (*http.Response, error) { + if e.srv.UpdateAseCustomDNSSuffixConfiguration == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateAseCustomDNSSuffixConfiguration not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/configurations/customdnssuffix` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.CustomDNSSuffixConfiguration](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := e.srv.UpdateAseCustomDNSSuffixConfiguration(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).CustomDNSSuffixConfiguration, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchUpdateAseNetworkingConfiguration(req *http.Request) (*http.Response, error) { + if e.srv.UpdateAseNetworkingConfiguration == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateAseNetworkingConfiguration not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/configurations/networking` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.AseV3NetworkingConfiguration](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := e.srv.UpdateAseNetworkingConfiguration(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).AseV3NetworkingConfiguration, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchUpdateMultiRolePool(req *http.Request) (*http.Response, error) { + if e.srv.UpdateMultiRolePool == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateMultiRolePool not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/multiRolePools/default` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.WorkerPoolResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := e.srv.UpdateMultiRolePool(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusAccepted}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).WorkerPoolResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchUpdateWorkerPool(req *http.Request) (*http.Response, error) { + if e.srv.UpdateWorkerPool == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateWorkerPool not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/workerPools/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.WorkerPoolResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + workerPoolNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("workerPoolName")]) + if err != nil { + return nil, err + } + respr, errRespr := e.srv.UpdateWorkerPool(req.Context(), resourceGroupNameParam, nameParam, workerPoolNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusAccepted}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).WorkerPoolResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (e *EnvironmentsServerTransport) dispatchBeginUpgrade(req *http.Request) (*http.Response, error) { + if e.srv.BeginUpgrade == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginUpgrade not implemented")} + } + beginUpgrade := e.beginUpgrade.get(req) + if beginUpgrade == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/upgrade` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := e.srv.BeginUpgrade(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginUpgrade = &respr + e.beginUpgrade.add(req, beginUpgrade) + } + + resp, err := server.PollerResponderNext(beginUpgrade, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusAccepted}, resp.StatusCode) { + e.beginUpgrade.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginUpgrade) { + e.beginUpgrade.remove(req) + } + + return resp, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/fake/getusagesinlocation_server.go b/sdk/resourcemanager/appservice/armappservice/fake/getusagesinlocation_server.go new file mode 100644 index 000000000000..937d75d9db56 --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/fake/getusagesinlocation_server.go @@ -0,0 +1,108 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "errors" + "fmt" + azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" + "net/http" + "net/url" + "regexp" +) + +// GetUsagesInLocationServer is a fake server for instances of the armappservice.GetUsagesInLocationClient type. +type GetUsagesInLocationServer struct { + // NewListPager is the fake for method GetUsagesInLocationClient.NewListPager + // HTTP status codes to indicate success: http.StatusOK + NewListPager func(location string, options *armappservice.GetUsagesInLocationClientListOptions) (resp azfake.PagerResponder[armappservice.GetUsagesInLocationClientListResponse]) +} + +// NewGetUsagesInLocationServerTransport creates a new instance of GetUsagesInLocationServerTransport with the provided implementation. +// The returned GetUsagesInLocationServerTransport instance is connected to an instance of armappservice.GetUsagesInLocationClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewGetUsagesInLocationServerTransport(srv *GetUsagesInLocationServer) *GetUsagesInLocationServerTransport { + return &GetUsagesInLocationServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armappservice.GetUsagesInLocationClientListResponse]](), + } +} + +// GetUsagesInLocationServerTransport connects instances of armappservice.GetUsagesInLocationClient to instances of GetUsagesInLocationServer. +// Don't use this type directly, use NewGetUsagesInLocationServerTransport instead. +type GetUsagesInLocationServerTransport struct { + srv *GetUsagesInLocationServer + newListPager *tracker[azfake.PagerResponder[armappservice.GetUsagesInLocationClientListResponse]] +} + +// Do implements the policy.Transporter interface for GetUsagesInLocationServerTransport. +func (g *GetUsagesInLocationServerTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + var resp *http.Response + var err error + + switch method { + case "GetUsagesInLocationClient.NewListPager": + resp, err = g.dispatchNewListPager(req) + default: + err = fmt.Errorf("unhandled API %s", method) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func (g *GetUsagesInLocationServerTransport) dispatchNewListPager(req *http.Request) (*http.Response, error) { + if g.srv.NewListPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} + } + newListPager := g.newListPager.get(req) + if newListPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/usages` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 2 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) + if err != nil { + return nil, err + } + resp := g.srv.NewListPager(locationParam, nil) + newListPager = &resp + g.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armappservice.GetUsagesInLocationClientListResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + g.newListPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListPager) { + g.newListPager.remove(req) + } + return resp, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/fake/global_server.go b/sdk/resourcemanager/appservice/armappservice/fake/global_server.go new file mode 100644 index 000000000000..008103b464cf --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/fake/global_server.go @@ -0,0 +1,170 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "context" + "errors" + "fmt" + azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" + "net/http" + "net/url" + "regexp" +) + +// GlobalServer is a fake server for instances of the armappservice.GlobalClient type. +type GlobalServer struct { + // GetDeletedWebApp is the fake for method GlobalClient.GetDeletedWebApp + // HTTP status codes to indicate success: http.StatusOK + GetDeletedWebApp func(ctx context.Context, deletedSiteID string, options *armappservice.GlobalClientGetDeletedWebAppOptions) (resp azfake.Responder[armappservice.GlobalClientGetDeletedWebAppResponse], errResp azfake.ErrorResponder) + + // GetDeletedWebAppSnapshots is the fake for method GlobalClient.GetDeletedWebAppSnapshots + // HTTP status codes to indicate success: http.StatusOK + GetDeletedWebAppSnapshots func(ctx context.Context, deletedSiteID string, options *armappservice.GlobalClientGetDeletedWebAppSnapshotsOptions) (resp azfake.Responder[armappservice.GlobalClientGetDeletedWebAppSnapshotsResponse], errResp azfake.ErrorResponder) + + // GetSubscriptionOperationWithAsyncResponse is the fake for method GlobalClient.GetSubscriptionOperationWithAsyncResponse + // HTTP status codes to indicate success: http.StatusNoContent + GetSubscriptionOperationWithAsyncResponse func(ctx context.Context, location string, operationID string, options *armappservice.GlobalClientGetSubscriptionOperationWithAsyncResponseOptions) (resp azfake.Responder[armappservice.GlobalClientGetSubscriptionOperationWithAsyncResponseResponse], errResp azfake.ErrorResponder) +} + +// NewGlobalServerTransport creates a new instance of GlobalServerTransport with the provided implementation. +// The returned GlobalServerTransport instance is connected to an instance of armappservice.GlobalClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewGlobalServerTransport(srv *GlobalServer) *GlobalServerTransport { + return &GlobalServerTransport{srv: srv} +} + +// GlobalServerTransport connects instances of armappservice.GlobalClient to instances of GlobalServer. +// Don't use this type directly, use NewGlobalServerTransport instead. +type GlobalServerTransport struct { + srv *GlobalServer +} + +// Do implements the policy.Transporter interface for GlobalServerTransport. +func (g *GlobalServerTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + var resp *http.Response + var err error + + switch method { + case "GlobalClient.GetDeletedWebApp": + resp, err = g.dispatchGetDeletedWebApp(req) + case "GlobalClient.GetDeletedWebAppSnapshots": + resp, err = g.dispatchGetDeletedWebAppSnapshots(req) + case "GlobalClient.GetSubscriptionOperationWithAsyncResponse": + resp, err = g.dispatchGetSubscriptionOperationWithAsyncResponse(req) + default: + err = fmt.Errorf("unhandled API %s", method) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func (g *GlobalServerTransport) dispatchGetDeletedWebApp(req *http.Request) (*http.Response, error) { + if g.srv.GetDeletedWebApp == nil { + return nil, &nonRetriableError{errors.New("fake for method GetDeletedWebApp not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/deletedSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 2 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + deletedSiteIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("deletedSiteId")]) + if err != nil { + return nil, err + } + respr, errRespr := g.srv.GetDeletedWebApp(req.Context(), deletedSiteIDParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).DeletedSite, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (g *GlobalServerTransport) dispatchGetDeletedWebAppSnapshots(req *http.Request) (*http.Response, error) { + if g.srv.GetDeletedWebAppSnapshots == nil { + return nil, &nonRetriableError{errors.New("fake for method GetDeletedWebAppSnapshots not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/deletedSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/snapshots` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 2 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + deletedSiteIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("deletedSiteId")]) + if err != nil { + return nil, err + } + respr, errRespr := g.srv.GetDeletedWebAppSnapshots(req.Context(), deletedSiteIDParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SnapshotArray, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (g *GlobalServerTransport) dispatchGetSubscriptionOperationWithAsyncResponse(req *http.Request) (*http.Response, error) { + if g.srv.GetSubscriptionOperationWithAsyncResponse == nil { + return nil, &nonRetriableError{errors.New("fake for method GetSubscriptionOperationWithAsyncResponse not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/operations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) + if err != nil { + return nil, err + } + operationIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("operationId")]) + if err != nil { + return nil, err + } + respr, errRespr := g.srv.GetSubscriptionOperationWithAsyncResponse(req.Context(), locationParam, operationIDParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/fake/internal.go b/sdk/resourcemanager/appservice/armappservice/fake/internal.go new file mode 100644 index 000000000000..72f540f217a1 --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/fake/internal.go @@ -0,0 +1,91 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" + "net/http" + "reflect" + "sync" +) + +type nonRetriableError struct { + error +} + +func (nonRetriableError) NonRetriable() { + // marker method +} + +func contains[T comparable](s []T, v T) bool { + for _, vv := range s { + if vv == v { + return true + } + } + return false +} + +func getOptional[T any](v T) *T { + if reflect.ValueOf(v).IsZero() { + return nil + } + return &v +} + +func parseOptional[T any](v string, parse func(v string) (T, error)) (*T, error) { + if v == "" { + return nil, nil + } + t, err := parse(v) + if err != nil { + return nil, err + } + return &t, err +} + +func parseWithCast[T any](v string, parse func(v string) (T, error)) (T, error) { + t, err := parse(v) + if err != nil { + return *new(T), err + } + return t, err +} + +func newTracker[T any]() *tracker[T] { + return &tracker[T]{ + items: map[string]*T{}, + } +} + +type tracker[T any] struct { + items map[string]*T + mu sync.Mutex +} + +func (p *tracker[T]) get(req *http.Request) *T { + p.mu.Lock() + defer p.mu.Unlock() + if item, ok := p.items[server.SanitizePagerPollerPath(req.URL.Path)]; ok { + return item + } + return nil +} + +func (p *tracker[T]) add(req *http.Request, item *T) { + p.mu.Lock() + defer p.mu.Unlock() + p.items[server.SanitizePagerPollerPath(req.URL.Path)] = item +} + +func (p *tracker[T]) remove(req *http.Request) { + p.mu.Lock() + defer p.mu.Unlock() + delete(p.items, server.SanitizePagerPollerPath(req.URL.Path)) +} diff --git a/sdk/resourcemanager/appservice/armappservice/fake/kubeenvironments_server.go b/sdk/resourcemanager/appservice/armappservice/fake/kubeenvironments_server.go new file mode 100644 index 000000000000..8495f1142962 --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/fake/kubeenvironments_server.go @@ -0,0 +1,340 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "context" + "errors" + "fmt" + azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" + "net/http" + "net/url" + "regexp" +) + +// KubeEnvironmentsServer is a fake server for instances of the armappservice.KubeEnvironmentsClient type. +type KubeEnvironmentsServer struct { + // BeginCreateOrUpdate is the fake for method KubeEnvironmentsClient.BeginCreateOrUpdate + // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated + BeginCreateOrUpdate func(ctx context.Context, resourceGroupName string, name string, kubeEnvironmentEnvelope armappservice.KubeEnvironment, options *armappservice.KubeEnvironmentsClientBeginCreateOrUpdateOptions) (resp azfake.PollerResponder[armappservice.KubeEnvironmentsClientCreateOrUpdateResponse], errResp azfake.ErrorResponder) + + // BeginDelete is the fake for method KubeEnvironmentsClient.BeginDelete + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent + BeginDelete func(ctx context.Context, resourceGroupName string, name string, options *armappservice.KubeEnvironmentsClientBeginDeleteOptions) (resp azfake.PollerResponder[armappservice.KubeEnvironmentsClientDeleteResponse], errResp azfake.ErrorResponder) + + // Get is the fake for method KubeEnvironmentsClient.Get + // HTTP status codes to indicate success: http.StatusOK + Get func(ctx context.Context, resourceGroupName string, name string, options *armappservice.KubeEnvironmentsClientGetOptions) (resp azfake.Responder[armappservice.KubeEnvironmentsClientGetResponse], errResp azfake.ErrorResponder) + + // NewListByResourceGroupPager is the fake for method KubeEnvironmentsClient.NewListByResourceGroupPager + // HTTP status codes to indicate success: http.StatusOK + NewListByResourceGroupPager func(resourceGroupName string, options *armappservice.KubeEnvironmentsClientListByResourceGroupOptions) (resp azfake.PagerResponder[armappservice.KubeEnvironmentsClientListByResourceGroupResponse]) + + // NewListBySubscriptionPager is the fake for method KubeEnvironmentsClient.NewListBySubscriptionPager + // HTTP status codes to indicate success: http.StatusOK + NewListBySubscriptionPager func(options *armappservice.KubeEnvironmentsClientListBySubscriptionOptions) (resp azfake.PagerResponder[armappservice.KubeEnvironmentsClientListBySubscriptionResponse]) + + // Update is the fake for method KubeEnvironmentsClient.Update + // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated + Update func(ctx context.Context, resourceGroupName string, name string, kubeEnvironmentEnvelope armappservice.KubeEnvironmentPatchResource, options *armappservice.KubeEnvironmentsClientUpdateOptions) (resp azfake.Responder[armappservice.KubeEnvironmentsClientUpdateResponse], errResp azfake.ErrorResponder) +} + +// NewKubeEnvironmentsServerTransport creates a new instance of KubeEnvironmentsServerTransport with the provided implementation. +// The returned KubeEnvironmentsServerTransport instance is connected to an instance of armappservice.KubeEnvironmentsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewKubeEnvironmentsServerTransport(srv *KubeEnvironmentsServer) *KubeEnvironmentsServerTransport { + return &KubeEnvironmentsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armappservice.KubeEnvironmentsClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armappservice.KubeEnvironmentsClientDeleteResponse]](), + newListByResourceGroupPager: newTracker[azfake.PagerResponder[armappservice.KubeEnvironmentsClientListByResourceGroupResponse]](), + newListBySubscriptionPager: newTracker[azfake.PagerResponder[armappservice.KubeEnvironmentsClientListBySubscriptionResponse]](), + } +} + +// KubeEnvironmentsServerTransport connects instances of armappservice.KubeEnvironmentsClient to instances of KubeEnvironmentsServer. +// Don't use this type directly, use NewKubeEnvironmentsServerTransport instead. +type KubeEnvironmentsServerTransport struct { + srv *KubeEnvironmentsServer + beginCreateOrUpdate *tracker[azfake.PollerResponder[armappservice.KubeEnvironmentsClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armappservice.KubeEnvironmentsClientDeleteResponse]] + newListByResourceGroupPager *tracker[azfake.PagerResponder[armappservice.KubeEnvironmentsClientListByResourceGroupResponse]] + newListBySubscriptionPager *tracker[azfake.PagerResponder[armappservice.KubeEnvironmentsClientListBySubscriptionResponse]] +} + +// Do implements the policy.Transporter interface for KubeEnvironmentsServerTransport. +func (k *KubeEnvironmentsServerTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + var resp *http.Response + var err error + + switch method { + case "KubeEnvironmentsClient.BeginCreateOrUpdate": + resp, err = k.dispatchBeginCreateOrUpdate(req) + case "KubeEnvironmentsClient.BeginDelete": + resp, err = k.dispatchBeginDelete(req) + case "KubeEnvironmentsClient.Get": + resp, err = k.dispatchGet(req) + case "KubeEnvironmentsClient.NewListByResourceGroupPager": + resp, err = k.dispatchNewListByResourceGroupPager(req) + case "KubeEnvironmentsClient.NewListBySubscriptionPager": + resp, err = k.dispatchNewListBySubscriptionPager(req) + case "KubeEnvironmentsClient.Update": + resp, err = k.dispatchUpdate(req) + default: + err = fmt.Errorf("unhandled API %s", method) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func (k *KubeEnvironmentsServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) (*http.Response, error) { + if k.srv.BeginCreateOrUpdate == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} + } + beginCreateOrUpdate := k.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/kubeEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.KubeEnvironment](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := k.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginCreateOrUpdate = &respr + k.beginCreateOrUpdate.add(req, beginCreateOrUpdate) + } + + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + k.beginCreateOrUpdate.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} + } + if !server.PollerResponderMore(beginCreateOrUpdate) { + k.beginCreateOrUpdate.remove(req) + } + + return resp, nil +} + +func (k *KubeEnvironmentsServerTransport) dispatchBeginDelete(req *http.Request) (*http.Response, error) { + if k.srv.BeginDelete == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} + } + beginDelete := k.beginDelete.get(req) + if beginDelete == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/kubeEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := k.srv.BeginDelete(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginDelete = &respr + k.beginDelete.add(req, beginDelete) + } + + resp, err := server.PollerResponderNext(beginDelete, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + k.beginDelete.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + } + if !server.PollerResponderMore(beginDelete) { + k.beginDelete.remove(req) + } + + return resp, nil +} + +func (k *KubeEnvironmentsServerTransport) dispatchGet(req *http.Request) (*http.Response, error) { + if k.srv.Get == nil { + return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/kubeEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := k.srv.Get(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).KubeEnvironment, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (k *KubeEnvironmentsServerTransport) dispatchNewListByResourceGroupPager(req *http.Request) (*http.Response, error) { + if k.srv.NewListByResourceGroupPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListByResourceGroupPager not implemented")} + } + newListByResourceGroupPager := k.newListByResourceGroupPager.get(req) + if newListByResourceGroupPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/kubeEnvironments` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 2 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + resp := k.srv.NewListByResourceGroupPager(resourceGroupNameParam, nil) + newListByResourceGroupPager = &resp + k.newListByResourceGroupPager.add(req, newListByResourceGroupPager) + server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armappservice.KubeEnvironmentsClientListByResourceGroupResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListByResourceGroupPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + k.newListByResourceGroupPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListByResourceGroupPager) { + k.newListByResourceGroupPager.remove(req) + } + return resp, nil +} + +func (k *KubeEnvironmentsServerTransport) dispatchNewListBySubscriptionPager(req *http.Request) (*http.Response, error) { + if k.srv.NewListBySubscriptionPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListBySubscriptionPager not implemented")} + } + newListBySubscriptionPager := k.newListBySubscriptionPager.get(req) + if newListBySubscriptionPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/kubeEnvironments` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 1 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resp := k.srv.NewListBySubscriptionPager(nil) + newListBySubscriptionPager = &resp + k.newListBySubscriptionPager.add(req, newListBySubscriptionPager) + server.PagerResponderInjectNextLinks(newListBySubscriptionPager, req, func(page *armappservice.KubeEnvironmentsClientListBySubscriptionResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListBySubscriptionPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + k.newListBySubscriptionPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListBySubscriptionPager) { + k.newListBySubscriptionPager.remove(req) + } + return resp, nil +} + +func (k *KubeEnvironmentsServerTransport) dispatchUpdate(req *http.Request) (*http.Response, error) { + if k.srv.Update == nil { + return nil, &nonRetriableError{errors.New("fake for method Update not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/kubeEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.KubeEnvironmentPatchResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := k.srv.Update(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusCreated}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).KubeEnvironment, req) + if err != nil { + return nil, err + } + return resp, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/fake/plans_server.go b/sdk/resourcemanager/appservice/armappservice/fake/plans_server.go new file mode 100644 index 000000000000..896e3f1810b2 --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/fake/plans_server.go @@ -0,0 +1,1357 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "context" + "errors" + "fmt" + azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" + "net/http" + "net/url" + "regexp" + "strconv" +) + +// PlansServer is a fake server for instances of the armappservice.PlansClient type. +type PlansServer struct { + // BeginCreateOrUpdate is the fake for method PlansClient.BeginCreateOrUpdate + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginCreateOrUpdate func(ctx context.Context, resourceGroupName string, name string, appServicePlan armappservice.Plan, options *armappservice.PlansClientBeginCreateOrUpdateOptions) (resp azfake.PollerResponder[armappservice.PlansClientCreateOrUpdateResponse], errResp azfake.ErrorResponder) + + // CreateOrUpdateVnetRoute is the fake for method PlansClient.CreateOrUpdateVnetRoute + // HTTP status codes to indicate success: http.StatusOK + CreateOrUpdateVnetRoute func(ctx context.Context, resourceGroupName string, name string, vnetName string, routeName string, route armappservice.VnetRoute, options *armappservice.PlansClientCreateOrUpdateVnetRouteOptions) (resp azfake.Responder[armappservice.PlansClientCreateOrUpdateVnetRouteResponse], errResp azfake.ErrorResponder) + + // Delete is the fake for method PlansClient.Delete + // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent + Delete func(ctx context.Context, resourceGroupName string, name string, options *armappservice.PlansClientDeleteOptions) (resp azfake.Responder[armappservice.PlansClientDeleteResponse], errResp azfake.ErrorResponder) + + // DeleteHybridConnection is the fake for method PlansClient.DeleteHybridConnection + // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent + DeleteHybridConnection func(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, options *armappservice.PlansClientDeleteHybridConnectionOptions) (resp azfake.Responder[armappservice.PlansClientDeleteHybridConnectionResponse], errResp azfake.ErrorResponder) + + // DeleteVnetRoute is the fake for method PlansClient.DeleteVnetRoute + // HTTP status codes to indicate success: http.StatusOK + DeleteVnetRoute func(ctx context.Context, resourceGroupName string, name string, vnetName string, routeName string, options *armappservice.PlansClientDeleteVnetRouteOptions) (resp azfake.Responder[armappservice.PlansClientDeleteVnetRouteResponse], errResp azfake.ErrorResponder) + + // Get is the fake for method PlansClient.Get + // HTTP status codes to indicate success: http.StatusOK + Get func(ctx context.Context, resourceGroupName string, name string, options *armappservice.PlansClientGetOptions) (resp azfake.Responder[armappservice.PlansClientGetResponse], errResp azfake.ErrorResponder) + + // GetHybridConnection is the fake for method PlansClient.GetHybridConnection + // HTTP status codes to indicate success: http.StatusOK + GetHybridConnection func(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, options *armappservice.PlansClientGetHybridConnectionOptions) (resp azfake.Responder[armappservice.PlansClientGetHybridConnectionResponse], errResp azfake.ErrorResponder) + + // GetHybridConnectionPlanLimit is the fake for method PlansClient.GetHybridConnectionPlanLimit + // HTTP status codes to indicate success: http.StatusOK + GetHybridConnectionPlanLimit func(ctx context.Context, resourceGroupName string, name string, options *armappservice.PlansClientGetHybridConnectionPlanLimitOptions) (resp azfake.Responder[armappservice.PlansClientGetHybridConnectionPlanLimitResponse], errResp azfake.ErrorResponder) + + // GetRouteForVnet is the fake for method PlansClient.GetRouteForVnet + // HTTP status codes to indicate success: http.StatusOK + GetRouteForVnet func(ctx context.Context, resourceGroupName string, name string, vnetName string, routeName string, options *armappservice.PlansClientGetRouteForVnetOptions) (resp azfake.Responder[armappservice.PlansClientGetRouteForVnetResponse], errResp azfake.ErrorResponder) + + // GetServerFarmSKUs is the fake for method PlansClient.GetServerFarmSKUs + // HTTP status codes to indicate success: http.StatusOK + GetServerFarmSKUs func(ctx context.Context, resourceGroupName string, name string, options *armappservice.PlansClientGetServerFarmSKUsOptions) (resp azfake.Responder[armappservice.PlansClientGetServerFarmSKUsResponse], errResp azfake.ErrorResponder) + + // GetVnetFromServerFarm is the fake for method PlansClient.GetVnetFromServerFarm + // HTTP status codes to indicate success: http.StatusOK + GetVnetFromServerFarm func(ctx context.Context, resourceGroupName string, name string, vnetName string, options *armappservice.PlansClientGetVnetFromServerFarmOptions) (resp azfake.Responder[armappservice.PlansClientGetVnetFromServerFarmResponse], errResp azfake.ErrorResponder) + + // GetVnetGateway is the fake for method PlansClient.GetVnetGateway + // HTTP status codes to indicate success: http.StatusOK + GetVnetGateway func(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, options *armappservice.PlansClientGetVnetGatewayOptions) (resp azfake.Responder[armappservice.PlansClientGetVnetGatewayResponse], errResp azfake.ErrorResponder) + + // NewListPager is the fake for method PlansClient.NewListPager + // HTTP status codes to indicate success: http.StatusOK + NewListPager func(options *armappservice.PlansClientListOptions) (resp azfake.PagerResponder[armappservice.PlansClientListResponse]) + + // NewListByResourceGroupPager is the fake for method PlansClient.NewListByResourceGroupPager + // HTTP status codes to indicate success: http.StatusOK + NewListByResourceGroupPager func(resourceGroupName string, options *armappservice.PlansClientListByResourceGroupOptions) (resp azfake.PagerResponder[armappservice.PlansClientListByResourceGroupResponse]) + + // ListCapabilities is the fake for method PlansClient.ListCapabilities + // HTTP status codes to indicate success: http.StatusOK + ListCapabilities func(ctx context.Context, resourceGroupName string, name string, options *armappservice.PlansClientListCapabilitiesOptions) (resp azfake.Responder[armappservice.PlansClientListCapabilitiesResponse], errResp azfake.ErrorResponder) + + // ListHybridConnectionKeys is the fake for method PlansClient.ListHybridConnectionKeys + // HTTP status codes to indicate success: http.StatusOK + ListHybridConnectionKeys func(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, options *armappservice.PlansClientListHybridConnectionKeysOptions) (resp azfake.Responder[armappservice.PlansClientListHybridConnectionKeysResponse], errResp azfake.ErrorResponder) + + // NewListHybridConnectionsPager is the fake for method PlansClient.NewListHybridConnectionsPager + // HTTP status codes to indicate success: http.StatusOK + NewListHybridConnectionsPager func(resourceGroupName string, name string, options *armappservice.PlansClientListHybridConnectionsOptions) (resp azfake.PagerResponder[armappservice.PlansClientListHybridConnectionsResponse]) + + // ListRoutesForVnet is the fake for method PlansClient.ListRoutesForVnet + // HTTP status codes to indicate success: http.StatusOK + ListRoutesForVnet func(ctx context.Context, resourceGroupName string, name string, vnetName string, options *armappservice.PlansClientListRoutesForVnetOptions) (resp azfake.Responder[armappservice.PlansClientListRoutesForVnetResponse], errResp azfake.ErrorResponder) + + // NewListUsagesPager is the fake for method PlansClient.NewListUsagesPager + // HTTP status codes to indicate success: http.StatusOK + NewListUsagesPager func(resourceGroupName string, name string, options *armappservice.PlansClientListUsagesOptions) (resp azfake.PagerResponder[armappservice.PlansClientListUsagesResponse]) + + // ListVnets is the fake for method PlansClient.ListVnets + // HTTP status codes to indicate success: http.StatusOK + ListVnets func(ctx context.Context, resourceGroupName string, name string, options *armappservice.PlansClientListVnetsOptions) (resp azfake.Responder[armappservice.PlansClientListVnetsResponse], errResp azfake.ErrorResponder) + + // NewListWebAppsPager is the fake for method PlansClient.NewListWebAppsPager + // HTTP status codes to indicate success: http.StatusOK + NewListWebAppsPager func(resourceGroupName string, name string, options *armappservice.PlansClientListWebAppsOptions) (resp azfake.PagerResponder[armappservice.PlansClientListWebAppsResponse]) + + // NewListWebAppsByHybridConnectionPager is the fake for method PlansClient.NewListWebAppsByHybridConnectionPager + // HTTP status codes to indicate success: http.StatusOK + NewListWebAppsByHybridConnectionPager func(resourceGroupName string, name string, namespaceName string, relayName string, options *armappservice.PlansClientListWebAppsByHybridConnectionOptions) (resp azfake.PagerResponder[armappservice.PlansClientListWebAppsByHybridConnectionResponse]) + + // RebootWorker is the fake for method PlansClient.RebootWorker + // HTTP status codes to indicate success: http.StatusNoContent + RebootWorker func(ctx context.Context, resourceGroupName string, name string, workerName string, options *armappservice.PlansClientRebootWorkerOptions) (resp azfake.Responder[armappservice.PlansClientRebootWorkerResponse], errResp azfake.ErrorResponder) + + // RestartWebApps is the fake for method PlansClient.RestartWebApps + // HTTP status codes to indicate success: http.StatusNoContent + RestartWebApps func(ctx context.Context, resourceGroupName string, name string, options *armappservice.PlansClientRestartWebAppsOptions) (resp azfake.Responder[armappservice.PlansClientRestartWebAppsResponse], errResp azfake.ErrorResponder) + + // Update is the fake for method PlansClient.Update + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + Update func(ctx context.Context, resourceGroupName string, name string, appServicePlan armappservice.PlanPatchResource, options *armappservice.PlansClientUpdateOptions) (resp azfake.Responder[armappservice.PlansClientUpdateResponse], errResp azfake.ErrorResponder) + + // UpdateVnetGateway is the fake for method PlansClient.UpdateVnetGateway + // HTTP status codes to indicate success: http.StatusOK + UpdateVnetGateway func(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope armappservice.VnetGateway, options *armappservice.PlansClientUpdateVnetGatewayOptions) (resp azfake.Responder[armappservice.PlansClientUpdateVnetGatewayResponse], errResp azfake.ErrorResponder) + + // UpdateVnetRoute is the fake for method PlansClient.UpdateVnetRoute + // HTTP status codes to indicate success: http.StatusOK + UpdateVnetRoute func(ctx context.Context, resourceGroupName string, name string, vnetName string, routeName string, route armappservice.VnetRoute, options *armappservice.PlansClientUpdateVnetRouteOptions) (resp azfake.Responder[armappservice.PlansClientUpdateVnetRouteResponse], errResp azfake.ErrorResponder) +} + +// NewPlansServerTransport creates a new instance of PlansServerTransport with the provided implementation. +// The returned PlansServerTransport instance is connected to an instance of armappservice.PlansClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewPlansServerTransport(srv *PlansServer) *PlansServerTransport { + return &PlansServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armappservice.PlansClientCreateOrUpdateResponse]](), + newListPager: newTracker[azfake.PagerResponder[armappservice.PlansClientListResponse]](), + newListByResourceGroupPager: newTracker[azfake.PagerResponder[armappservice.PlansClientListByResourceGroupResponse]](), + newListHybridConnectionsPager: newTracker[azfake.PagerResponder[armappservice.PlansClientListHybridConnectionsResponse]](), + newListUsagesPager: newTracker[azfake.PagerResponder[armappservice.PlansClientListUsagesResponse]](), + newListWebAppsPager: newTracker[azfake.PagerResponder[armappservice.PlansClientListWebAppsResponse]](), + newListWebAppsByHybridConnectionPager: newTracker[azfake.PagerResponder[armappservice.PlansClientListWebAppsByHybridConnectionResponse]](), + } +} + +// PlansServerTransport connects instances of armappservice.PlansClient to instances of PlansServer. +// Don't use this type directly, use NewPlansServerTransport instead. +type PlansServerTransport struct { + srv *PlansServer + beginCreateOrUpdate *tracker[azfake.PollerResponder[armappservice.PlansClientCreateOrUpdateResponse]] + newListPager *tracker[azfake.PagerResponder[armappservice.PlansClientListResponse]] + newListByResourceGroupPager *tracker[azfake.PagerResponder[armappservice.PlansClientListByResourceGroupResponse]] + newListHybridConnectionsPager *tracker[azfake.PagerResponder[armappservice.PlansClientListHybridConnectionsResponse]] + newListUsagesPager *tracker[azfake.PagerResponder[armappservice.PlansClientListUsagesResponse]] + newListWebAppsPager *tracker[azfake.PagerResponder[armappservice.PlansClientListWebAppsResponse]] + newListWebAppsByHybridConnectionPager *tracker[azfake.PagerResponder[armappservice.PlansClientListWebAppsByHybridConnectionResponse]] +} + +// Do implements the policy.Transporter interface for PlansServerTransport. +func (p *PlansServerTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + var resp *http.Response + var err error + + switch method { + case "PlansClient.BeginCreateOrUpdate": + resp, err = p.dispatchBeginCreateOrUpdate(req) + case "PlansClient.CreateOrUpdateVnetRoute": + resp, err = p.dispatchCreateOrUpdateVnetRoute(req) + case "PlansClient.Delete": + resp, err = p.dispatchDelete(req) + case "PlansClient.DeleteHybridConnection": + resp, err = p.dispatchDeleteHybridConnection(req) + case "PlansClient.DeleteVnetRoute": + resp, err = p.dispatchDeleteVnetRoute(req) + case "PlansClient.Get": + resp, err = p.dispatchGet(req) + case "PlansClient.GetHybridConnection": + resp, err = p.dispatchGetHybridConnection(req) + case "PlansClient.GetHybridConnectionPlanLimit": + resp, err = p.dispatchGetHybridConnectionPlanLimit(req) + case "PlansClient.GetRouteForVnet": + resp, err = p.dispatchGetRouteForVnet(req) + case "PlansClient.GetServerFarmSKUs": + resp, err = p.dispatchGetServerFarmSKUs(req) + case "PlansClient.GetVnetFromServerFarm": + resp, err = p.dispatchGetVnetFromServerFarm(req) + case "PlansClient.GetVnetGateway": + resp, err = p.dispatchGetVnetGateway(req) + case "PlansClient.NewListPager": + resp, err = p.dispatchNewListPager(req) + case "PlansClient.NewListByResourceGroupPager": + resp, err = p.dispatchNewListByResourceGroupPager(req) + case "PlansClient.ListCapabilities": + resp, err = p.dispatchListCapabilities(req) + case "PlansClient.ListHybridConnectionKeys": + resp, err = p.dispatchListHybridConnectionKeys(req) + case "PlansClient.NewListHybridConnectionsPager": + resp, err = p.dispatchNewListHybridConnectionsPager(req) + case "PlansClient.ListRoutesForVnet": + resp, err = p.dispatchListRoutesForVnet(req) + case "PlansClient.NewListUsagesPager": + resp, err = p.dispatchNewListUsagesPager(req) + case "PlansClient.ListVnets": + resp, err = p.dispatchListVnets(req) + case "PlansClient.NewListWebAppsPager": + resp, err = p.dispatchNewListWebAppsPager(req) + case "PlansClient.NewListWebAppsByHybridConnectionPager": + resp, err = p.dispatchNewListWebAppsByHybridConnectionPager(req) + case "PlansClient.RebootWorker": + resp, err = p.dispatchRebootWorker(req) + case "PlansClient.RestartWebApps": + resp, err = p.dispatchRestartWebApps(req) + case "PlansClient.Update": + resp, err = p.dispatchUpdate(req) + case "PlansClient.UpdateVnetGateway": + resp, err = p.dispatchUpdateVnetGateway(req) + case "PlansClient.UpdateVnetRoute": + resp, err = p.dispatchUpdateVnetRoute(req) + default: + err = fmt.Errorf("unhandled API %s", method) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func (p *PlansServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) (*http.Response, error) { + if p.srv.BeginCreateOrUpdate == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} + } + beginCreateOrUpdate := p.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/serverfarms/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.Plan](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := p.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginCreateOrUpdate = &respr + p.beginCreateOrUpdate.add(req, beginCreateOrUpdate) + } + + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + p.beginCreateOrUpdate.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginCreateOrUpdate) { + p.beginCreateOrUpdate.remove(req) + } + + return resp, nil +} + +func (p *PlansServerTransport) dispatchCreateOrUpdateVnetRoute(req *http.Request) (*http.Response, error) { + if p.srv.CreateOrUpdateVnetRoute == nil { + return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdateVnetRoute not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/serverfarms/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.VnetRoute](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + vnetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vnetName")]) + if err != nil { + return nil, err + } + routeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("routeName")]) + if err != nil { + return nil, err + } + respr, errRespr := p.srv.CreateOrUpdateVnetRoute(req.Context(), resourceGroupNameParam, nameParam, vnetNameParam, routeNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).VnetRoute, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (p *PlansServerTransport) dispatchDelete(req *http.Request) (*http.Response, error) { + if p.srv.Delete == nil { + return nil, &nonRetriableError{errors.New("fake for method Delete not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/serverfarms/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := p.srv.Delete(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (p *PlansServerTransport) dispatchDeleteHybridConnection(req *http.Request) (*http.Response, error) { + if p.srv.DeleteHybridConnection == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteHybridConnection not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/serverfarms/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hybridConnectionNamespaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/relays/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + namespaceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("namespaceName")]) + if err != nil { + return nil, err + } + relayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("relayName")]) + if err != nil { + return nil, err + } + respr, errRespr := p.srv.DeleteHybridConnection(req.Context(), resourceGroupNameParam, nameParam, namespaceNameParam, relayNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (p *PlansServerTransport) dispatchDeleteVnetRoute(req *http.Request) (*http.Response, error) { + if p.srv.DeleteVnetRoute == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteVnetRoute not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/serverfarms/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + vnetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vnetName")]) + if err != nil { + return nil, err + } + routeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("routeName")]) + if err != nil { + return nil, err + } + respr, errRespr := p.srv.DeleteVnetRoute(req.Context(), resourceGroupNameParam, nameParam, vnetNameParam, routeNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (p *PlansServerTransport) dispatchGet(req *http.Request) (*http.Response, error) { + if p.srv.Get == nil { + return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/serverfarms/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := p.srv.Get(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).Plan, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (p *PlansServerTransport) dispatchGetHybridConnection(req *http.Request) (*http.Response, error) { + if p.srv.GetHybridConnection == nil { + return nil, &nonRetriableError{errors.New("fake for method GetHybridConnection not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/serverfarms/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hybridConnectionNamespaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/relays/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + namespaceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("namespaceName")]) + if err != nil { + return nil, err + } + relayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("relayName")]) + if err != nil { + return nil, err + } + respr, errRespr := p.srv.GetHybridConnection(req.Context(), resourceGroupNameParam, nameParam, namespaceNameParam, relayNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).HybridConnection, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (p *PlansServerTransport) dispatchGetHybridConnectionPlanLimit(req *http.Request) (*http.Response, error) { + if p.srv.GetHybridConnectionPlanLimit == nil { + return nil, &nonRetriableError{errors.New("fake for method GetHybridConnectionPlanLimit not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/serverfarms/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hybridConnectionPlanLimits/limit` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := p.srv.GetHybridConnectionPlanLimit(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).HybridConnectionLimits, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (p *PlansServerTransport) dispatchGetRouteForVnet(req *http.Request) (*http.Response, error) { + if p.srv.GetRouteForVnet == nil { + return nil, &nonRetriableError{errors.New("fake for method GetRouteForVnet not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/serverfarms/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + vnetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vnetName")]) + if err != nil { + return nil, err + } + routeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("routeName")]) + if err != nil { + return nil, err + } + respr, errRespr := p.srv.GetRouteForVnet(req.Context(), resourceGroupNameParam, nameParam, vnetNameParam, routeNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).VnetRouteArray, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (p *PlansServerTransport) dispatchGetServerFarmSKUs(req *http.Request) (*http.Response, error) { + if p.srv.GetServerFarmSKUs == nil { + return nil, &nonRetriableError{errors.New("fake for method GetServerFarmSKUs not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/serverfarms/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/skus` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := p.srv.GetServerFarmSKUs(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).Interface, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (p *PlansServerTransport) dispatchGetVnetFromServerFarm(req *http.Request) (*http.Response, error) { + if p.srv.GetVnetFromServerFarm == nil { + return nil, &nonRetriableError{errors.New("fake for method GetVnetFromServerFarm not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/serverfarms/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + vnetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vnetName")]) + if err != nil { + return nil, err + } + respr, errRespr := p.srv.GetVnetFromServerFarm(req.Context(), resourceGroupNameParam, nameParam, vnetNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).VnetInfoResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (p *PlansServerTransport) dispatchGetVnetGateway(req *http.Request) (*http.Response, error) { + if p.srv.GetVnetGateway == nil { + return nil, &nonRetriableError{errors.New("fake for method GetVnetGateway not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/serverfarms/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/gateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + vnetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vnetName")]) + if err != nil { + return nil, err + } + gatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) + if err != nil { + return nil, err + } + respr, errRespr := p.srv.GetVnetGateway(req.Context(), resourceGroupNameParam, nameParam, vnetNameParam, gatewayNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).VnetGateway, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (p *PlansServerTransport) dispatchNewListPager(req *http.Request) (*http.Response, error) { + if p.srv.NewListPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} + } + newListPager := p.newListPager.get(req) + if newListPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/serverfarms` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 1 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + detailedUnescaped, err := url.QueryUnescape(qp.Get("detailed")) + if err != nil { + return nil, err + } + detailedParam, err := parseOptional(detailedUnescaped, strconv.ParseBool) + if err != nil { + return nil, err + } + var options *armappservice.PlansClientListOptions + if detailedParam != nil { + options = &armappservice.PlansClientListOptions{ + Detailed: detailedParam, + } + } + resp := p.srv.NewListPager(options) + newListPager = &resp + p.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armappservice.PlansClientListResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + p.newListPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListPager) { + p.newListPager.remove(req) + } + return resp, nil +} + +func (p *PlansServerTransport) dispatchNewListByResourceGroupPager(req *http.Request) (*http.Response, error) { + if p.srv.NewListByResourceGroupPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListByResourceGroupPager not implemented")} + } + newListByResourceGroupPager := p.newListByResourceGroupPager.get(req) + if newListByResourceGroupPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/serverfarms` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 2 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + resp := p.srv.NewListByResourceGroupPager(resourceGroupNameParam, nil) + newListByResourceGroupPager = &resp + p.newListByResourceGroupPager.add(req, newListByResourceGroupPager) + server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armappservice.PlansClientListByResourceGroupResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListByResourceGroupPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + p.newListByResourceGroupPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListByResourceGroupPager) { + p.newListByResourceGroupPager.remove(req) + } + return resp, nil +} + +func (p *PlansServerTransport) dispatchListCapabilities(req *http.Request) (*http.Response, error) { + if p.srv.ListCapabilities == nil { + return nil, &nonRetriableError{errors.New("fake for method ListCapabilities not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/serverfarms/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/capabilities` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := p.srv.ListCapabilities(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).CapabilityArray, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (p *PlansServerTransport) dispatchListHybridConnectionKeys(req *http.Request) (*http.Response, error) { + if p.srv.ListHybridConnectionKeys == nil { + return nil, &nonRetriableError{errors.New("fake for method ListHybridConnectionKeys not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/serverfarms/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hybridConnectionNamespaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/relays/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listKeys` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + namespaceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("namespaceName")]) + if err != nil { + return nil, err + } + relayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("relayName")]) + if err != nil { + return nil, err + } + respr, errRespr := p.srv.ListHybridConnectionKeys(req.Context(), resourceGroupNameParam, nameParam, namespaceNameParam, relayNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).HybridConnectionKey, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (p *PlansServerTransport) dispatchNewListHybridConnectionsPager(req *http.Request) (*http.Response, error) { + if p.srv.NewListHybridConnectionsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListHybridConnectionsPager not implemented")} + } + newListHybridConnectionsPager := p.newListHybridConnectionsPager.get(req) + if newListHybridConnectionsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/serverfarms/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hybridConnectionRelays` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := p.srv.NewListHybridConnectionsPager(resourceGroupNameParam, nameParam, nil) + newListHybridConnectionsPager = &resp + p.newListHybridConnectionsPager.add(req, newListHybridConnectionsPager) + server.PagerResponderInjectNextLinks(newListHybridConnectionsPager, req, func(page *armappservice.PlansClientListHybridConnectionsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListHybridConnectionsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + p.newListHybridConnectionsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListHybridConnectionsPager) { + p.newListHybridConnectionsPager.remove(req) + } + return resp, nil +} + +func (p *PlansServerTransport) dispatchListRoutesForVnet(req *http.Request) (*http.Response, error) { + if p.srv.ListRoutesForVnet == nil { + return nil, &nonRetriableError{errors.New("fake for method ListRoutesForVnet not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/serverfarms/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routes` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + vnetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vnetName")]) + if err != nil { + return nil, err + } + respr, errRespr := p.srv.ListRoutesForVnet(req.Context(), resourceGroupNameParam, nameParam, vnetNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).VnetRouteArray, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (p *PlansServerTransport) dispatchNewListUsagesPager(req *http.Request) (*http.Response, error) { + if p.srv.NewListUsagesPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListUsagesPager not implemented")} + } + newListUsagesPager := p.newListUsagesPager.get(req) + if newListUsagesPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/serverfarms/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/usages` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + filterUnescaped, err := url.QueryUnescape(qp.Get("$filter")) + if err != nil { + return nil, err + } + filterParam := getOptional(filterUnescaped) + var options *armappservice.PlansClientListUsagesOptions + if filterParam != nil { + options = &armappservice.PlansClientListUsagesOptions{ + Filter: filterParam, + } + } + resp := p.srv.NewListUsagesPager(resourceGroupNameParam, nameParam, options) + newListUsagesPager = &resp + p.newListUsagesPager.add(req, newListUsagesPager) + server.PagerResponderInjectNextLinks(newListUsagesPager, req, func(page *armappservice.PlansClientListUsagesResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListUsagesPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + p.newListUsagesPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListUsagesPager) { + p.newListUsagesPager.remove(req) + } + return resp, nil +} + +func (p *PlansServerTransport) dispatchListVnets(req *http.Request) (*http.Response, error) { + if p.srv.ListVnets == nil { + return nil, &nonRetriableError{errors.New("fake for method ListVnets not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/serverfarms/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkConnections` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := p.srv.ListVnets(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).VnetInfoResourceArray, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (p *PlansServerTransport) dispatchNewListWebAppsPager(req *http.Request) (*http.Response, error) { + if p.srv.NewListWebAppsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListWebAppsPager not implemented")} + } + newListWebAppsPager := p.newListWebAppsPager.get(req) + if newListWebAppsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/serverfarms/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/sites` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + skipTokenUnescaped, err := url.QueryUnescape(qp.Get("$skipToken")) + if err != nil { + return nil, err + } + skipTokenParam := getOptional(skipTokenUnescaped) + filterUnescaped, err := url.QueryUnescape(qp.Get("$filter")) + if err != nil { + return nil, err + } + filterParam := getOptional(filterUnescaped) + topUnescaped, err := url.QueryUnescape(qp.Get("$top")) + if err != nil { + return nil, err + } + topParam := getOptional(topUnescaped) + var options *armappservice.PlansClientListWebAppsOptions + if skipTokenParam != nil || filterParam != nil || topParam != nil { + options = &armappservice.PlansClientListWebAppsOptions{ + SkipToken: skipTokenParam, + Filter: filterParam, + Top: topParam, + } + } + resp := p.srv.NewListWebAppsPager(resourceGroupNameParam, nameParam, options) + newListWebAppsPager = &resp + p.newListWebAppsPager.add(req, newListWebAppsPager) + server.PagerResponderInjectNextLinks(newListWebAppsPager, req, func(page *armappservice.PlansClientListWebAppsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListWebAppsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + p.newListWebAppsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListWebAppsPager) { + p.newListWebAppsPager.remove(req) + } + return resp, nil +} + +func (p *PlansServerTransport) dispatchNewListWebAppsByHybridConnectionPager(req *http.Request) (*http.Response, error) { + if p.srv.NewListWebAppsByHybridConnectionPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListWebAppsByHybridConnectionPager not implemented")} + } + newListWebAppsByHybridConnectionPager := p.newListWebAppsByHybridConnectionPager.get(req) + if newListWebAppsByHybridConnectionPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/serverfarms/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hybridConnectionNamespaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/relays/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/sites` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + namespaceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("namespaceName")]) + if err != nil { + return nil, err + } + relayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("relayName")]) + if err != nil { + return nil, err + } + resp := p.srv.NewListWebAppsByHybridConnectionPager(resourceGroupNameParam, nameParam, namespaceNameParam, relayNameParam, nil) + newListWebAppsByHybridConnectionPager = &resp + p.newListWebAppsByHybridConnectionPager.add(req, newListWebAppsByHybridConnectionPager) + server.PagerResponderInjectNextLinks(newListWebAppsByHybridConnectionPager, req, func(page *armappservice.PlansClientListWebAppsByHybridConnectionResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListWebAppsByHybridConnectionPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + p.newListWebAppsByHybridConnectionPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListWebAppsByHybridConnectionPager) { + p.newListWebAppsByHybridConnectionPager.remove(req) + } + return resp, nil +} + +func (p *PlansServerTransport) dispatchRebootWorker(req *http.Request) (*http.Response, error) { + if p.srv.RebootWorker == nil { + return nil, &nonRetriableError{errors.New("fake for method RebootWorker not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/serverfarms/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/workers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/reboot` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + workerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("workerName")]) + if err != nil { + return nil, err + } + respr, errRespr := p.srv.RebootWorker(req.Context(), resourceGroupNameParam, nameParam, workerNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (p *PlansServerTransport) dispatchRestartWebApps(req *http.Request) (*http.Response, error) { + if p.srv.RestartWebApps == nil { + return nil, &nonRetriableError{errors.New("fake for method RestartWebApps not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/serverfarms/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/restartSites` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + softRestartUnescaped, err := url.QueryUnescape(qp.Get("softRestart")) + if err != nil { + return nil, err + } + softRestartParam, err := parseOptional(softRestartUnescaped, strconv.ParseBool) + if err != nil { + return nil, err + } + var options *armappservice.PlansClientRestartWebAppsOptions + if softRestartParam != nil { + options = &armappservice.PlansClientRestartWebAppsOptions{ + SoftRestart: softRestartParam, + } + } + respr, errRespr := p.srv.RestartWebApps(req.Context(), resourceGroupNameParam, nameParam, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (p *PlansServerTransport) dispatchUpdate(req *http.Request) (*http.Response, error) { + if p.srv.Update == nil { + return nil, &nonRetriableError{errors.New("fake for method Update not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/serverfarms/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.PlanPatchResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := p.srv.Update(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusAccepted}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).Plan, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (p *PlansServerTransport) dispatchUpdateVnetGateway(req *http.Request) (*http.Response, error) { + if p.srv.UpdateVnetGateway == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateVnetGateway not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/serverfarms/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/gateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.VnetGateway](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + vnetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vnetName")]) + if err != nil { + return nil, err + } + gatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) + if err != nil { + return nil, err + } + respr, errRespr := p.srv.UpdateVnetGateway(req.Context(), resourceGroupNameParam, nameParam, vnetNameParam, gatewayNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).VnetGateway, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (p *PlansServerTransport) dispatchUpdateVnetRoute(req *http.Request) (*http.Response, error) { + if p.srv.UpdateVnetRoute == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateVnetRoute not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/serverfarms/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.VnetRoute](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + vnetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vnetName")]) + if err != nil { + return nil, err + } + routeNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("routeName")]) + if err != nil { + return nil, err + } + respr, errRespr := p.srv.UpdateVnetRoute(req.Context(), resourceGroupNameParam, nameParam, vnetNameParam, routeNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).VnetRoute, req) + if err != nil { + return nil, err + } + return resp, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/fake/provider_server.go b/sdk/resourcemanager/appservice/armappservice/fake/provider_server.go new file mode 100644 index 000000000000..ccca43e81f96 --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/fake/provider_server.go @@ -0,0 +1,406 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "errors" + "fmt" + azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" + "net/http" + "net/url" + "regexp" +) + +// ProviderServer is a fake server for instances of the armappservice.ProviderClient type. +type ProviderServer struct { + // NewGetAvailableStacksPager is the fake for method ProviderClient.NewGetAvailableStacksPager + // HTTP status codes to indicate success: http.StatusOK + NewGetAvailableStacksPager func(options *armappservice.ProviderClientGetAvailableStacksOptions) (resp azfake.PagerResponder[armappservice.ProviderClientGetAvailableStacksResponse]) + + // NewGetAvailableStacksOnPremPager is the fake for method ProviderClient.NewGetAvailableStacksOnPremPager + // HTTP status codes to indicate success: http.StatusOK + NewGetAvailableStacksOnPremPager func(options *armappservice.ProviderClientGetAvailableStacksOnPremOptions) (resp azfake.PagerResponder[armappservice.ProviderClientGetAvailableStacksOnPremResponse]) + + // NewGetFunctionAppStacksPager is the fake for method ProviderClient.NewGetFunctionAppStacksPager + // HTTP status codes to indicate success: http.StatusOK + NewGetFunctionAppStacksPager func(options *armappservice.ProviderClientGetFunctionAppStacksOptions) (resp azfake.PagerResponder[armappservice.ProviderClientGetFunctionAppStacksResponse]) + + // NewGetFunctionAppStacksForLocationPager is the fake for method ProviderClient.NewGetFunctionAppStacksForLocationPager + // HTTP status codes to indicate success: http.StatusOK + NewGetFunctionAppStacksForLocationPager func(location string, options *armappservice.ProviderClientGetFunctionAppStacksForLocationOptions) (resp azfake.PagerResponder[armappservice.ProviderClientGetFunctionAppStacksForLocationResponse]) + + // NewGetWebAppStacksPager is the fake for method ProviderClient.NewGetWebAppStacksPager + // HTTP status codes to indicate success: http.StatusOK + NewGetWebAppStacksPager func(options *armappservice.ProviderClientGetWebAppStacksOptions) (resp azfake.PagerResponder[armappservice.ProviderClientGetWebAppStacksResponse]) + + // NewGetWebAppStacksForLocationPager is the fake for method ProviderClient.NewGetWebAppStacksForLocationPager + // HTTP status codes to indicate success: http.StatusOK + NewGetWebAppStacksForLocationPager func(location string, options *armappservice.ProviderClientGetWebAppStacksForLocationOptions) (resp azfake.PagerResponder[armappservice.ProviderClientGetWebAppStacksForLocationResponse]) + + // NewListOperationsPager is the fake for method ProviderClient.NewListOperationsPager + // HTTP status codes to indicate success: http.StatusOK + NewListOperationsPager func(options *armappservice.ProviderClientListOperationsOptions) (resp azfake.PagerResponder[armappservice.ProviderClientListOperationsResponse]) +} + +// NewProviderServerTransport creates a new instance of ProviderServerTransport with the provided implementation. +// The returned ProviderServerTransport instance is connected to an instance of armappservice.ProviderClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewProviderServerTransport(srv *ProviderServer) *ProviderServerTransport { + return &ProviderServerTransport{ + srv: srv, + newGetAvailableStacksPager: newTracker[azfake.PagerResponder[armappservice.ProviderClientGetAvailableStacksResponse]](), + newGetAvailableStacksOnPremPager: newTracker[azfake.PagerResponder[armappservice.ProviderClientGetAvailableStacksOnPremResponse]](), + newGetFunctionAppStacksPager: newTracker[azfake.PagerResponder[armappservice.ProviderClientGetFunctionAppStacksResponse]](), + newGetFunctionAppStacksForLocationPager: newTracker[azfake.PagerResponder[armappservice.ProviderClientGetFunctionAppStacksForLocationResponse]](), + newGetWebAppStacksPager: newTracker[azfake.PagerResponder[armappservice.ProviderClientGetWebAppStacksResponse]](), + newGetWebAppStacksForLocationPager: newTracker[azfake.PagerResponder[armappservice.ProviderClientGetWebAppStacksForLocationResponse]](), + newListOperationsPager: newTracker[azfake.PagerResponder[armappservice.ProviderClientListOperationsResponse]](), + } +} + +// ProviderServerTransport connects instances of armappservice.ProviderClient to instances of ProviderServer. +// Don't use this type directly, use NewProviderServerTransport instead. +type ProviderServerTransport struct { + srv *ProviderServer + newGetAvailableStacksPager *tracker[azfake.PagerResponder[armappservice.ProviderClientGetAvailableStacksResponse]] + newGetAvailableStacksOnPremPager *tracker[azfake.PagerResponder[armappservice.ProviderClientGetAvailableStacksOnPremResponse]] + newGetFunctionAppStacksPager *tracker[azfake.PagerResponder[armappservice.ProviderClientGetFunctionAppStacksResponse]] + newGetFunctionAppStacksForLocationPager *tracker[azfake.PagerResponder[armappservice.ProviderClientGetFunctionAppStacksForLocationResponse]] + newGetWebAppStacksPager *tracker[azfake.PagerResponder[armappservice.ProviderClientGetWebAppStacksResponse]] + newGetWebAppStacksForLocationPager *tracker[azfake.PagerResponder[armappservice.ProviderClientGetWebAppStacksForLocationResponse]] + newListOperationsPager *tracker[azfake.PagerResponder[armappservice.ProviderClientListOperationsResponse]] +} + +// Do implements the policy.Transporter interface for ProviderServerTransport. +func (p *ProviderServerTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + var resp *http.Response + var err error + + switch method { + case "ProviderClient.NewGetAvailableStacksPager": + resp, err = p.dispatchNewGetAvailableStacksPager(req) + case "ProviderClient.NewGetAvailableStacksOnPremPager": + resp, err = p.dispatchNewGetAvailableStacksOnPremPager(req) + case "ProviderClient.NewGetFunctionAppStacksPager": + resp, err = p.dispatchNewGetFunctionAppStacksPager(req) + case "ProviderClient.NewGetFunctionAppStacksForLocationPager": + resp, err = p.dispatchNewGetFunctionAppStacksForLocationPager(req) + case "ProviderClient.NewGetWebAppStacksPager": + resp, err = p.dispatchNewGetWebAppStacksPager(req) + case "ProviderClient.NewGetWebAppStacksForLocationPager": + resp, err = p.dispatchNewGetWebAppStacksForLocationPager(req) + case "ProviderClient.NewListOperationsPager": + resp, err = p.dispatchNewListOperationsPager(req) + default: + err = fmt.Errorf("unhandled API %s", method) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func (p *ProviderServerTransport) dispatchNewGetAvailableStacksPager(req *http.Request) (*http.Response, error) { + if p.srv.NewGetAvailableStacksPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewGetAvailableStacksPager not implemented")} + } + newGetAvailableStacksPager := p.newGetAvailableStacksPager.get(req) + if newGetAvailableStacksPager == nil { + qp := req.URL.Query() + oSTypeSelectedUnescaped, err := url.QueryUnescape(qp.Get("osTypeSelected")) + if err != nil { + return nil, err + } + oSTypeSelectedParam := getOptional(armappservice.ProviderOsTypeSelected(oSTypeSelectedUnescaped)) + var options *armappservice.ProviderClientGetAvailableStacksOptions + if oSTypeSelectedParam != nil { + options = &armappservice.ProviderClientGetAvailableStacksOptions{ + OSTypeSelected: oSTypeSelectedParam, + } + } + resp := p.srv.NewGetAvailableStacksPager(options) + newGetAvailableStacksPager = &resp + p.newGetAvailableStacksPager.add(req, newGetAvailableStacksPager) + server.PagerResponderInjectNextLinks(newGetAvailableStacksPager, req, func(page *armappservice.ProviderClientGetAvailableStacksResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newGetAvailableStacksPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + p.newGetAvailableStacksPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newGetAvailableStacksPager) { + p.newGetAvailableStacksPager.remove(req) + } + return resp, nil +} + +func (p *ProviderServerTransport) dispatchNewGetAvailableStacksOnPremPager(req *http.Request) (*http.Response, error) { + if p.srv.NewGetAvailableStacksOnPremPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewGetAvailableStacksOnPremPager not implemented")} + } + newGetAvailableStacksOnPremPager := p.newGetAvailableStacksOnPremPager.get(req) + if newGetAvailableStacksOnPremPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/availableStacks` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 1 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + oSTypeSelectedUnescaped, err := url.QueryUnescape(qp.Get("osTypeSelected")) + if err != nil { + return nil, err + } + oSTypeSelectedParam := getOptional(armappservice.ProviderOsTypeSelected(oSTypeSelectedUnescaped)) + var options *armappservice.ProviderClientGetAvailableStacksOnPremOptions + if oSTypeSelectedParam != nil { + options = &armappservice.ProviderClientGetAvailableStacksOnPremOptions{ + OSTypeSelected: oSTypeSelectedParam, + } + } + resp := p.srv.NewGetAvailableStacksOnPremPager(options) + newGetAvailableStacksOnPremPager = &resp + p.newGetAvailableStacksOnPremPager.add(req, newGetAvailableStacksOnPremPager) + server.PagerResponderInjectNextLinks(newGetAvailableStacksOnPremPager, req, func(page *armappservice.ProviderClientGetAvailableStacksOnPremResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newGetAvailableStacksOnPremPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + p.newGetAvailableStacksOnPremPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newGetAvailableStacksOnPremPager) { + p.newGetAvailableStacksOnPremPager.remove(req) + } + return resp, nil +} + +func (p *ProviderServerTransport) dispatchNewGetFunctionAppStacksPager(req *http.Request) (*http.Response, error) { + if p.srv.NewGetFunctionAppStacksPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewGetFunctionAppStacksPager not implemented")} + } + newGetFunctionAppStacksPager := p.newGetFunctionAppStacksPager.get(req) + if newGetFunctionAppStacksPager == nil { + qp := req.URL.Query() + stackOsTypeUnescaped, err := url.QueryUnescape(qp.Get("stackOsType")) + if err != nil { + return nil, err + } + stackOsTypeParam := getOptional(armappservice.ProviderStackOsType(stackOsTypeUnescaped)) + var options *armappservice.ProviderClientGetFunctionAppStacksOptions + if stackOsTypeParam != nil { + options = &armappservice.ProviderClientGetFunctionAppStacksOptions{ + StackOsType: stackOsTypeParam, + } + } + resp := p.srv.NewGetFunctionAppStacksPager(options) + newGetFunctionAppStacksPager = &resp + p.newGetFunctionAppStacksPager.add(req, newGetFunctionAppStacksPager) + server.PagerResponderInjectNextLinks(newGetFunctionAppStacksPager, req, func(page *armappservice.ProviderClientGetFunctionAppStacksResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newGetFunctionAppStacksPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + p.newGetFunctionAppStacksPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newGetFunctionAppStacksPager) { + p.newGetFunctionAppStacksPager.remove(req) + } + return resp, nil +} + +func (p *ProviderServerTransport) dispatchNewGetFunctionAppStacksForLocationPager(req *http.Request) (*http.Response, error) { + if p.srv.NewGetFunctionAppStacksForLocationPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewGetFunctionAppStacksForLocationPager not implemented")} + } + newGetFunctionAppStacksForLocationPager := p.newGetFunctionAppStacksForLocationPager.get(req) + if newGetFunctionAppStacksForLocationPager == nil { + const regexStr = `/providers/Microsoft\.Web/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/functionAppStacks` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 1 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) + if err != nil { + return nil, err + } + stackOsTypeUnescaped, err := url.QueryUnescape(qp.Get("stackOsType")) + if err != nil { + return nil, err + } + stackOsTypeParam := getOptional(armappservice.ProviderStackOsType(stackOsTypeUnescaped)) + var options *armappservice.ProviderClientGetFunctionAppStacksForLocationOptions + if stackOsTypeParam != nil { + options = &armappservice.ProviderClientGetFunctionAppStacksForLocationOptions{ + StackOsType: stackOsTypeParam, + } + } + resp := p.srv.NewGetFunctionAppStacksForLocationPager(locationParam, options) + newGetFunctionAppStacksForLocationPager = &resp + p.newGetFunctionAppStacksForLocationPager.add(req, newGetFunctionAppStacksForLocationPager) + server.PagerResponderInjectNextLinks(newGetFunctionAppStacksForLocationPager, req, func(page *armappservice.ProviderClientGetFunctionAppStacksForLocationResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newGetFunctionAppStacksForLocationPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + p.newGetFunctionAppStacksForLocationPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newGetFunctionAppStacksForLocationPager) { + p.newGetFunctionAppStacksForLocationPager.remove(req) + } + return resp, nil +} + +func (p *ProviderServerTransport) dispatchNewGetWebAppStacksPager(req *http.Request) (*http.Response, error) { + if p.srv.NewGetWebAppStacksPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewGetWebAppStacksPager not implemented")} + } + newGetWebAppStacksPager := p.newGetWebAppStacksPager.get(req) + if newGetWebAppStacksPager == nil { + qp := req.URL.Query() + stackOsTypeUnescaped, err := url.QueryUnescape(qp.Get("stackOsType")) + if err != nil { + return nil, err + } + stackOsTypeParam := getOptional(armappservice.ProviderStackOsType(stackOsTypeUnescaped)) + var options *armappservice.ProviderClientGetWebAppStacksOptions + if stackOsTypeParam != nil { + options = &armappservice.ProviderClientGetWebAppStacksOptions{ + StackOsType: stackOsTypeParam, + } + } + resp := p.srv.NewGetWebAppStacksPager(options) + newGetWebAppStacksPager = &resp + p.newGetWebAppStacksPager.add(req, newGetWebAppStacksPager) + server.PagerResponderInjectNextLinks(newGetWebAppStacksPager, req, func(page *armappservice.ProviderClientGetWebAppStacksResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newGetWebAppStacksPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + p.newGetWebAppStacksPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newGetWebAppStacksPager) { + p.newGetWebAppStacksPager.remove(req) + } + return resp, nil +} + +func (p *ProviderServerTransport) dispatchNewGetWebAppStacksForLocationPager(req *http.Request) (*http.Response, error) { + if p.srv.NewGetWebAppStacksForLocationPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewGetWebAppStacksForLocationPager not implemented")} + } + newGetWebAppStacksForLocationPager := p.newGetWebAppStacksForLocationPager.get(req) + if newGetWebAppStacksForLocationPager == nil { + const regexStr = `/providers/Microsoft\.Web/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/webAppStacks` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 1 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) + if err != nil { + return nil, err + } + stackOsTypeUnescaped, err := url.QueryUnescape(qp.Get("stackOsType")) + if err != nil { + return nil, err + } + stackOsTypeParam := getOptional(armappservice.ProviderStackOsType(stackOsTypeUnescaped)) + var options *armappservice.ProviderClientGetWebAppStacksForLocationOptions + if stackOsTypeParam != nil { + options = &armappservice.ProviderClientGetWebAppStacksForLocationOptions{ + StackOsType: stackOsTypeParam, + } + } + resp := p.srv.NewGetWebAppStacksForLocationPager(locationParam, options) + newGetWebAppStacksForLocationPager = &resp + p.newGetWebAppStacksForLocationPager.add(req, newGetWebAppStacksForLocationPager) + server.PagerResponderInjectNextLinks(newGetWebAppStacksForLocationPager, req, func(page *armappservice.ProviderClientGetWebAppStacksForLocationResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newGetWebAppStacksForLocationPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + p.newGetWebAppStacksForLocationPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newGetWebAppStacksForLocationPager) { + p.newGetWebAppStacksForLocationPager.remove(req) + } + return resp, nil +} + +func (p *ProviderServerTransport) dispatchNewListOperationsPager(req *http.Request) (*http.Response, error) { + if p.srv.NewListOperationsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListOperationsPager not implemented")} + } + newListOperationsPager := p.newListOperationsPager.get(req) + if newListOperationsPager == nil { + resp := p.srv.NewListOperationsPager(nil) + newListOperationsPager = &resp + p.newListOperationsPager.add(req, newListOperationsPager) + server.PagerResponderInjectNextLinks(newListOperationsPager, req, func(page *armappservice.ProviderClientListOperationsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListOperationsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + p.newListOperationsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListOperationsPager) { + p.newListOperationsPager.remove(req) + } + return resp, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/fake/recommendations_server.go b/sdk/resourcemanager/appservice/armappservice/fake/recommendations_server.go new file mode 100644 index 000000000000..4f8fb9f81e76 --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/fake/recommendations_server.go @@ -0,0 +1,858 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "context" + "errors" + "fmt" + azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" + "net/http" + "net/url" + "regexp" + "strconv" +) + +// RecommendationsServer is a fake server for instances of the armappservice.RecommendationsClient type. +type RecommendationsServer struct { + // DisableAllForHostingEnvironment is the fake for method RecommendationsClient.DisableAllForHostingEnvironment + // HTTP status codes to indicate success: http.StatusNoContent + DisableAllForHostingEnvironment func(ctx context.Context, resourceGroupName string, environmentName string, hostingEnvironmentName string, options *armappservice.RecommendationsClientDisableAllForHostingEnvironmentOptions) (resp azfake.Responder[armappservice.RecommendationsClientDisableAllForHostingEnvironmentResponse], errResp azfake.ErrorResponder) + + // DisableAllForWebApp is the fake for method RecommendationsClient.DisableAllForWebApp + // HTTP status codes to indicate success: http.StatusNoContent + DisableAllForWebApp func(ctx context.Context, resourceGroupName string, siteName string, options *armappservice.RecommendationsClientDisableAllForWebAppOptions) (resp azfake.Responder[armappservice.RecommendationsClientDisableAllForWebAppResponse], errResp azfake.ErrorResponder) + + // DisableRecommendationForHostingEnvironment is the fake for method RecommendationsClient.DisableRecommendationForHostingEnvironment + // HTTP status codes to indicate success: http.StatusOK + DisableRecommendationForHostingEnvironment func(ctx context.Context, resourceGroupName string, environmentName string, name string, hostingEnvironmentName string, options *armappservice.RecommendationsClientDisableRecommendationForHostingEnvironmentOptions) (resp azfake.Responder[armappservice.RecommendationsClientDisableRecommendationForHostingEnvironmentResponse], errResp azfake.ErrorResponder) + + // DisableRecommendationForSite is the fake for method RecommendationsClient.DisableRecommendationForSite + // HTTP status codes to indicate success: http.StatusOK + DisableRecommendationForSite func(ctx context.Context, resourceGroupName string, siteName string, name string, options *armappservice.RecommendationsClientDisableRecommendationForSiteOptions) (resp azfake.Responder[armappservice.RecommendationsClientDisableRecommendationForSiteResponse], errResp azfake.ErrorResponder) + + // DisableRecommendationForSubscription is the fake for method RecommendationsClient.DisableRecommendationForSubscription + // HTTP status codes to indicate success: http.StatusOK + DisableRecommendationForSubscription func(ctx context.Context, name string, options *armappservice.RecommendationsClientDisableRecommendationForSubscriptionOptions) (resp azfake.Responder[armappservice.RecommendationsClientDisableRecommendationForSubscriptionResponse], errResp azfake.ErrorResponder) + + // GetRuleDetailsByHostingEnvironment is the fake for method RecommendationsClient.GetRuleDetailsByHostingEnvironment + // HTTP status codes to indicate success: http.StatusOK + GetRuleDetailsByHostingEnvironment func(ctx context.Context, resourceGroupName string, hostingEnvironmentName string, name string, options *armappservice.RecommendationsClientGetRuleDetailsByHostingEnvironmentOptions) (resp azfake.Responder[armappservice.RecommendationsClientGetRuleDetailsByHostingEnvironmentResponse], errResp azfake.ErrorResponder) + + // GetRuleDetailsByWebApp is the fake for method RecommendationsClient.GetRuleDetailsByWebApp + // HTTP status codes to indicate success: http.StatusOK + GetRuleDetailsByWebApp func(ctx context.Context, resourceGroupName string, siteName string, name string, options *armappservice.RecommendationsClientGetRuleDetailsByWebAppOptions) (resp azfake.Responder[armappservice.RecommendationsClientGetRuleDetailsByWebAppResponse], errResp azfake.ErrorResponder) + + // NewListPager is the fake for method RecommendationsClient.NewListPager + // HTTP status codes to indicate success: http.StatusOK + NewListPager func(options *armappservice.RecommendationsClientListOptions) (resp azfake.PagerResponder[armappservice.RecommendationsClientListResponse]) + + // NewListHistoryForHostingEnvironmentPager is the fake for method RecommendationsClient.NewListHistoryForHostingEnvironmentPager + // HTTP status codes to indicate success: http.StatusOK + NewListHistoryForHostingEnvironmentPager func(resourceGroupName string, hostingEnvironmentName string, options *armappservice.RecommendationsClientListHistoryForHostingEnvironmentOptions) (resp azfake.PagerResponder[armappservice.RecommendationsClientListHistoryForHostingEnvironmentResponse]) + + // NewListHistoryForWebAppPager is the fake for method RecommendationsClient.NewListHistoryForWebAppPager + // HTTP status codes to indicate success: http.StatusOK + NewListHistoryForWebAppPager func(resourceGroupName string, siteName string, options *armappservice.RecommendationsClientListHistoryForWebAppOptions) (resp azfake.PagerResponder[armappservice.RecommendationsClientListHistoryForWebAppResponse]) + + // NewListRecommendedRulesForHostingEnvironmentPager is the fake for method RecommendationsClient.NewListRecommendedRulesForHostingEnvironmentPager + // HTTP status codes to indicate success: http.StatusOK + NewListRecommendedRulesForHostingEnvironmentPager func(resourceGroupName string, hostingEnvironmentName string, options *armappservice.RecommendationsClientListRecommendedRulesForHostingEnvironmentOptions) (resp azfake.PagerResponder[armappservice.RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse]) + + // NewListRecommendedRulesForWebAppPager is the fake for method RecommendationsClient.NewListRecommendedRulesForWebAppPager + // HTTP status codes to indicate success: http.StatusOK + NewListRecommendedRulesForWebAppPager func(resourceGroupName string, siteName string, options *armappservice.RecommendationsClientListRecommendedRulesForWebAppOptions) (resp azfake.PagerResponder[armappservice.RecommendationsClientListRecommendedRulesForWebAppResponse]) + + // ResetAllFilters is the fake for method RecommendationsClient.ResetAllFilters + // HTTP status codes to indicate success: http.StatusNoContent + ResetAllFilters func(ctx context.Context, options *armappservice.RecommendationsClientResetAllFiltersOptions) (resp azfake.Responder[armappservice.RecommendationsClientResetAllFiltersResponse], errResp azfake.ErrorResponder) + + // ResetAllFiltersForHostingEnvironment is the fake for method RecommendationsClient.ResetAllFiltersForHostingEnvironment + // HTTP status codes to indicate success: http.StatusNoContent + ResetAllFiltersForHostingEnvironment func(ctx context.Context, resourceGroupName string, environmentName string, hostingEnvironmentName string, options *armappservice.RecommendationsClientResetAllFiltersForHostingEnvironmentOptions) (resp azfake.Responder[armappservice.RecommendationsClientResetAllFiltersForHostingEnvironmentResponse], errResp azfake.ErrorResponder) + + // ResetAllFiltersForWebApp is the fake for method RecommendationsClient.ResetAllFiltersForWebApp + // HTTP status codes to indicate success: http.StatusNoContent + ResetAllFiltersForWebApp func(ctx context.Context, resourceGroupName string, siteName string, options *armappservice.RecommendationsClientResetAllFiltersForWebAppOptions) (resp azfake.Responder[armappservice.RecommendationsClientResetAllFiltersForWebAppResponse], errResp azfake.ErrorResponder) +} + +// NewRecommendationsServerTransport creates a new instance of RecommendationsServerTransport with the provided implementation. +// The returned RecommendationsServerTransport instance is connected to an instance of armappservice.RecommendationsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewRecommendationsServerTransport(srv *RecommendationsServer) *RecommendationsServerTransport { + return &RecommendationsServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armappservice.RecommendationsClientListResponse]](), + newListHistoryForHostingEnvironmentPager: newTracker[azfake.PagerResponder[armappservice.RecommendationsClientListHistoryForHostingEnvironmentResponse]](), + newListHistoryForWebAppPager: newTracker[azfake.PagerResponder[armappservice.RecommendationsClientListHistoryForWebAppResponse]](), + newListRecommendedRulesForHostingEnvironmentPager: newTracker[azfake.PagerResponder[armappservice.RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse]](), + newListRecommendedRulesForWebAppPager: newTracker[azfake.PagerResponder[armappservice.RecommendationsClientListRecommendedRulesForWebAppResponse]](), + } +} + +// RecommendationsServerTransport connects instances of armappservice.RecommendationsClient to instances of RecommendationsServer. +// Don't use this type directly, use NewRecommendationsServerTransport instead. +type RecommendationsServerTransport struct { + srv *RecommendationsServer + newListPager *tracker[azfake.PagerResponder[armappservice.RecommendationsClientListResponse]] + newListHistoryForHostingEnvironmentPager *tracker[azfake.PagerResponder[armappservice.RecommendationsClientListHistoryForHostingEnvironmentResponse]] + newListHistoryForWebAppPager *tracker[azfake.PagerResponder[armappservice.RecommendationsClientListHistoryForWebAppResponse]] + newListRecommendedRulesForHostingEnvironmentPager *tracker[azfake.PagerResponder[armappservice.RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse]] + newListRecommendedRulesForWebAppPager *tracker[azfake.PagerResponder[armappservice.RecommendationsClientListRecommendedRulesForWebAppResponse]] +} + +// Do implements the policy.Transporter interface for RecommendationsServerTransport. +func (r *RecommendationsServerTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + var resp *http.Response + var err error + + switch method { + case "RecommendationsClient.DisableAllForHostingEnvironment": + resp, err = r.dispatchDisableAllForHostingEnvironment(req) + case "RecommendationsClient.DisableAllForWebApp": + resp, err = r.dispatchDisableAllForWebApp(req) + case "RecommendationsClient.DisableRecommendationForHostingEnvironment": + resp, err = r.dispatchDisableRecommendationForHostingEnvironment(req) + case "RecommendationsClient.DisableRecommendationForSite": + resp, err = r.dispatchDisableRecommendationForSite(req) + case "RecommendationsClient.DisableRecommendationForSubscription": + resp, err = r.dispatchDisableRecommendationForSubscription(req) + case "RecommendationsClient.GetRuleDetailsByHostingEnvironment": + resp, err = r.dispatchGetRuleDetailsByHostingEnvironment(req) + case "RecommendationsClient.GetRuleDetailsByWebApp": + resp, err = r.dispatchGetRuleDetailsByWebApp(req) + case "RecommendationsClient.NewListPager": + resp, err = r.dispatchNewListPager(req) + case "RecommendationsClient.NewListHistoryForHostingEnvironmentPager": + resp, err = r.dispatchNewListHistoryForHostingEnvironmentPager(req) + case "RecommendationsClient.NewListHistoryForWebAppPager": + resp, err = r.dispatchNewListHistoryForWebAppPager(req) + case "RecommendationsClient.NewListRecommendedRulesForHostingEnvironmentPager": + resp, err = r.dispatchNewListRecommendedRulesForHostingEnvironmentPager(req) + case "RecommendationsClient.NewListRecommendedRulesForWebAppPager": + resp, err = r.dispatchNewListRecommendedRulesForWebAppPager(req) + case "RecommendationsClient.ResetAllFilters": + resp, err = r.dispatchResetAllFilters(req) + case "RecommendationsClient.ResetAllFiltersForHostingEnvironment": + resp, err = r.dispatchResetAllFiltersForHostingEnvironment(req) + case "RecommendationsClient.ResetAllFiltersForWebApp": + resp, err = r.dispatchResetAllFiltersForWebApp(req) + default: + err = fmt.Errorf("unhandled API %s", method) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func (r *RecommendationsServerTransport) dispatchDisableAllForHostingEnvironment(req *http.Request) (*http.Response, error) { + if r.srv.DisableAllForHostingEnvironment == nil { + return nil, &nonRetriableError{errors.New("fake for method DisableAllForHostingEnvironment not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/recommendations/disable` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + environmentNameParam, err := url.QueryUnescape(qp.Get("environmentName")) + if err != nil { + return nil, err + } + hostingEnvironmentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("hostingEnvironmentName")]) + if err != nil { + return nil, err + } + respr, errRespr := r.srv.DisableAllForHostingEnvironment(req.Context(), resourceGroupNameParam, environmentNameParam, hostingEnvironmentNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (r *RecommendationsServerTransport) dispatchDisableAllForWebApp(req *http.Request) (*http.Response, error) { + if r.srv.DisableAllForWebApp == nil { + return nil, &nonRetriableError{errors.New("fake for method DisableAllForWebApp not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/recommendations/disable` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + siteNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("siteName")]) + if err != nil { + return nil, err + } + respr, errRespr := r.srv.DisableAllForWebApp(req.Context(), resourceGroupNameParam, siteNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (r *RecommendationsServerTransport) dispatchDisableRecommendationForHostingEnvironment(req *http.Request) (*http.Response, error) { + if r.srv.DisableRecommendationForHostingEnvironment == nil { + return nil, &nonRetriableError{errors.New("fake for method DisableRecommendationForHostingEnvironment not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/recommendations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/disable` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + environmentNameParam, err := url.QueryUnescape(qp.Get("environmentName")) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + hostingEnvironmentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("hostingEnvironmentName")]) + if err != nil { + return nil, err + } + respr, errRespr := r.srv.DisableRecommendationForHostingEnvironment(req.Context(), resourceGroupNameParam, environmentNameParam, nameParam, hostingEnvironmentNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (r *RecommendationsServerTransport) dispatchDisableRecommendationForSite(req *http.Request) (*http.Response, error) { + if r.srv.DisableRecommendationForSite == nil { + return nil, &nonRetriableError{errors.New("fake for method DisableRecommendationForSite not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/recommendations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/disable` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + siteNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("siteName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := r.srv.DisableRecommendationForSite(req.Context(), resourceGroupNameParam, siteNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (r *RecommendationsServerTransport) dispatchDisableRecommendationForSubscription(req *http.Request) (*http.Response, error) { + if r.srv.DisableRecommendationForSubscription == nil { + return nil, &nonRetriableError{errors.New("fake for method DisableRecommendationForSubscription not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/recommendations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/disable` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 2 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := r.srv.DisableRecommendationForSubscription(req.Context(), nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (r *RecommendationsServerTransport) dispatchGetRuleDetailsByHostingEnvironment(req *http.Request) (*http.Response, error) { + if r.srv.GetRuleDetailsByHostingEnvironment == nil { + return nil, &nonRetriableError{errors.New("fake for method GetRuleDetailsByHostingEnvironment not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/recommendations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + hostingEnvironmentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("hostingEnvironmentName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + updateSeenUnescaped, err := url.QueryUnescape(qp.Get("updateSeen")) + if err != nil { + return nil, err + } + updateSeenParam, err := parseOptional(updateSeenUnescaped, strconv.ParseBool) + if err != nil { + return nil, err + } + recommendationIDUnescaped, err := url.QueryUnescape(qp.Get("recommendationId")) + if err != nil { + return nil, err + } + recommendationIDParam := getOptional(recommendationIDUnescaped) + var options *armappservice.RecommendationsClientGetRuleDetailsByHostingEnvironmentOptions + if updateSeenParam != nil || recommendationIDParam != nil { + options = &armappservice.RecommendationsClientGetRuleDetailsByHostingEnvironmentOptions{ + UpdateSeen: updateSeenParam, + RecommendationID: recommendationIDParam, + } + } + respr, errRespr := r.srv.GetRuleDetailsByHostingEnvironment(req.Context(), resourceGroupNameParam, hostingEnvironmentNameParam, nameParam, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).RecommendationRule, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (r *RecommendationsServerTransport) dispatchGetRuleDetailsByWebApp(req *http.Request) (*http.Response, error) { + if r.srv.GetRuleDetailsByWebApp == nil { + return nil, &nonRetriableError{errors.New("fake for method GetRuleDetailsByWebApp not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/recommendations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + siteNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("siteName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + updateSeenUnescaped, err := url.QueryUnescape(qp.Get("updateSeen")) + if err != nil { + return nil, err + } + updateSeenParam, err := parseOptional(updateSeenUnescaped, strconv.ParseBool) + if err != nil { + return nil, err + } + recommendationIDUnescaped, err := url.QueryUnescape(qp.Get("recommendationId")) + if err != nil { + return nil, err + } + recommendationIDParam := getOptional(recommendationIDUnescaped) + var options *armappservice.RecommendationsClientGetRuleDetailsByWebAppOptions + if updateSeenParam != nil || recommendationIDParam != nil { + options = &armappservice.RecommendationsClientGetRuleDetailsByWebAppOptions{ + UpdateSeen: updateSeenParam, + RecommendationID: recommendationIDParam, + } + } + respr, errRespr := r.srv.GetRuleDetailsByWebApp(req.Context(), resourceGroupNameParam, siteNameParam, nameParam, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).RecommendationRule, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (r *RecommendationsServerTransport) dispatchNewListPager(req *http.Request) (*http.Response, error) { + if r.srv.NewListPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} + } + newListPager := r.newListPager.get(req) + if newListPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/recommendations` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 1 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + featuredUnescaped, err := url.QueryUnescape(qp.Get("featured")) + if err != nil { + return nil, err + } + featuredParam, err := parseOptional(featuredUnescaped, strconv.ParseBool) + if err != nil { + return nil, err + } + filterUnescaped, err := url.QueryUnescape(qp.Get("$filter")) + if err != nil { + return nil, err + } + filterParam := getOptional(filterUnescaped) + var options *armappservice.RecommendationsClientListOptions + if featuredParam != nil || filterParam != nil { + options = &armappservice.RecommendationsClientListOptions{ + Featured: featuredParam, + Filter: filterParam, + } + } + resp := r.srv.NewListPager(options) + newListPager = &resp + r.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armappservice.RecommendationsClientListResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + r.newListPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListPager) { + r.newListPager.remove(req) + } + return resp, nil +} + +func (r *RecommendationsServerTransport) dispatchNewListHistoryForHostingEnvironmentPager(req *http.Request) (*http.Response, error) { + if r.srv.NewListHistoryForHostingEnvironmentPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListHistoryForHostingEnvironmentPager not implemented")} + } + newListHistoryForHostingEnvironmentPager := r.newListHistoryForHostingEnvironmentPager.get(req) + if newListHistoryForHostingEnvironmentPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/recommendationHistory` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + hostingEnvironmentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("hostingEnvironmentName")]) + if err != nil { + return nil, err + } + expiredOnlyUnescaped, err := url.QueryUnescape(qp.Get("expiredOnly")) + if err != nil { + return nil, err + } + expiredOnlyParam, err := parseOptional(expiredOnlyUnescaped, strconv.ParseBool) + if err != nil { + return nil, err + } + filterUnescaped, err := url.QueryUnescape(qp.Get("$filter")) + if err != nil { + return nil, err + } + filterParam := getOptional(filterUnescaped) + var options *armappservice.RecommendationsClientListHistoryForHostingEnvironmentOptions + if expiredOnlyParam != nil || filterParam != nil { + options = &armappservice.RecommendationsClientListHistoryForHostingEnvironmentOptions{ + ExpiredOnly: expiredOnlyParam, + Filter: filterParam, + } + } + resp := r.srv.NewListHistoryForHostingEnvironmentPager(resourceGroupNameParam, hostingEnvironmentNameParam, options) + newListHistoryForHostingEnvironmentPager = &resp + r.newListHistoryForHostingEnvironmentPager.add(req, newListHistoryForHostingEnvironmentPager) + server.PagerResponderInjectNextLinks(newListHistoryForHostingEnvironmentPager, req, func(page *armappservice.RecommendationsClientListHistoryForHostingEnvironmentResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListHistoryForHostingEnvironmentPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + r.newListHistoryForHostingEnvironmentPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListHistoryForHostingEnvironmentPager) { + r.newListHistoryForHostingEnvironmentPager.remove(req) + } + return resp, nil +} + +func (r *RecommendationsServerTransport) dispatchNewListHistoryForWebAppPager(req *http.Request) (*http.Response, error) { + if r.srv.NewListHistoryForWebAppPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListHistoryForWebAppPager not implemented")} + } + newListHistoryForWebAppPager := r.newListHistoryForWebAppPager.get(req) + if newListHistoryForWebAppPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/recommendationHistory` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + siteNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("siteName")]) + if err != nil { + return nil, err + } + expiredOnlyUnescaped, err := url.QueryUnescape(qp.Get("expiredOnly")) + if err != nil { + return nil, err + } + expiredOnlyParam, err := parseOptional(expiredOnlyUnescaped, strconv.ParseBool) + if err != nil { + return nil, err + } + filterUnescaped, err := url.QueryUnescape(qp.Get("$filter")) + if err != nil { + return nil, err + } + filterParam := getOptional(filterUnescaped) + var options *armappservice.RecommendationsClientListHistoryForWebAppOptions + if expiredOnlyParam != nil || filterParam != nil { + options = &armappservice.RecommendationsClientListHistoryForWebAppOptions{ + ExpiredOnly: expiredOnlyParam, + Filter: filterParam, + } + } + resp := r.srv.NewListHistoryForWebAppPager(resourceGroupNameParam, siteNameParam, options) + newListHistoryForWebAppPager = &resp + r.newListHistoryForWebAppPager.add(req, newListHistoryForWebAppPager) + server.PagerResponderInjectNextLinks(newListHistoryForWebAppPager, req, func(page *armappservice.RecommendationsClientListHistoryForWebAppResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListHistoryForWebAppPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + r.newListHistoryForWebAppPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListHistoryForWebAppPager) { + r.newListHistoryForWebAppPager.remove(req) + } + return resp, nil +} + +func (r *RecommendationsServerTransport) dispatchNewListRecommendedRulesForHostingEnvironmentPager(req *http.Request) (*http.Response, error) { + if r.srv.NewListRecommendedRulesForHostingEnvironmentPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListRecommendedRulesForHostingEnvironmentPager not implemented")} + } + newListRecommendedRulesForHostingEnvironmentPager := r.newListRecommendedRulesForHostingEnvironmentPager.get(req) + if newListRecommendedRulesForHostingEnvironmentPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/recommendations` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + hostingEnvironmentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("hostingEnvironmentName")]) + if err != nil { + return nil, err + } + featuredUnescaped, err := url.QueryUnescape(qp.Get("featured")) + if err != nil { + return nil, err + } + featuredParam, err := parseOptional(featuredUnescaped, strconv.ParseBool) + if err != nil { + return nil, err + } + filterUnescaped, err := url.QueryUnescape(qp.Get("$filter")) + if err != nil { + return nil, err + } + filterParam := getOptional(filterUnescaped) + var options *armappservice.RecommendationsClientListRecommendedRulesForHostingEnvironmentOptions + if featuredParam != nil || filterParam != nil { + options = &armappservice.RecommendationsClientListRecommendedRulesForHostingEnvironmentOptions{ + Featured: featuredParam, + Filter: filterParam, + } + } + resp := r.srv.NewListRecommendedRulesForHostingEnvironmentPager(resourceGroupNameParam, hostingEnvironmentNameParam, options) + newListRecommendedRulesForHostingEnvironmentPager = &resp + r.newListRecommendedRulesForHostingEnvironmentPager.add(req, newListRecommendedRulesForHostingEnvironmentPager) + server.PagerResponderInjectNextLinks(newListRecommendedRulesForHostingEnvironmentPager, req, func(page *armappservice.RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListRecommendedRulesForHostingEnvironmentPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + r.newListRecommendedRulesForHostingEnvironmentPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListRecommendedRulesForHostingEnvironmentPager) { + r.newListRecommendedRulesForHostingEnvironmentPager.remove(req) + } + return resp, nil +} + +func (r *RecommendationsServerTransport) dispatchNewListRecommendedRulesForWebAppPager(req *http.Request) (*http.Response, error) { + if r.srv.NewListRecommendedRulesForWebAppPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListRecommendedRulesForWebAppPager not implemented")} + } + newListRecommendedRulesForWebAppPager := r.newListRecommendedRulesForWebAppPager.get(req) + if newListRecommendedRulesForWebAppPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/recommendations` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + siteNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("siteName")]) + if err != nil { + return nil, err + } + featuredUnescaped, err := url.QueryUnescape(qp.Get("featured")) + if err != nil { + return nil, err + } + featuredParam, err := parseOptional(featuredUnescaped, strconv.ParseBool) + if err != nil { + return nil, err + } + filterUnescaped, err := url.QueryUnescape(qp.Get("$filter")) + if err != nil { + return nil, err + } + filterParam := getOptional(filterUnescaped) + var options *armappservice.RecommendationsClientListRecommendedRulesForWebAppOptions + if featuredParam != nil || filterParam != nil { + options = &armappservice.RecommendationsClientListRecommendedRulesForWebAppOptions{ + Featured: featuredParam, + Filter: filterParam, + } + } + resp := r.srv.NewListRecommendedRulesForWebAppPager(resourceGroupNameParam, siteNameParam, options) + newListRecommendedRulesForWebAppPager = &resp + r.newListRecommendedRulesForWebAppPager.add(req, newListRecommendedRulesForWebAppPager) + server.PagerResponderInjectNextLinks(newListRecommendedRulesForWebAppPager, req, func(page *armappservice.RecommendationsClientListRecommendedRulesForWebAppResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListRecommendedRulesForWebAppPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + r.newListRecommendedRulesForWebAppPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListRecommendedRulesForWebAppPager) { + r.newListRecommendedRulesForWebAppPager.remove(req) + } + return resp, nil +} + +func (r *RecommendationsServerTransport) dispatchResetAllFilters(req *http.Request) (*http.Response, error) { + if r.srv.ResetAllFilters == nil { + return nil, &nonRetriableError{errors.New("fake for method ResetAllFilters not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/recommendations/reset` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 1 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + respr, errRespr := r.srv.ResetAllFilters(req.Context(), nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (r *RecommendationsServerTransport) dispatchResetAllFiltersForHostingEnvironment(req *http.Request) (*http.Response, error) { + if r.srv.ResetAllFiltersForHostingEnvironment == nil { + return nil, &nonRetriableError{errors.New("fake for method ResetAllFiltersForHostingEnvironment not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/hostingEnvironments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/recommendations/reset` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + environmentNameParam, err := url.QueryUnescape(qp.Get("environmentName")) + if err != nil { + return nil, err + } + hostingEnvironmentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("hostingEnvironmentName")]) + if err != nil { + return nil, err + } + respr, errRespr := r.srv.ResetAllFiltersForHostingEnvironment(req.Context(), resourceGroupNameParam, environmentNameParam, hostingEnvironmentNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (r *RecommendationsServerTransport) dispatchResetAllFiltersForWebApp(req *http.Request) (*http.Response, error) { + if r.srv.ResetAllFiltersForWebApp == nil { + return nil, &nonRetriableError{errors.New("fake for method ResetAllFiltersForWebApp not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/recommendations/reset` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + siteNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("siteName")]) + if err != nil { + return nil, err + } + respr, errRespr := r.srv.ResetAllFiltersForWebApp(req.Context(), resourceGroupNameParam, siteNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/fake/resourcehealthmetadata_server.go b/sdk/resourcemanager/appservice/armappservice/fake/resourcehealthmetadata_server.go new file mode 100644 index 000000000000..ed8aefe70f33 --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/fake/resourcehealthmetadata_server.go @@ -0,0 +1,334 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "context" + "errors" + "fmt" + azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" + "net/http" + "net/url" + "regexp" +) + +// ResourceHealthMetadataServer is a fake server for instances of the armappservice.ResourceHealthMetadataClient type. +type ResourceHealthMetadataServer struct { + // GetBySite is the fake for method ResourceHealthMetadataClient.GetBySite + // HTTP status codes to indicate success: http.StatusOK + GetBySite func(ctx context.Context, resourceGroupName string, name string, options *armappservice.ResourceHealthMetadataClientGetBySiteOptions) (resp azfake.Responder[armappservice.ResourceHealthMetadataClientGetBySiteResponse], errResp azfake.ErrorResponder) + + // GetBySiteSlot is the fake for method ResourceHealthMetadataClient.GetBySiteSlot + // HTTP status codes to indicate success: http.StatusOK + GetBySiteSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.ResourceHealthMetadataClientGetBySiteSlotOptions) (resp azfake.Responder[armappservice.ResourceHealthMetadataClientGetBySiteSlotResponse], errResp azfake.ErrorResponder) + + // NewListPager is the fake for method ResourceHealthMetadataClient.NewListPager + // HTTP status codes to indicate success: http.StatusOK + NewListPager func(options *armappservice.ResourceHealthMetadataClientListOptions) (resp azfake.PagerResponder[armappservice.ResourceHealthMetadataClientListResponse]) + + // NewListByResourceGroupPager is the fake for method ResourceHealthMetadataClient.NewListByResourceGroupPager + // HTTP status codes to indicate success: http.StatusOK + NewListByResourceGroupPager func(resourceGroupName string, options *armappservice.ResourceHealthMetadataClientListByResourceGroupOptions) (resp azfake.PagerResponder[armappservice.ResourceHealthMetadataClientListByResourceGroupResponse]) + + // NewListBySitePager is the fake for method ResourceHealthMetadataClient.NewListBySitePager + // HTTP status codes to indicate success: http.StatusOK + NewListBySitePager func(resourceGroupName string, name string, options *armappservice.ResourceHealthMetadataClientListBySiteOptions) (resp azfake.PagerResponder[armappservice.ResourceHealthMetadataClientListBySiteResponse]) + + // NewListBySiteSlotPager is the fake for method ResourceHealthMetadataClient.NewListBySiteSlotPager + // HTTP status codes to indicate success: http.StatusOK + NewListBySiteSlotPager func(resourceGroupName string, name string, slot string, options *armappservice.ResourceHealthMetadataClientListBySiteSlotOptions) (resp azfake.PagerResponder[armappservice.ResourceHealthMetadataClientListBySiteSlotResponse]) +} + +// NewResourceHealthMetadataServerTransport creates a new instance of ResourceHealthMetadataServerTransport with the provided implementation. +// The returned ResourceHealthMetadataServerTransport instance is connected to an instance of armappservice.ResourceHealthMetadataClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewResourceHealthMetadataServerTransport(srv *ResourceHealthMetadataServer) *ResourceHealthMetadataServerTransport { + return &ResourceHealthMetadataServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armappservice.ResourceHealthMetadataClientListResponse]](), + newListByResourceGroupPager: newTracker[azfake.PagerResponder[armappservice.ResourceHealthMetadataClientListByResourceGroupResponse]](), + newListBySitePager: newTracker[azfake.PagerResponder[armappservice.ResourceHealthMetadataClientListBySiteResponse]](), + newListBySiteSlotPager: newTracker[azfake.PagerResponder[armappservice.ResourceHealthMetadataClientListBySiteSlotResponse]](), + } +} + +// ResourceHealthMetadataServerTransport connects instances of armappservice.ResourceHealthMetadataClient to instances of ResourceHealthMetadataServer. +// Don't use this type directly, use NewResourceHealthMetadataServerTransport instead. +type ResourceHealthMetadataServerTransport struct { + srv *ResourceHealthMetadataServer + newListPager *tracker[azfake.PagerResponder[armappservice.ResourceHealthMetadataClientListResponse]] + newListByResourceGroupPager *tracker[azfake.PagerResponder[armappservice.ResourceHealthMetadataClientListByResourceGroupResponse]] + newListBySitePager *tracker[azfake.PagerResponder[armappservice.ResourceHealthMetadataClientListBySiteResponse]] + newListBySiteSlotPager *tracker[azfake.PagerResponder[armappservice.ResourceHealthMetadataClientListBySiteSlotResponse]] +} + +// Do implements the policy.Transporter interface for ResourceHealthMetadataServerTransport. +func (r *ResourceHealthMetadataServerTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + var resp *http.Response + var err error + + switch method { + case "ResourceHealthMetadataClient.GetBySite": + resp, err = r.dispatchGetBySite(req) + case "ResourceHealthMetadataClient.GetBySiteSlot": + resp, err = r.dispatchGetBySiteSlot(req) + case "ResourceHealthMetadataClient.NewListPager": + resp, err = r.dispatchNewListPager(req) + case "ResourceHealthMetadataClient.NewListByResourceGroupPager": + resp, err = r.dispatchNewListByResourceGroupPager(req) + case "ResourceHealthMetadataClient.NewListBySitePager": + resp, err = r.dispatchNewListBySitePager(req) + case "ResourceHealthMetadataClient.NewListBySiteSlotPager": + resp, err = r.dispatchNewListBySiteSlotPager(req) + default: + err = fmt.Errorf("unhandled API %s", method) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func (r *ResourceHealthMetadataServerTransport) dispatchGetBySite(req *http.Request) (*http.Response, error) { + if r.srv.GetBySite == nil { + return nil, &nonRetriableError{errors.New("fake for method GetBySite not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceHealthMetadata/default` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := r.srv.GetBySite(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).ResourceHealthMetadata, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (r *ResourceHealthMetadataServerTransport) dispatchGetBySiteSlot(req *http.Request) (*http.Response, error) { + if r.srv.GetBySiteSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetBySiteSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceHealthMetadata/default` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := r.srv.GetBySiteSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).ResourceHealthMetadata, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (r *ResourceHealthMetadataServerTransport) dispatchNewListPager(req *http.Request) (*http.Response, error) { + if r.srv.NewListPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} + } + newListPager := r.newListPager.get(req) + if newListPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/resourceHealthMetadata` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 1 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resp := r.srv.NewListPager(nil) + newListPager = &resp + r.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armappservice.ResourceHealthMetadataClientListResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + r.newListPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListPager) { + r.newListPager.remove(req) + } + return resp, nil +} + +func (r *ResourceHealthMetadataServerTransport) dispatchNewListByResourceGroupPager(req *http.Request) (*http.Response, error) { + if r.srv.NewListByResourceGroupPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListByResourceGroupPager not implemented")} + } + newListByResourceGroupPager := r.newListByResourceGroupPager.get(req) + if newListByResourceGroupPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/resourceHealthMetadata` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 2 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + resp := r.srv.NewListByResourceGroupPager(resourceGroupNameParam, nil) + newListByResourceGroupPager = &resp + r.newListByResourceGroupPager.add(req, newListByResourceGroupPager) + server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armappservice.ResourceHealthMetadataClientListByResourceGroupResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListByResourceGroupPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + r.newListByResourceGroupPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListByResourceGroupPager) { + r.newListByResourceGroupPager.remove(req) + } + return resp, nil +} + +func (r *ResourceHealthMetadataServerTransport) dispatchNewListBySitePager(req *http.Request) (*http.Response, error) { + if r.srv.NewListBySitePager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListBySitePager not implemented")} + } + newListBySitePager := r.newListBySitePager.get(req) + if newListBySitePager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceHealthMetadata` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := r.srv.NewListBySitePager(resourceGroupNameParam, nameParam, nil) + newListBySitePager = &resp + r.newListBySitePager.add(req, newListBySitePager) + server.PagerResponderInjectNextLinks(newListBySitePager, req, func(page *armappservice.ResourceHealthMetadataClientListBySiteResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListBySitePager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + r.newListBySitePager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListBySitePager) { + r.newListBySitePager.remove(req) + } + return resp, nil +} + +func (r *ResourceHealthMetadataServerTransport) dispatchNewListBySiteSlotPager(req *http.Request) (*http.Response, error) { + if r.srv.NewListBySiteSlotPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListBySiteSlotPager not implemented")} + } + newListBySiteSlotPager := r.newListBySiteSlotPager.get(req) + if newListBySiteSlotPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceHealthMetadata` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + resp := r.srv.NewListBySiteSlotPager(resourceGroupNameParam, nameParam, slotParam, nil) + newListBySiteSlotPager = &resp + r.newListBySiteSlotPager.add(req, newListBySiteSlotPager) + server.PagerResponderInjectNextLinks(newListBySiteSlotPager, req, func(page *armappservice.ResourceHealthMetadataClientListBySiteSlotResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListBySiteSlotPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + r.newListBySiteSlotPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListBySiteSlotPager) { + r.newListBySiteSlotPager.remove(req) + } + return resp, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/fake/server_factory.go b/sdk/resourcemanager/appservice/armappservice/fake/server_factory.go new file mode 100644 index 000000000000..b55da94c6d22 --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/fake/server_factory.go @@ -0,0 +1,265 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "errors" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "strings" + "sync" +) + +// ServerFactory is a fake server for instances of the armappservice.ClientFactory type. +type ServerFactory struct { + CertificateOrdersServer CertificateOrdersServer + CertificateOrdersDiagnosticsServer CertificateOrdersDiagnosticsServer + CertificateRegistrationProviderServer CertificateRegistrationProviderServer + CertificatesServer CertificatesServer + ContainerAppsServer ContainerAppsServer + ContainerAppsRevisionsServer ContainerAppsRevisionsServer + DeletedWebAppsServer DeletedWebAppsServer + DiagnosticsServer DiagnosticsServer + DomainRegistrationProviderServer DomainRegistrationProviderServer + DomainsServer DomainsServer + EnvironmentsServer EnvironmentsServer + GetUsagesInLocationServer GetUsagesInLocationServer + GlobalServer GlobalServer + KubeEnvironmentsServer KubeEnvironmentsServer + PlansServer PlansServer + ProviderServer ProviderServer + RecommendationsServer RecommendationsServer + ResourceHealthMetadataServer ResourceHealthMetadataServer + StaticSitesServer StaticSitesServer + TopLevelDomainsServer TopLevelDomainsServer + WebAppsServer WebAppsServer + WebSiteManagementServer WebSiteManagementServer + WorkflowRunActionRepetitionsServer WorkflowRunActionRepetitionsServer + WorkflowRunActionRepetitionsRequestHistoriesServer WorkflowRunActionRepetitionsRequestHistoriesServer + WorkflowRunActionScopeRepetitionsServer WorkflowRunActionScopeRepetitionsServer + WorkflowRunActionsServer WorkflowRunActionsServer + WorkflowRunsServer WorkflowRunsServer + WorkflowTriggerHistoriesServer WorkflowTriggerHistoriesServer + WorkflowTriggersServer WorkflowTriggersServer + WorkflowVersionsServer WorkflowVersionsServer + WorkflowsServer WorkflowsServer +} + +// NewServerFactoryTransport creates a new instance of ServerFactoryTransport with the provided implementation. +// The returned ServerFactoryTransport instance is connected to an instance of armappservice.ClientFactory via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewServerFactoryTransport(srv *ServerFactory) *ServerFactoryTransport { + return &ServerFactoryTransport{ + srv: srv, + } +} + +// ServerFactoryTransport connects instances of armappservice.ClientFactory to instances of ServerFactory. +// Don't use this type directly, use NewServerFactoryTransport instead. +type ServerFactoryTransport struct { + srv *ServerFactory + trMu sync.Mutex + trCertificateOrdersServer *CertificateOrdersServerTransport + trCertificateOrdersDiagnosticsServer *CertificateOrdersDiagnosticsServerTransport + trCertificateRegistrationProviderServer *CertificateRegistrationProviderServerTransport + trCertificatesServer *CertificatesServerTransport + trContainerAppsServer *ContainerAppsServerTransport + trContainerAppsRevisionsServer *ContainerAppsRevisionsServerTransport + trDeletedWebAppsServer *DeletedWebAppsServerTransport + trDiagnosticsServer *DiagnosticsServerTransport + trDomainRegistrationProviderServer *DomainRegistrationProviderServerTransport + trDomainsServer *DomainsServerTransport + trEnvironmentsServer *EnvironmentsServerTransport + trGetUsagesInLocationServer *GetUsagesInLocationServerTransport + trGlobalServer *GlobalServerTransport + trKubeEnvironmentsServer *KubeEnvironmentsServerTransport + trPlansServer *PlansServerTransport + trProviderServer *ProviderServerTransport + trRecommendationsServer *RecommendationsServerTransport + trResourceHealthMetadataServer *ResourceHealthMetadataServerTransport + trStaticSitesServer *StaticSitesServerTransport + trTopLevelDomainsServer *TopLevelDomainsServerTransport + trWebAppsServer *WebAppsServerTransport + trWebSiteManagementServer *WebSiteManagementServerTransport + trWorkflowRunActionRepetitionsServer *WorkflowRunActionRepetitionsServerTransport + trWorkflowRunActionRepetitionsRequestHistoriesServer *WorkflowRunActionRepetitionsRequestHistoriesServerTransport + trWorkflowRunActionScopeRepetitionsServer *WorkflowRunActionScopeRepetitionsServerTransport + trWorkflowRunActionsServer *WorkflowRunActionsServerTransport + trWorkflowRunsServer *WorkflowRunsServerTransport + trWorkflowTriggerHistoriesServer *WorkflowTriggerHistoriesServerTransport + trWorkflowTriggersServer *WorkflowTriggersServerTransport + trWorkflowVersionsServer *WorkflowVersionsServerTransport + trWorkflowsServer *WorkflowsServerTransport +} + +// Do implements the policy.Transporter interface for ServerFactoryTransport. +func (s *ServerFactoryTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + client := method[:strings.Index(method, ".")] + var resp *http.Response + var err error + + switch client { + case "CertificateOrdersClient": + initServer(s, &s.trCertificateOrdersServer, func() *CertificateOrdersServerTransport { + return NewCertificateOrdersServerTransport(&s.srv.CertificateOrdersServer) + }) + resp, err = s.trCertificateOrdersServer.Do(req) + case "CertificateOrdersDiagnosticsClient": + initServer(s, &s.trCertificateOrdersDiagnosticsServer, func() *CertificateOrdersDiagnosticsServerTransport { + return NewCertificateOrdersDiagnosticsServerTransport(&s.srv.CertificateOrdersDiagnosticsServer) + }) + resp, err = s.trCertificateOrdersDiagnosticsServer.Do(req) + case "CertificateRegistrationProviderClient": + initServer(s, &s.trCertificateRegistrationProviderServer, func() *CertificateRegistrationProviderServerTransport { + return NewCertificateRegistrationProviderServerTransport(&s.srv.CertificateRegistrationProviderServer) + }) + resp, err = s.trCertificateRegistrationProviderServer.Do(req) + case "CertificatesClient": + initServer(s, &s.trCertificatesServer, func() *CertificatesServerTransport { return NewCertificatesServerTransport(&s.srv.CertificatesServer) }) + resp, err = s.trCertificatesServer.Do(req) + case "ContainerAppsClient": + initServer(s, &s.trContainerAppsServer, func() *ContainerAppsServerTransport { + return NewContainerAppsServerTransport(&s.srv.ContainerAppsServer) + }) + resp, err = s.trContainerAppsServer.Do(req) + case "ContainerAppsRevisionsClient": + initServer(s, &s.trContainerAppsRevisionsServer, func() *ContainerAppsRevisionsServerTransport { + return NewContainerAppsRevisionsServerTransport(&s.srv.ContainerAppsRevisionsServer) + }) + resp, err = s.trContainerAppsRevisionsServer.Do(req) + case "DeletedWebAppsClient": + initServer(s, &s.trDeletedWebAppsServer, func() *DeletedWebAppsServerTransport { + return NewDeletedWebAppsServerTransport(&s.srv.DeletedWebAppsServer) + }) + resp, err = s.trDeletedWebAppsServer.Do(req) + case "DiagnosticsClient": + initServer(s, &s.trDiagnosticsServer, func() *DiagnosticsServerTransport { return NewDiagnosticsServerTransport(&s.srv.DiagnosticsServer) }) + resp, err = s.trDiagnosticsServer.Do(req) + case "DomainRegistrationProviderClient": + initServer(s, &s.trDomainRegistrationProviderServer, func() *DomainRegistrationProviderServerTransport { + return NewDomainRegistrationProviderServerTransport(&s.srv.DomainRegistrationProviderServer) + }) + resp, err = s.trDomainRegistrationProviderServer.Do(req) + case "DomainsClient": + initServer(s, &s.trDomainsServer, func() *DomainsServerTransport { return NewDomainsServerTransport(&s.srv.DomainsServer) }) + resp, err = s.trDomainsServer.Do(req) + case "EnvironmentsClient": + initServer(s, &s.trEnvironmentsServer, func() *EnvironmentsServerTransport { return NewEnvironmentsServerTransport(&s.srv.EnvironmentsServer) }) + resp, err = s.trEnvironmentsServer.Do(req) + case "GetUsagesInLocationClient": + initServer(s, &s.trGetUsagesInLocationServer, func() *GetUsagesInLocationServerTransport { + return NewGetUsagesInLocationServerTransport(&s.srv.GetUsagesInLocationServer) + }) + resp, err = s.trGetUsagesInLocationServer.Do(req) + case "GlobalClient": + initServer(s, &s.trGlobalServer, func() *GlobalServerTransport { return NewGlobalServerTransport(&s.srv.GlobalServer) }) + resp, err = s.trGlobalServer.Do(req) + case "KubeEnvironmentsClient": + initServer(s, &s.trKubeEnvironmentsServer, func() *KubeEnvironmentsServerTransport { + return NewKubeEnvironmentsServerTransport(&s.srv.KubeEnvironmentsServer) + }) + resp, err = s.trKubeEnvironmentsServer.Do(req) + case "PlansClient": + initServer(s, &s.trPlansServer, func() *PlansServerTransport { return NewPlansServerTransport(&s.srv.PlansServer) }) + resp, err = s.trPlansServer.Do(req) + case "ProviderClient": + initServer(s, &s.trProviderServer, func() *ProviderServerTransport { return NewProviderServerTransport(&s.srv.ProviderServer) }) + resp, err = s.trProviderServer.Do(req) + case "RecommendationsClient": + initServer(s, &s.trRecommendationsServer, func() *RecommendationsServerTransport { + return NewRecommendationsServerTransport(&s.srv.RecommendationsServer) + }) + resp, err = s.trRecommendationsServer.Do(req) + case "ResourceHealthMetadataClient": + initServer(s, &s.trResourceHealthMetadataServer, func() *ResourceHealthMetadataServerTransport { + return NewResourceHealthMetadataServerTransport(&s.srv.ResourceHealthMetadataServer) + }) + resp, err = s.trResourceHealthMetadataServer.Do(req) + case "StaticSitesClient": + initServer(s, &s.trStaticSitesServer, func() *StaticSitesServerTransport { return NewStaticSitesServerTransport(&s.srv.StaticSitesServer) }) + resp, err = s.trStaticSitesServer.Do(req) + case "TopLevelDomainsClient": + initServer(s, &s.trTopLevelDomainsServer, func() *TopLevelDomainsServerTransport { + return NewTopLevelDomainsServerTransport(&s.srv.TopLevelDomainsServer) + }) + resp, err = s.trTopLevelDomainsServer.Do(req) + case "WebAppsClient": + initServer(s, &s.trWebAppsServer, func() *WebAppsServerTransport { return NewWebAppsServerTransport(&s.srv.WebAppsServer) }) + resp, err = s.trWebAppsServer.Do(req) + case "WebSiteManagementClient": + initServer(s, &s.trWebSiteManagementServer, func() *WebSiteManagementServerTransport { + return NewWebSiteManagementServerTransport(&s.srv.WebSiteManagementServer) + }) + resp, err = s.trWebSiteManagementServer.Do(req) + case "WorkflowRunActionRepetitionsClient": + initServer(s, &s.trWorkflowRunActionRepetitionsServer, func() *WorkflowRunActionRepetitionsServerTransport { + return NewWorkflowRunActionRepetitionsServerTransport(&s.srv.WorkflowRunActionRepetitionsServer) + }) + resp, err = s.trWorkflowRunActionRepetitionsServer.Do(req) + case "WorkflowRunActionRepetitionsRequestHistoriesClient": + initServer(s, &s.trWorkflowRunActionRepetitionsRequestHistoriesServer, func() *WorkflowRunActionRepetitionsRequestHistoriesServerTransport { + return NewWorkflowRunActionRepetitionsRequestHistoriesServerTransport(&s.srv.WorkflowRunActionRepetitionsRequestHistoriesServer) + }) + resp, err = s.trWorkflowRunActionRepetitionsRequestHistoriesServer.Do(req) + case "WorkflowRunActionScopeRepetitionsClient": + initServer(s, &s.trWorkflowRunActionScopeRepetitionsServer, func() *WorkflowRunActionScopeRepetitionsServerTransport { + return NewWorkflowRunActionScopeRepetitionsServerTransport(&s.srv.WorkflowRunActionScopeRepetitionsServer) + }) + resp, err = s.trWorkflowRunActionScopeRepetitionsServer.Do(req) + case "WorkflowRunActionsClient": + initServer(s, &s.trWorkflowRunActionsServer, func() *WorkflowRunActionsServerTransport { + return NewWorkflowRunActionsServerTransport(&s.srv.WorkflowRunActionsServer) + }) + resp, err = s.trWorkflowRunActionsServer.Do(req) + case "WorkflowRunsClient": + initServer(s, &s.trWorkflowRunsServer, func() *WorkflowRunsServerTransport { return NewWorkflowRunsServerTransport(&s.srv.WorkflowRunsServer) }) + resp, err = s.trWorkflowRunsServer.Do(req) + case "WorkflowTriggerHistoriesClient": + initServer(s, &s.trWorkflowTriggerHistoriesServer, func() *WorkflowTriggerHistoriesServerTransport { + return NewWorkflowTriggerHistoriesServerTransport(&s.srv.WorkflowTriggerHistoriesServer) + }) + resp, err = s.trWorkflowTriggerHistoriesServer.Do(req) + case "WorkflowTriggersClient": + initServer(s, &s.trWorkflowTriggersServer, func() *WorkflowTriggersServerTransport { + return NewWorkflowTriggersServerTransport(&s.srv.WorkflowTriggersServer) + }) + resp, err = s.trWorkflowTriggersServer.Do(req) + case "WorkflowVersionsClient": + initServer(s, &s.trWorkflowVersionsServer, func() *WorkflowVersionsServerTransport { + return NewWorkflowVersionsServerTransport(&s.srv.WorkflowVersionsServer) + }) + resp, err = s.trWorkflowVersionsServer.Do(req) + case "WorkflowsClient": + initServer(s, &s.trWorkflowsServer, func() *WorkflowsServerTransport { return NewWorkflowsServerTransport(&s.srv.WorkflowsServer) }) + resp, err = s.trWorkflowsServer.Do(req) + default: + err = fmt.Errorf("unhandled client %s", client) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func initServer[T any](s *ServerFactoryTransport, dst **T, src func() *T) { + s.trMu.Lock() + if *dst == nil { + *dst = src() + } + s.trMu.Unlock() +} diff --git a/sdk/resourcemanager/appservice/armappservice/fake/staticsites_server.go b/sdk/resourcemanager/appservice/armappservice/fake/staticsites_server.go new file mode 100644 index 000000000000..178f2bbf83e4 --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/fake/staticsites_server.go @@ -0,0 +1,3789 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "context" + "errors" + "fmt" + azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" + "net/http" + "net/url" + "regexp" + "strconv" +) + +// StaticSitesServer is a fake server for instances of the armappservice.StaticSitesClient type. +type StaticSitesServer struct { + // BeginApproveOrRejectPrivateEndpointConnection is the fake for method StaticSitesClient.BeginApproveOrRejectPrivateEndpointConnection + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginApproveOrRejectPrivateEndpointConnection func(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper armappservice.PrivateLinkConnectionApprovalRequestResource, options *armappservice.StaticSitesClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (resp azfake.PollerResponder[armappservice.StaticSitesClientApproveOrRejectPrivateEndpointConnectionResponse], errResp azfake.ErrorResponder) + + // CreateOrUpdateBasicAuth is the fake for method StaticSitesClient.CreateOrUpdateBasicAuth + // HTTP status codes to indicate success: http.StatusOK + CreateOrUpdateBasicAuth func(ctx context.Context, resourceGroupName string, name string, basicAuthName armappservice.BasicAuthName, basicAuthEnvelope armappservice.StaticSiteBasicAuthPropertiesARMResource, options *armappservice.StaticSitesClientCreateOrUpdateBasicAuthOptions) (resp azfake.Responder[armappservice.StaticSitesClientCreateOrUpdateBasicAuthResponse], errResp azfake.ErrorResponder) + + // CreateOrUpdateBuildDatabaseConnection is the fake for method StaticSitesClient.CreateOrUpdateBuildDatabaseConnection + // HTTP status codes to indicate success: http.StatusOK + CreateOrUpdateBuildDatabaseConnection func(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string, databaseConnectionRequestEnvelope armappservice.DatabaseConnection, options *armappservice.StaticSitesClientCreateOrUpdateBuildDatabaseConnectionOptions) (resp azfake.Responder[armappservice.StaticSitesClientCreateOrUpdateBuildDatabaseConnectionResponse], errResp azfake.ErrorResponder) + + // CreateOrUpdateDatabaseConnection is the fake for method StaticSitesClient.CreateOrUpdateDatabaseConnection + // HTTP status codes to indicate success: http.StatusOK + CreateOrUpdateDatabaseConnection func(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string, databaseConnectionRequestEnvelope armappservice.DatabaseConnection, options *armappservice.StaticSitesClientCreateOrUpdateDatabaseConnectionOptions) (resp azfake.Responder[armappservice.StaticSitesClientCreateOrUpdateDatabaseConnectionResponse], errResp azfake.ErrorResponder) + + // BeginCreateOrUpdateStaticSite is the fake for method StaticSitesClient.BeginCreateOrUpdateStaticSite + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginCreateOrUpdateStaticSite func(ctx context.Context, resourceGroupName string, name string, staticSiteEnvelope armappservice.StaticSiteARMResource, options *armappservice.StaticSitesClientBeginCreateOrUpdateStaticSiteOptions) (resp azfake.PollerResponder[armappservice.StaticSitesClientCreateOrUpdateStaticSiteResponse], errResp azfake.ErrorResponder) + + // CreateOrUpdateStaticSiteAppSettings is the fake for method StaticSitesClient.CreateOrUpdateStaticSiteAppSettings + // HTTP status codes to indicate success: http.StatusOK + CreateOrUpdateStaticSiteAppSettings func(ctx context.Context, resourceGroupName string, name string, appSettings armappservice.StringDictionary, options *armappservice.StaticSitesClientCreateOrUpdateStaticSiteAppSettingsOptions) (resp azfake.Responder[armappservice.StaticSitesClientCreateOrUpdateStaticSiteAppSettingsResponse], errResp azfake.ErrorResponder) + + // CreateOrUpdateStaticSiteBuildAppSettings is the fake for method StaticSitesClient.CreateOrUpdateStaticSiteBuildAppSettings + // HTTP status codes to indicate success: http.StatusOK + CreateOrUpdateStaticSiteBuildAppSettings func(ctx context.Context, resourceGroupName string, name string, environmentName string, appSettings armappservice.StringDictionary, options *armappservice.StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsOptions) (resp azfake.Responder[armappservice.StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsResponse], errResp azfake.ErrorResponder) + + // CreateOrUpdateStaticSiteBuildFunctionAppSettings is the fake for method StaticSitesClient.CreateOrUpdateStaticSiteBuildFunctionAppSettings + // HTTP status codes to indicate success: http.StatusOK + CreateOrUpdateStaticSiteBuildFunctionAppSettings func(ctx context.Context, resourceGroupName string, name string, environmentName string, appSettings armappservice.StringDictionary, options *armappservice.StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsOptions) (resp azfake.Responder[armappservice.StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsResponse], errResp azfake.ErrorResponder) + + // BeginCreateOrUpdateStaticSiteCustomDomain is the fake for method StaticSitesClient.BeginCreateOrUpdateStaticSiteCustomDomain + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginCreateOrUpdateStaticSiteCustomDomain func(ctx context.Context, resourceGroupName string, name string, domainName string, staticSiteCustomDomainRequestPropertiesEnvelope armappservice.StaticSiteCustomDomainRequestPropertiesARMResource, options *armappservice.StaticSitesClientBeginCreateOrUpdateStaticSiteCustomDomainOptions) (resp azfake.PollerResponder[armappservice.StaticSitesClientCreateOrUpdateStaticSiteCustomDomainResponse], errResp azfake.ErrorResponder) + + // CreateOrUpdateStaticSiteFunctionAppSettings is the fake for method StaticSitesClient.CreateOrUpdateStaticSiteFunctionAppSettings + // HTTP status codes to indicate success: http.StatusOK + CreateOrUpdateStaticSiteFunctionAppSettings func(ctx context.Context, resourceGroupName string, name string, appSettings armappservice.StringDictionary, options *armappservice.StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsOptions) (resp azfake.Responder[armappservice.StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsResponse], errResp azfake.ErrorResponder) + + // CreateUserRolesInvitationLink is the fake for method StaticSitesClient.CreateUserRolesInvitationLink + // HTTP status codes to indicate success: http.StatusOK + CreateUserRolesInvitationLink func(ctx context.Context, resourceGroupName string, name string, staticSiteUserRolesInvitationEnvelope armappservice.StaticSiteUserInvitationRequestResource, options *armappservice.StaticSitesClientCreateUserRolesInvitationLinkOptions) (resp azfake.Responder[armappservice.StaticSitesClientCreateUserRolesInvitationLinkResponse], errResp azfake.ErrorResponder) + + // BeginCreateZipDeploymentForStaticSite is the fake for method StaticSitesClient.BeginCreateZipDeploymentForStaticSite + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginCreateZipDeploymentForStaticSite func(ctx context.Context, resourceGroupName string, name string, staticSiteZipDeploymentEnvelope armappservice.StaticSiteZipDeploymentARMResource, options *armappservice.StaticSitesClientBeginCreateZipDeploymentForStaticSiteOptions) (resp azfake.PollerResponder[armappservice.StaticSitesClientCreateZipDeploymentForStaticSiteResponse], errResp azfake.ErrorResponder) + + // BeginCreateZipDeploymentForStaticSiteBuild is the fake for method StaticSitesClient.BeginCreateZipDeploymentForStaticSiteBuild + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginCreateZipDeploymentForStaticSiteBuild func(ctx context.Context, resourceGroupName string, name string, environmentName string, staticSiteZipDeploymentEnvelope armappservice.StaticSiteZipDeploymentARMResource, options *armappservice.StaticSitesClientBeginCreateZipDeploymentForStaticSiteBuildOptions) (resp azfake.PollerResponder[armappservice.StaticSitesClientCreateZipDeploymentForStaticSiteBuildResponse], errResp azfake.ErrorResponder) + + // DeleteBuildDatabaseConnection is the fake for method StaticSitesClient.DeleteBuildDatabaseConnection + // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent + DeleteBuildDatabaseConnection func(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string, options *armappservice.StaticSitesClientDeleteBuildDatabaseConnectionOptions) (resp azfake.Responder[armappservice.StaticSitesClientDeleteBuildDatabaseConnectionResponse], errResp azfake.ErrorResponder) + + // DeleteDatabaseConnection is the fake for method StaticSitesClient.DeleteDatabaseConnection + // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent + DeleteDatabaseConnection func(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string, options *armappservice.StaticSitesClientDeleteDatabaseConnectionOptions) (resp azfake.Responder[armappservice.StaticSitesClientDeleteDatabaseConnectionResponse], errResp azfake.ErrorResponder) + + // BeginDeletePrivateEndpointConnection is the fake for method StaticSitesClient.BeginDeletePrivateEndpointConnection + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent + BeginDeletePrivateEndpointConnection func(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *armappservice.StaticSitesClientBeginDeletePrivateEndpointConnectionOptions) (resp azfake.PollerResponder[armappservice.StaticSitesClientDeletePrivateEndpointConnectionResponse], errResp azfake.ErrorResponder) + + // BeginDeleteStaticSite is the fake for method StaticSitesClient.BeginDeleteStaticSite + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginDeleteStaticSite func(ctx context.Context, resourceGroupName string, name string, options *armappservice.StaticSitesClientBeginDeleteStaticSiteOptions) (resp azfake.PollerResponder[armappservice.StaticSitesClientDeleteStaticSiteResponse], errResp azfake.ErrorResponder) + + // BeginDeleteStaticSiteBuild is the fake for method StaticSitesClient.BeginDeleteStaticSiteBuild + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent + BeginDeleteStaticSiteBuild func(ctx context.Context, resourceGroupName string, name string, environmentName string, options *armappservice.StaticSitesClientBeginDeleteStaticSiteBuildOptions) (resp azfake.PollerResponder[armappservice.StaticSitesClientDeleteStaticSiteBuildResponse], errResp azfake.ErrorResponder) + + // BeginDeleteStaticSiteCustomDomain is the fake for method StaticSitesClient.BeginDeleteStaticSiteCustomDomain + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginDeleteStaticSiteCustomDomain func(ctx context.Context, resourceGroupName string, name string, domainName string, options *armappservice.StaticSitesClientBeginDeleteStaticSiteCustomDomainOptions) (resp azfake.PollerResponder[armappservice.StaticSitesClientDeleteStaticSiteCustomDomainResponse], errResp azfake.ErrorResponder) + + // DeleteStaticSiteUser is the fake for method StaticSitesClient.DeleteStaticSiteUser + // HTTP status codes to indicate success: http.StatusOK + DeleteStaticSiteUser func(ctx context.Context, resourceGroupName string, name string, authprovider string, userid string, options *armappservice.StaticSitesClientDeleteStaticSiteUserOptions) (resp azfake.Responder[armappservice.StaticSitesClientDeleteStaticSiteUserResponse], errResp azfake.ErrorResponder) + + // BeginDetachStaticSite is the fake for method StaticSitesClient.BeginDetachStaticSite + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginDetachStaticSite func(ctx context.Context, resourceGroupName string, name string, options *armappservice.StaticSitesClientBeginDetachStaticSiteOptions) (resp azfake.PollerResponder[armappservice.StaticSitesClientDetachStaticSiteResponse], errResp azfake.ErrorResponder) + + // DetachUserProvidedFunctionAppFromStaticSite is the fake for method StaticSitesClient.DetachUserProvidedFunctionAppFromStaticSite + // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent + DetachUserProvidedFunctionAppFromStaticSite func(ctx context.Context, resourceGroupName string, name string, functionAppName string, options *armappservice.StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteOptions) (resp azfake.Responder[armappservice.StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteResponse], errResp azfake.ErrorResponder) + + // DetachUserProvidedFunctionAppFromStaticSiteBuild is the fake for method StaticSitesClient.DetachUserProvidedFunctionAppFromStaticSiteBuild + // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent + DetachUserProvidedFunctionAppFromStaticSiteBuild func(ctx context.Context, resourceGroupName string, name string, environmentName string, functionAppName string, options *armappservice.StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildOptions) (resp azfake.Responder[armappservice.StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildResponse], errResp azfake.ErrorResponder) + + // GetBasicAuth is the fake for method StaticSitesClient.GetBasicAuth + // HTTP status codes to indicate success: http.StatusOK + GetBasicAuth func(ctx context.Context, resourceGroupName string, name string, basicAuthName armappservice.BasicAuthName, options *armappservice.StaticSitesClientGetBasicAuthOptions) (resp azfake.Responder[armappservice.StaticSitesClientGetBasicAuthResponse], errResp azfake.ErrorResponder) + + // GetBuildDatabaseConnection is the fake for method StaticSitesClient.GetBuildDatabaseConnection + // HTTP status codes to indicate success: http.StatusOK + GetBuildDatabaseConnection func(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string, options *armappservice.StaticSitesClientGetBuildDatabaseConnectionOptions) (resp azfake.Responder[armappservice.StaticSitesClientGetBuildDatabaseConnectionResponse], errResp azfake.ErrorResponder) + + // GetBuildDatabaseConnectionWithDetails is the fake for method StaticSitesClient.GetBuildDatabaseConnectionWithDetails + // HTTP status codes to indicate success: http.StatusOK + GetBuildDatabaseConnectionWithDetails func(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string, options *armappservice.StaticSitesClientGetBuildDatabaseConnectionWithDetailsOptions) (resp azfake.Responder[armappservice.StaticSitesClientGetBuildDatabaseConnectionWithDetailsResponse], errResp azfake.ErrorResponder) + + // NewGetBuildDatabaseConnectionsPager is the fake for method StaticSitesClient.NewGetBuildDatabaseConnectionsPager + // HTTP status codes to indicate success: http.StatusOK + NewGetBuildDatabaseConnectionsPager func(resourceGroupName string, name string, environmentName string, options *armappservice.StaticSitesClientGetBuildDatabaseConnectionsOptions) (resp azfake.PagerResponder[armappservice.StaticSitesClientGetBuildDatabaseConnectionsResponse]) + + // NewGetBuildDatabaseConnectionsWithDetailsPager is the fake for method StaticSitesClient.NewGetBuildDatabaseConnectionsWithDetailsPager + // HTTP status codes to indicate success: http.StatusOK + NewGetBuildDatabaseConnectionsWithDetailsPager func(resourceGroupName string, name string, environmentName string, options *armappservice.StaticSitesClientGetBuildDatabaseConnectionsWithDetailsOptions) (resp azfake.PagerResponder[armappservice.StaticSitesClientGetBuildDatabaseConnectionsWithDetailsResponse]) + + // GetDatabaseConnection is the fake for method StaticSitesClient.GetDatabaseConnection + // HTTP status codes to indicate success: http.StatusOK + GetDatabaseConnection func(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string, options *armappservice.StaticSitesClientGetDatabaseConnectionOptions) (resp azfake.Responder[armappservice.StaticSitesClientGetDatabaseConnectionResponse], errResp azfake.ErrorResponder) + + // GetDatabaseConnectionWithDetails is the fake for method StaticSitesClient.GetDatabaseConnectionWithDetails + // HTTP status codes to indicate success: http.StatusOK + GetDatabaseConnectionWithDetails func(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string, options *armappservice.StaticSitesClientGetDatabaseConnectionWithDetailsOptions) (resp azfake.Responder[armappservice.StaticSitesClientGetDatabaseConnectionWithDetailsResponse], errResp azfake.ErrorResponder) + + // NewGetDatabaseConnectionsPager is the fake for method StaticSitesClient.NewGetDatabaseConnectionsPager + // HTTP status codes to indicate success: http.StatusOK + NewGetDatabaseConnectionsPager func(resourceGroupName string, name string, options *armappservice.StaticSitesClientGetDatabaseConnectionsOptions) (resp azfake.PagerResponder[armappservice.StaticSitesClientGetDatabaseConnectionsResponse]) + + // NewGetDatabaseConnectionsWithDetailsPager is the fake for method StaticSitesClient.NewGetDatabaseConnectionsWithDetailsPager + // HTTP status codes to indicate success: http.StatusOK + NewGetDatabaseConnectionsWithDetailsPager func(resourceGroupName string, name string, options *armappservice.StaticSitesClientGetDatabaseConnectionsWithDetailsOptions) (resp azfake.PagerResponder[armappservice.StaticSitesClientGetDatabaseConnectionsWithDetailsResponse]) + + // GetLinkedBackend is the fake for method StaticSitesClient.GetLinkedBackend + // HTTP status codes to indicate success: http.StatusOK + GetLinkedBackend func(ctx context.Context, resourceGroupName string, name string, linkedBackendName string, options *armappservice.StaticSitesClientGetLinkedBackendOptions) (resp azfake.Responder[armappservice.StaticSitesClientGetLinkedBackendResponse], errResp azfake.ErrorResponder) + + // GetLinkedBackendForBuild is the fake for method StaticSitesClient.GetLinkedBackendForBuild + // HTTP status codes to indicate success: http.StatusOK + GetLinkedBackendForBuild func(ctx context.Context, resourceGroupName string, name string, environmentName string, linkedBackendName string, options *armappservice.StaticSitesClientGetLinkedBackendForBuildOptions) (resp azfake.Responder[armappservice.StaticSitesClientGetLinkedBackendForBuildResponse], errResp azfake.ErrorResponder) + + // NewGetLinkedBackendsPager is the fake for method StaticSitesClient.NewGetLinkedBackendsPager + // HTTP status codes to indicate success: http.StatusOK + NewGetLinkedBackendsPager func(resourceGroupName string, name string, options *armappservice.StaticSitesClientGetLinkedBackendsOptions) (resp azfake.PagerResponder[armappservice.StaticSitesClientGetLinkedBackendsResponse]) + + // NewGetLinkedBackendsForBuildPager is the fake for method StaticSitesClient.NewGetLinkedBackendsForBuildPager + // HTTP status codes to indicate success: http.StatusOK + NewGetLinkedBackendsForBuildPager func(resourceGroupName string, name string, environmentName string, options *armappservice.StaticSitesClientGetLinkedBackendsForBuildOptions) (resp azfake.PagerResponder[armappservice.StaticSitesClientGetLinkedBackendsForBuildResponse]) + + // GetPrivateEndpointConnection is the fake for method StaticSitesClient.GetPrivateEndpointConnection + // HTTP status codes to indicate success: http.StatusOK + GetPrivateEndpointConnection func(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *armappservice.StaticSitesClientGetPrivateEndpointConnectionOptions) (resp azfake.Responder[armappservice.StaticSitesClientGetPrivateEndpointConnectionResponse], errResp azfake.ErrorResponder) + + // NewGetPrivateEndpointConnectionListPager is the fake for method StaticSitesClient.NewGetPrivateEndpointConnectionListPager + // HTTP status codes to indicate success: http.StatusOK + NewGetPrivateEndpointConnectionListPager func(resourceGroupName string, name string, options *armappservice.StaticSitesClientGetPrivateEndpointConnectionListOptions) (resp azfake.PagerResponder[armappservice.StaticSitesClientGetPrivateEndpointConnectionListResponse]) + + // GetPrivateLinkResources is the fake for method StaticSitesClient.GetPrivateLinkResources + // HTTP status codes to indicate success: http.StatusOK + GetPrivateLinkResources func(ctx context.Context, resourceGroupName string, name string, options *armappservice.StaticSitesClientGetPrivateLinkResourcesOptions) (resp azfake.Responder[armappservice.StaticSitesClientGetPrivateLinkResourcesResponse], errResp azfake.ErrorResponder) + + // GetStaticSite is the fake for method StaticSitesClient.GetStaticSite + // HTTP status codes to indicate success: http.StatusOK + GetStaticSite func(ctx context.Context, resourceGroupName string, name string, options *armappservice.StaticSitesClientGetStaticSiteOptions) (resp azfake.Responder[armappservice.StaticSitesClientGetStaticSiteResponse], errResp azfake.ErrorResponder) + + // GetStaticSiteBuild is the fake for method StaticSitesClient.GetStaticSiteBuild + // HTTP status codes to indicate success: http.StatusOK + GetStaticSiteBuild func(ctx context.Context, resourceGroupName string, name string, environmentName string, options *armappservice.StaticSitesClientGetStaticSiteBuildOptions) (resp azfake.Responder[armappservice.StaticSitesClientGetStaticSiteBuildResponse], errResp azfake.ErrorResponder) + + // NewGetStaticSiteBuildsPager is the fake for method StaticSitesClient.NewGetStaticSiteBuildsPager + // HTTP status codes to indicate success: http.StatusOK + NewGetStaticSiteBuildsPager func(resourceGroupName string, name string, options *armappservice.StaticSitesClientGetStaticSiteBuildsOptions) (resp azfake.PagerResponder[armappservice.StaticSitesClientGetStaticSiteBuildsResponse]) + + // GetStaticSiteCustomDomain is the fake for method StaticSitesClient.GetStaticSiteCustomDomain + // HTTP status codes to indicate success: http.StatusOK + GetStaticSiteCustomDomain func(ctx context.Context, resourceGroupName string, name string, domainName string, options *armappservice.StaticSitesClientGetStaticSiteCustomDomainOptions) (resp azfake.Responder[armappservice.StaticSitesClientGetStaticSiteCustomDomainResponse], errResp azfake.ErrorResponder) + + // NewGetStaticSitesByResourceGroupPager is the fake for method StaticSitesClient.NewGetStaticSitesByResourceGroupPager + // HTTP status codes to indicate success: http.StatusOK + NewGetStaticSitesByResourceGroupPager func(resourceGroupName string, options *armappservice.StaticSitesClientGetStaticSitesByResourceGroupOptions) (resp azfake.PagerResponder[armappservice.StaticSitesClientGetStaticSitesByResourceGroupResponse]) + + // GetUserProvidedFunctionAppForStaticSite is the fake for method StaticSitesClient.GetUserProvidedFunctionAppForStaticSite + // HTTP status codes to indicate success: http.StatusOK + GetUserProvidedFunctionAppForStaticSite func(ctx context.Context, resourceGroupName string, name string, functionAppName string, options *armappservice.StaticSitesClientGetUserProvidedFunctionAppForStaticSiteOptions) (resp azfake.Responder[armappservice.StaticSitesClientGetUserProvidedFunctionAppForStaticSiteResponse], errResp azfake.ErrorResponder) + + // GetUserProvidedFunctionAppForStaticSiteBuild is the fake for method StaticSitesClient.GetUserProvidedFunctionAppForStaticSiteBuild + // HTTP status codes to indicate success: http.StatusOK + GetUserProvidedFunctionAppForStaticSiteBuild func(ctx context.Context, resourceGroupName string, name string, environmentName string, functionAppName string, options *armappservice.StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildOptions) (resp azfake.Responder[armappservice.StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildResponse], errResp azfake.ErrorResponder) + + // NewGetUserProvidedFunctionAppsForStaticSitePager is the fake for method StaticSitesClient.NewGetUserProvidedFunctionAppsForStaticSitePager + // HTTP status codes to indicate success: http.StatusOK + NewGetUserProvidedFunctionAppsForStaticSitePager func(resourceGroupName string, name string, options *armappservice.StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteOptions) (resp azfake.PagerResponder[armappservice.StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse]) + + // NewGetUserProvidedFunctionAppsForStaticSiteBuildPager is the fake for method StaticSitesClient.NewGetUserProvidedFunctionAppsForStaticSiteBuildPager + // HTTP status codes to indicate success: http.StatusOK + NewGetUserProvidedFunctionAppsForStaticSiteBuildPager func(resourceGroupName string, name string, environmentName string, options *armappservice.StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildOptions) (resp azfake.PagerResponder[armappservice.StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse]) + + // BeginLinkBackend is the fake for method StaticSitesClient.BeginLinkBackend + // HTTP status codes to indicate success: http.StatusOK + BeginLinkBackend func(ctx context.Context, resourceGroupName string, name string, linkedBackendName string, staticSiteLinkedBackendEnvelope armappservice.StaticSiteLinkedBackendARMResource, options *armappservice.StaticSitesClientBeginLinkBackendOptions) (resp azfake.PollerResponder[armappservice.StaticSitesClientLinkBackendResponse], errResp azfake.ErrorResponder) + + // BeginLinkBackendToBuild is the fake for method StaticSitesClient.BeginLinkBackendToBuild + // HTTP status codes to indicate success: http.StatusOK + BeginLinkBackendToBuild func(ctx context.Context, resourceGroupName string, name string, environmentName string, linkedBackendName string, staticSiteLinkedBackendEnvelope armappservice.StaticSiteLinkedBackendARMResource, options *armappservice.StaticSitesClientBeginLinkBackendToBuildOptions) (resp azfake.PollerResponder[armappservice.StaticSitesClientLinkBackendToBuildResponse], errResp azfake.ErrorResponder) + + // NewListPager is the fake for method StaticSitesClient.NewListPager + // HTTP status codes to indicate success: http.StatusOK + NewListPager func(options *armappservice.StaticSitesClientListOptions) (resp azfake.PagerResponder[armappservice.StaticSitesClientListResponse]) + + // NewListBasicAuthPager is the fake for method StaticSitesClient.NewListBasicAuthPager + // HTTP status codes to indicate success: http.StatusOK + NewListBasicAuthPager func(resourceGroupName string, name string, options *armappservice.StaticSitesClientListBasicAuthOptions) (resp azfake.PagerResponder[armappservice.StaticSitesClientListBasicAuthResponse]) + + // ListStaticSiteAppSettings is the fake for method StaticSitesClient.ListStaticSiteAppSettings + // HTTP status codes to indicate success: http.StatusOK + ListStaticSiteAppSettings func(ctx context.Context, resourceGroupName string, name string, options *armappservice.StaticSitesClientListStaticSiteAppSettingsOptions) (resp azfake.Responder[armappservice.StaticSitesClientListStaticSiteAppSettingsResponse], errResp azfake.ErrorResponder) + + // ListStaticSiteBuildAppSettings is the fake for method StaticSitesClient.ListStaticSiteBuildAppSettings + // HTTP status codes to indicate success: http.StatusOK + ListStaticSiteBuildAppSettings func(ctx context.Context, resourceGroupName string, name string, environmentName string, options *armappservice.StaticSitesClientListStaticSiteBuildAppSettingsOptions) (resp azfake.Responder[armappservice.StaticSitesClientListStaticSiteBuildAppSettingsResponse], errResp azfake.ErrorResponder) + + // ListStaticSiteBuildFunctionAppSettings is the fake for method StaticSitesClient.ListStaticSiteBuildFunctionAppSettings + // HTTP status codes to indicate success: http.StatusOK + ListStaticSiteBuildFunctionAppSettings func(ctx context.Context, resourceGroupName string, name string, environmentName string, options *armappservice.StaticSitesClientListStaticSiteBuildFunctionAppSettingsOptions) (resp azfake.Responder[armappservice.StaticSitesClientListStaticSiteBuildFunctionAppSettingsResponse], errResp azfake.ErrorResponder) + + // NewListStaticSiteBuildFunctionsPager is the fake for method StaticSitesClient.NewListStaticSiteBuildFunctionsPager + // HTTP status codes to indicate success: http.StatusOK + NewListStaticSiteBuildFunctionsPager func(resourceGroupName string, name string, environmentName string, options *armappservice.StaticSitesClientListStaticSiteBuildFunctionsOptions) (resp azfake.PagerResponder[armappservice.StaticSitesClientListStaticSiteBuildFunctionsResponse]) + + // ListStaticSiteConfiguredRoles is the fake for method StaticSitesClient.ListStaticSiteConfiguredRoles + // HTTP status codes to indicate success: http.StatusOK + ListStaticSiteConfiguredRoles func(ctx context.Context, resourceGroupName string, name string, options *armappservice.StaticSitesClientListStaticSiteConfiguredRolesOptions) (resp azfake.Responder[armappservice.StaticSitesClientListStaticSiteConfiguredRolesResponse], errResp azfake.ErrorResponder) + + // NewListStaticSiteCustomDomainsPager is the fake for method StaticSitesClient.NewListStaticSiteCustomDomainsPager + // HTTP status codes to indicate success: http.StatusOK + NewListStaticSiteCustomDomainsPager func(resourceGroupName string, name string, options *armappservice.StaticSitesClientListStaticSiteCustomDomainsOptions) (resp azfake.PagerResponder[armappservice.StaticSitesClientListStaticSiteCustomDomainsResponse]) + + // ListStaticSiteFunctionAppSettings is the fake for method StaticSitesClient.ListStaticSiteFunctionAppSettings + // HTTP status codes to indicate success: http.StatusOK + ListStaticSiteFunctionAppSettings func(ctx context.Context, resourceGroupName string, name string, options *armappservice.StaticSitesClientListStaticSiteFunctionAppSettingsOptions) (resp azfake.Responder[armappservice.StaticSitesClientListStaticSiteFunctionAppSettingsResponse], errResp azfake.ErrorResponder) + + // NewListStaticSiteFunctionsPager is the fake for method StaticSitesClient.NewListStaticSiteFunctionsPager + // HTTP status codes to indicate success: http.StatusOK + NewListStaticSiteFunctionsPager func(resourceGroupName string, name string, options *armappservice.StaticSitesClientListStaticSiteFunctionsOptions) (resp azfake.PagerResponder[armappservice.StaticSitesClientListStaticSiteFunctionsResponse]) + + // ListStaticSiteSecrets is the fake for method StaticSitesClient.ListStaticSiteSecrets + // HTTP status codes to indicate success: http.StatusOK + ListStaticSiteSecrets func(ctx context.Context, resourceGroupName string, name string, options *armappservice.StaticSitesClientListStaticSiteSecretsOptions) (resp azfake.Responder[armappservice.StaticSitesClientListStaticSiteSecretsResponse], errResp azfake.ErrorResponder) + + // NewListStaticSiteUsersPager is the fake for method StaticSitesClient.NewListStaticSiteUsersPager + // HTTP status codes to indicate success: http.StatusOK + NewListStaticSiteUsersPager func(resourceGroupName string, name string, authprovider string, options *armappservice.StaticSitesClientListStaticSiteUsersOptions) (resp azfake.PagerResponder[armappservice.StaticSitesClientListStaticSiteUsersResponse]) + + // PreviewWorkflow is the fake for method StaticSitesClient.PreviewWorkflow + // HTTP status codes to indicate success: http.StatusOK + PreviewWorkflow func(ctx context.Context, location string, staticSitesWorkflowPreviewRequest armappservice.StaticSitesWorkflowPreviewRequest, options *armappservice.StaticSitesClientPreviewWorkflowOptions) (resp azfake.Responder[armappservice.StaticSitesClientPreviewWorkflowResponse], errResp azfake.ErrorResponder) + + // BeginRegisterUserProvidedFunctionAppWithStaticSite is the fake for method StaticSitesClient.BeginRegisterUserProvidedFunctionAppWithStaticSite + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginRegisterUserProvidedFunctionAppWithStaticSite func(ctx context.Context, resourceGroupName string, name string, functionAppName string, staticSiteUserProvidedFunctionEnvelope armappservice.StaticSiteUserProvidedFunctionAppARMResource, options *armappservice.StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteOptions) (resp azfake.PollerResponder[armappservice.StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteResponse], errResp azfake.ErrorResponder) + + // BeginRegisterUserProvidedFunctionAppWithStaticSiteBuild is the fake for method StaticSitesClient.BeginRegisterUserProvidedFunctionAppWithStaticSiteBuild + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginRegisterUserProvidedFunctionAppWithStaticSiteBuild func(ctx context.Context, resourceGroupName string, name string, environmentName string, functionAppName string, staticSiteUserProvidedFunctionEnvelope armappservice.StaticSiteUserProvidedFunctionAppARMResource, options *armappservice.StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteBuildOptions) (resp azfake.PollerResponder[armappservice.StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildResponse], errResp azfake.ErrorResponder) + + // ResetStaticSiteAPIKey is the fake for method StaticSitesClient.ResetStaticSiteAPIKey + // HTTP status codes to indicate success: http.StatusOK + ResetStaticSiteAPIKey func(ctx context.Context, resourceGroupName string, name string, resetPropertiesEnvelope armappservice.StaticSiteResetPropertiesARMResource, options *armappservice.StaticSitesClientResetStaticSiteAPIKeyOptions) (resp azfake.Responder[armappservice.StaticSitesClientResetStaticSiteAPIKeyResponse], errResp azfake.ErrorResponder) + + // UnlinkBackend is the fake for method StaticSitesClient.UnlinkBackend + // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent + UnlinkBackend func(ctx context.Context, resourceGroupName string, name string, linkedBackendName string, options *armappservice.StaticSitesClientUnlinkBackendOptions) (resp azfake.Responder[armappservice.StaticSitesClientUnlinkBackendResponse], errResp azfake.ErrorResponder) + + // UnlinkBackendFromBuild is the fake for method StaticSitesClient.UnlinkBackendFromBuild + // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent + UnlinkBackendFromBuild func(ctx context.Context, resourceGroupName string, name string, environmentName string, linkedBackendName string, options *armappservice.StaticSitesClientUnlinkBackendFromBuildOptions) (resp azfake.Responder[armappservice.StaticSitesClientUnlinkBackendFromBuildResponse], errResp azfake.ErrorResponder) + + // UpdateBuildDatabaseConnection is the fake for method StaticSitesClient.UpdateBuildDatabaseConnection + // HTTP status codes to indicate success: http.StatusOK + UpdateBuildDatabaseConnection func(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string, databaseConnectionRequestEnvelope armappservice.DatabaseConnectionPatchRequest, options *armappservice.StaticSitesClientUpdateBuildDatabaseConnectionOptions) (resp azfake.Responder[armappservice.StaticSitesClientUpdateBuildDatabaseConnectionResponse], errResp azfake.ErrorResponder) + + // UpdateDatabaseConnection is the fake for method StaticSitesClient.UpdateDatabaseConnection + // HTTP status codes to indicate success: http.StatusOK + UpdateDatabaseConnection func(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string, databaseConnectionRequestEnvelope armappservice.DatabaseConnectionPatchRequest, options *armappservice.StaticSitesClientUpdateDatabaseConnectionOptions) (resp azfake.Responder[armappservice.StaticSitesClientUpdateDatabaseConnectionResponse], errResp azfake.ErrorResponder) + + // UpdateStaticSite is the fake for method StaticSitesClient.UpdateStaticSite + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + UpdateStaticSite func(ctx context.Context, resourceGroupName string, name string, staticSiteEnvelope armappservice.StaticSitePatchResource, options *armappservice.StaticSitesClientUpdateStaticSiteOptions) (resp azfake.Responder[armappservice.StaticSitesClientUpdateStaticSiteResponse], errResp azfake.ErrorResponder) + + // UpdateStaticSiteUser is the fake for method StaticSitesClient.UpdateStaticSiteUser + // HTTP status codes to indicate success: http.StatusOK + UpdateStaticSiteUser func(ctx context.Context, resourceGroupName string, name string, authprovider string, userid string, staticSiteUserEnvelope armappservice.StaticSiteUserARMResource, options *armappservice.StaticSitesClientUpdateStaticSiteUserOptions) (resp azfake.Responder[armappservice.StaticSitesClientUpdateStaticSiteUserResponse], errResp azfake.ErrorResponder) + + // BeginValidateBackend is the fake for method StaticSitesClient.BeginValidateBackend + // HTTP status codes to indicate success: http.StatusAccepted, http.StatusNoContent + BeginValidateBackend func(ctx context.Context, resourceGroupName string, name string, linkedBackendName string, staticSiteLinkedBackendEnvelope armappservice.StaticSiteLinkedBackendARMResource, options *armappservice.StaticSitesClientBeginValidateBackendOptions) (resp azfake.PollerResponder[armappservice.StaticSitesClientValidateBackendResponse], errResp azfake.ErrorResponder) + + // BeginValidateBackendForBuild is the fake for method StaticSitesClient.BeginValidateBackendForBuild + // HTTP status codes to indicate success: http.StatusAccepted, http.StatusNoContent + BeginValidateBackendForBuild func(ctx context.Context, resourceGroupName string, name string, environmentName string, linkedBackendName string, staticSiteLinkedBackendEnvelope armappservice.StaticSiteLinkedBackendARMResource, options *armappservice.StaticSitesClientBeginValidateBackendForBuildOptions) (resp azfake.PollerResponder[armappservice.StaticSitesClientValidateBackendForBuildResponse], errResp azfake.ErrorResponder) + + // BeginValidateCustomDomainCanBeAddedToStaticSite is the fake for method StaticSitesClient.BeginValidateCustomDomainCanBeAddedToStaticSite + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginValidateCustomDomainCanBeAddedToStaticSite func(ctx context.Context, resourceGroupName string, name string, domainName string, staticSiteCustomDomainRequestPropertiesEnvelope armappservice.StaticSiteCustomDomainRequestPropertiesARMResource, options *armappservice.StaticSitesClientBeginValidateCustomDomainCanBeAddedToStaticSiteOptions) (resp azfake.PollerResponder[armappservice.StaticSitesClientValidateCustomDomainCanBeAddedToStaticSiteResponse], errResp azfake.ErrorResponder) +} + +// NewStaticSitesServerTransport creates a new instance of StaticSitesServerTransport with the provided implementation. +// The returned StaticSitesServerTransport instance is connected to an instance of armappservice.StaticSitesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewStaticSitesServerTransport(srv *StaticSitesServer) *StaticSitesServerTransport { + return &StaticSitesServerTransport{ + srv: srv, + beginApproveOrRejectPrivateEndpointConnection: newTracker[azfake.PollerResponder[armappservice.StaticSitesClientApproveOrRejectPrivateEndpointConnectionResponse]](), + beginCreateOrUpdateStaticSite: newTracker[azfake.PollerResponder[armappservice.StaticSitesClientCreateOrUpdateStaticSiteResponse]](), + beginCreateOrUpdateStaticSiteCustomDomain: newTracker[azfake.PollerResponder[armappservice.StaticSitesClientCreateOrUpdateStaticSiteCustomDomainResponse]](), + beginCreateZipDeploymentForStaticSite: newTracker[azfake.PollerResponder[armappservice.StaticSitesClientCreateZipDeploymentForStaticSiteResponse]](), + beginCreateZipDeploymentForStaticSiteBuild: newTracker[azfake.PollerResponder[armappservice.StaticSitesClientCreateZipDeploymentForStaticSiteBuildResponse]](), + beginDeletePrivateEndpointConnection: newTracker[azfake.PollerResponder[armappservice.StaticSitesClientDeletePrivateEndpointConnectionResponse]](), + beginDeleteStaticSite: newTracker[azfake.PollerResponder[armappservice.StaticSitesClientDeleteStaticSiteResponse]](), + beginDeleteStaticSiteBuild: newTracker[azfake.PollerResponder[armappservice.StaticSitesClientDeleteStaticSiteBuildResponse]](), + beginDeleteStaticSiteCustomDomain: newTracker[azfake.PollerResponder[armappservice.StaticSitesClientDeleteStaticSiteCustomDomainResponse]](), + beginDetachStaticSite: newTracker[azfake.PollerResponder[armappservice.StaticSitesClientDetachStaticSiteResponse]](), + newGetBuildDatabaseConnectionsPager: newTracker[azfake.PagerResponder[armappservice.StaticSitesClientGetBuildDatabaseConnectionsResponse]](), + newGetBuildDatabaseConnectionsWithDetailsPager: newTracker[azfake.PagerResponder[armappservice.StaticSitesClientGetBuildDatabaseConnectionsWithDetailsResponse]](), + newGetDatabaseConnectionsPager: newTracker[azfake.PagerResponder[armappservice.StaticSitesClientGetDatabaseConnectionsResponse]](), + newGetDatabaseConnectionsWithDetailsPager: newTracker[azfake.PagerResponder[armappservice.StaticSitesClientGetDatabaseConnectionsWithDetailsResponse]](), + newGetLinkedBackendsPager: newTracker[azfake.PagerResponder[armappservice.StaticSitesClientGetLinkedBackendsResponse]](), + newGetLinkedBackendsForBuildPager: newTracker[azfake.PagerResponder[armappservice.StaticSitesClientGetLinkedBackendsForBuildResponse]](), + newGetPrivateEndpointConnectionListPager: newTracker[azfake.PagerResponder[armappservice.StaticSitesClientGetPrivateEndpointConnectionListResponse]](), + newGetStaticSiteBuildsPager: newTracker[azfake.PagerResponder[armappservice.StaticSitesClientGetStaticSiteBuildsResponse]](), + newGetStaticSitesByResourceGroupPager: newTracker[azfake.PagerResponder[armappservice.StaticSitesClientGetStaticSitesByResourceGroupResponse]](), + newGetUserProvidedFunctionAppsForStaticSitePager: newTracker[azfake.PagerResponder[armappservice.StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse]](), + newGetUserProvidedFunctionAppsForStaticSiteBuildPager: newTracker[azfake.PagerResponder[armappservice.StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse]](), + beginLinkBackend: newTracker[azfake.PollerResponder[armappservice.StaticSitesClientLinkBackendResponse]](), + beginLinkBackendToBuild: newTracker[azfake.PollerResponder[armappservice.StaticSitesClientLinkBackendToBuildResponse]](), + newListPager: newTracker[azfake.PagerResponder[armappservice.StaticSitesClientListResponse]](), + newListBasicAuthPager: newTracker[azfake.PagerResponder[armappservice.StaticSitesClientListBasicAuthResponse]](), + newListStaticSiteBuildFunctionsPager: newTracker[azfake.PagerResponder[armappservice.StaticSitesClientListStaticSiteBuildFunctionsResponse]](), + newListStaticSiteCustomDomainsPager: newTracker[azfake.PagerResponder[armappservice.StaticSitesClientListStaticSiteCustomDomainsResponse]](), + newListStaticSiteFunctionsPager: newTracker[azfake.PagerResponder[armappservice.StaticSitesClientListStaticSiteFunctionsResponse]](), + newListStaticSiteUsersPager: newTracker[azfake.PagerResponder[armappservice.StaticSitesClientListStaticSiteUsersResponse]](), + beginRegisterUserProvidedFunctionAppWithStaticSite: newTracker[azfake.PollerResponder[armappservice.StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteResponse]](), + beginRegisterUserProvidedFunctionAppWithStaticSiteBuild: newTracker[azfake.PollerResponder[armappservice.StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildResponse]](), + beginValidateBackend: newTracker[azfake.PollerResponder[armappservice.StaticSitesClientValidateBackendResponse]](), + beginValidateBackendForBuild: newTracker[azfake.PollerResponder[armappservice.StaticSitesClientValidateBackendForBuildResponse]](), + beginValidateCustomDomainCanBeAddedToStaticSite: newTracker[azfake.PollerResponder[armappservice.StaticSitesClientValidateCustomDomainCanBeAddedToStaticSiteResponse]](), + } +} + +// StaticSitesServerTransport connects instances of armappservice.StaticSitesClient to instances of StaticSitesServer. +// Don't use this type directly, use NewStaticSitesServerTransport instead. +type StaticSitesServerTransport struct { + srv *StaticSitesServer + beginApproveOrRejectPrivateEndpointConnection *tracker[azfake.PollerResponder[armappservice.StaticSitesClientApproveOrRejectPrivateEndpointConnectionResponse]] + beginCreateOrUpdateStaticSite *tracker[azfake.PollerResponder[armappservice.StaticSitesClientCreateOrUpdateStaticSiteResponse]] + beginCreateOrUpdateStaticSiteCustomDomain *tracker[azfake.PollerResponder[armappservice.StaticSitesClientCreateOrUpdateStaticSiteCustomDomainResponse]] + beginCreateZipDeploymentForStaticSite *tracker[azfake.PollerResponder[armappservice.StaticSitesClientCreateZipDeploymentForStaticSiteResponse]] + beginCreateZipDeploymentForStaticSiteBuild *tracker[azfake.PollerResponder[armappservice.StaticSitesClientCreateZipDeploymentForStaticSiteBuildResponse]] + beginDeletePrivateEndpointConnection *tracker[azfake.PollerResponder[armappservice.StaticSitesClientDeletePrivateEndpointConnectionResponse]] + beginDeleteStaticSite *tracker[azfake.PollerResponder[armappservice.StaticSitesClientDeleteStaticSiteResponse]] + beginDeleteStaticSiteBuild *tracker[azfake.PollerResponder[armappservice.StaticSitesClientDeleteStaticSiteBuildResponse]] + beginDeleteStaticSiteCustomDomain *tracker[azfake.PollerResponder[armappservice.StaticSitesClientDeleteStaticSiteCustomDomainResponse]] + beginDetachStaticSite *tracker[azfake.PollerResponder[armappservice.StaticSitesClientDetachStaticSiteResponse]] + newGetBuildDatabaseConnectionsPager *tracker[azfake.PagerResponder[armappservice.StaticSitesClientGetBuildDatabaseConnectionsResponse]] + newGetBuildDatabaseConnectionsWithDetailsPager *tracker[azfake.PagerResponder[armappservice.StaticSitesClientGetBuildDatabaseConnectionsWithDetailsResponse]] + newGetDatabaseConnectionsPager *tracker[azfake.PagerResponder[armappservice.StaticSitesClientGetDatabaseConnectionsResponse]] + newGetDatabaseConnectionsWithDetailsPager *tracker[azfake.PagerResponder[armappservice.StaticSitesClientGetDatabaseConnectionsWithDetailsResponse]] + newGetLinkedBackendsPager *tracker[azfake.PagerResponder[armappservice.StaticSitesClientGetLinkedBackendsResponse]] + newGetLinkedBackendsForBuildPager *tracker[azfake.PagerResponder[armappservice.StaticSitesClientGetLinkedBackendsForBuildResponse]] + newGetPrivateEndpointConnectionListPager *tracker[azfake.PagerResponder[armappservice.StaticSitesClientGetPrivateEndpointConnectionListResponse]] + newGetStaticSiteBuildsPager *tracker[azfake.PagerResponder[armappservice.StaticSitesClientGetStaticSiteBuildsResponse]] + newGetStaticSitesByResourceGroupPager *tracker[azfake.PagerResponder[armappservice.StaticSitesClientGetStaticSitesByResourceGroupResponse]] + newGetUserProvidedFunctionAppsForStaticSitePager *tracker[azfake.PagerResponder[armappservice.StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse]] + newGetUserProvidedFunctionAppsForStaticSiteBuildPager *tracker[azfake.PagerResponder[armappservice.StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse]] + beginLinkBackend *tracker[azfake.PollerResponder[armappservice.StaticSitesClientLinkBackendResponse]] + beginLinkBackendToBuild *tracker[azfake.PollerResponder[armappservice.StaticSitesClientLinkBackendToBuildResponse]] + newListPager *tracker[azfake.PagerResponder[armappservice.StaticSitesClientListResponse]] + newListBasicAuthPager *tracker[azfake.PagerResponder[armappservice.StaticSitesClientListBasicAuthResponse]] + newListStaticSiteBuildFunctionsPager *tracker[azfake.PagerResponder[armappservice.StaticSitesClientListStaticSiteBuildFunctionsResponse]] + newListStaticSiteCustomDomainsPager *tracker[azfake.PagerResponder[armappservice.StaticSitesClientListStaticSiteCustomDomainsResponse]] + newListStaticSiteFunctionsPager *tracker[azfake.PagerResponder[armappservice.StaticSitesClientListStaticSiteFunctionsResponse]] + newListStaticSiteUsersPager *tracker[azfake.PagerResponder[armappservice.StaticSitesClientListStaticSiteUsersResponse]] + beginRegisterUserProvidedFunctionAppWithStaticSite *tracker[azfake.PollerResponder[armappservice.StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteResponse]] + beginRegisterUserProvidedFunctionAppWithStaticSiteBuild *tracker[azfake.PollerResponder[armappservice.StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildResponse]] + beginValidateBackend *tracker[azfake.PollerResponder[armappservice.StaticSitesClientValidateBackendResponse]] + beginValidateBackendForBuild *tracker[azfake.PollerResponder[armappservice.StaticSitesClientValidateBackendForBuildResponse]] + beginValidateCustomDomainCanBeAddedToStaticSite *tracker[azfake.PollerResponder[armappservice.StaticSitesClientValidateCustomDomainCanBeAddedToStaticSiteResponse]] +} + +// Do implements the policy.Transporter interface for StaticSitesServerTransport. +func (s *StaticSitesServerTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + var resp *http.Response + var err error + + switch method { + case "StaticSitesClient.BeginApproveOrRejectPrivateEndpointConnection": + resp, err = s.dispatchBeginApproveOrRejectPrivateEndpointConnection(req) + case "StaticSitesClient.CreateOrUpdateBasicAuth": + resp, err = s.dispatchCreateOrUpdateBasicAuth(req) + case "StaticSitesClient.CreateOrUpdateBuildDatabaseConnection": + resp, err = s.dispatchCreateOrUpdateBuildDatabaseConnection(req) + case "StaticSitesClient.CreateOrUpdateDatabaseConnection": + resp, err = s.dispatchCreateOrUpdateDatabaseConnection(req) + case "StaticSitesClient.BeginCreateOrUpdateStaticSite": + resp, err = s.dispatchBeginCreateOrUpdateStaticSite(req) + case "StaticSitesClient.CreateOrUpdateStaticSiteAppSettings": + resp, err = s.dispatchCreateOrUpdateStaticSiteAppSettings(req) + case "StaticSitesClient.CreateOrUpdateStaticSiteBuildAppSettings": + resp, err = s.dispatchCreateOrUpdateStaticSiteBuildAppSettings(req) + case "StaticSitesClient.CreateOrUpdateStaticSiteBuildFunctionAppSettings": + resp, err = s.dispatchCreateOrUpdateStaticSiteBuildFunctionAppSettings(req) + case "StaticSitesClient.BeginCreateOrUpdateStaticSiteCustomDomain": + resp, err = s.dispatchBeginCreateOrUpdateStaticSiteCustomDomain(req) + case "StaticSitesClient.CreateOrUpdateStaticSiteFunctionAppSettings": + resp, err = s.dispatchCreateOrUpdateStaticSiteFunctionAppSettings(req) + case "StaticSitesClient.CreateUserRolesInvitationLink": + resp, err = s.dispatchCreateUserRolesInvitationLink(req) + case "StaticSitesClient.BeginCreateZipDeploymentForStaticSite": + resp, err = s.dispatchBeginCreateZipDeploymentForStaticSite(req) + case "StaticSitesClient.BeginCreateZipDeploymentForStaticSiteBuild": + resp, err = s.dispatchBeginCreateZipDeploymentForStaticSiteBuild(req) + case "StaticSitesClient.DeleteBuildDatabaseConnection": + resp, err = s.dispatchDeleteBuildDatabaseConnection(req) + case "StaticSitesClient.DeleteDatabaseConnection": + resp, err = s.dispatchDeleteDatabaseConnection(req) + case "StaticSitesClient.BeginDeletePrivateEndpointConnection": + resp, err = s.dispatchBeginDeletePrivateEndpointConnection(req) + case "StaticSitesClient.BeginDeleteStaticSite": + resp, err = s.dispatchBeginDeleteStaticSite(req) + case "StaticSitesClient.BeginDeleteStaticSiteBuild": + resp, err = s.dispatchBeginDeleteStaticSiteBuild(req) + case "StaticSitesClient.BeginDeleteStaticSiteCustomDomain": + resp, err = s.dispatchBeginDeleteStaticSiteCustomDomain(req) + case "StaticSitesClient.DeleteStaticSiteUser": + resp, err = s.dispatchDeleteStaticSiteUser(req) + case "StaticSitesClient.BeginDetachStaticSite": + resp, err = s.dispatchBeginDetachStaticSite(req) + case "StaticSitesClient.DetachUserProvidedFunctionAppFromStaticSite": + resp, err = s.dispatchDetachUserProvidedFunctionAppFromStaticSite(req) + case "StaticSitesClient.DetachUserProvidedFunctionAppFromStaticSiteBuild": + resp, err = s.dispatchDetachUserProvidedFunctionAppFromStaticSiteBuild(req) + case "StaticSitesClient.GetBasicAuth": + resp, err = s.dispatchGetBasicAuth(req) + case "StaticSitesClient.GetBuildDatabaseConnection": + resp, err = s.dispatchGetBuildDatabaseConnection(req) + case "StaticSitesClient.GetBuildDatabaseConnectionWithDetails": + resp, err = s.dispatchGetBuildDatabaseConnectionWithDetails(req) + case "StaticSitesClient.NewGetBuildDatabaseConnectionsPager": + resp, err = s.dispatchNewGetBuildDatabaseConnectionsPager(req) + case "StaticSitesClient.NewGetBuildDatabaseConnectionsWithDetailsPager": + resp, err = s.dispatchNewGetBuildDatabaseConnectionsWithDetailsPager(req) + case "StaticSitesClient.GetDatabaseConnection": + resp, err = s.dispatchGetDatabaseConnection(req) + case "StaticSitesClient.GetDatabaseConnectionWithDetails": + resp, err = s.dispatchGetDatabaseConnectionWithDetails(req) + case "StaticSitesClient.NewGetDatabaseConnectionsPager": + resp, err = s.dispatchNewGetDatabaseConnectionsPager(req) + case "StaticSitesClient.NewGetDatabaseConnectionsWithDetailsPager": + resp, err = s.dispatchNewGetDatabaseConnectionsWithDetailsPager(req) + case "StaticSitesClient.GetLinkedBackend": + resp, err = s.dispatchGetLinkedBackend(req) + case "StaticSitesClient.GetLinkedBackendForBuild": + resp, err = s.dispatchGetLinkedBackendForBuild(req) + case "StaticSitesClient.NewGetLinkedBackendsPager": + resp, err = s.dispatchNewGetLinkedBackendsPager(req) + case "StaticSitesClient.NewGetLinkedBackendsForBuildPager": + resp, err = s.dispatchNewGetLinkedBackendsForBuildPager(req) + case "StaticSitesClient.GetPrivateEndpointConnection": + resp, err = s.dispatchGetPrivateEndpointConnection(req) + case "StaticSitesClient.NewGetPrivateEndpointConnectionListPager": + resp, err = s.dispatchNewGetPrivateEndpointConnectionListPager(req) + case "StaticSitesClient.GetPrivateLinkResources": + resp, err = s.dispatchGetPrivateLinkResources(req) + case "StaticSitesClient.GetStaticSite": + resp, err = s.dispatchGetStaticSite(req) + case "StaticSitesClient.GetStaticSiteBuild": + resp, err = s.dispatchGetStaticSiteBuild(req) + case "StaticSitesClient.NewGetStaticSiteBuildsPager": + resp, err = s.dispatchNewGetStaticSiteBuildsPager(req) + case "StaticSitesClient.GetStaticSiteCustomDomain": + resp, err = s.dispatchGetStaticSiteCustomDomain(req) + case "StaticSitesClient.NewGetStaticSitesByResourceGroupPager": + resp, err = s.dispatchNewGetStaticSitesByResourceGroupPager(req) + case "StaticSitesClient.GetUserProvidedFunctionAppForStaticSite": + resp, err = s.dispatchGetUserProvidedFunctionAppForStaticSite(req) + case "StaticSitesClient.GetUserProvidedFunctionAppForStaticSiteBuild": + resp, err = s.dispatchGetUserProvidedFunctionAppForStaticSiteBuild(req) + case "StaticSitesClient.NewGetUserProvidedFunctionAppsForStaticSitePager": + resp, err = s.dispatchNewGetUserProvidedFunctionAppsForStaticSitePager(req) + case "StaticSitesClient.NewGetUserProvidedFunctionAppsForStaticSiteBuildPager": + resp, err = s.dispatchNewGetUserProvidedFunctionAppsForStaticSiteBuildPager(req) + case "StaticSitesClient.BeginLinkBackend": + resp, err = s.dispatchBeginLinkBackend(req) + case "StaticSitesClient.BeginLinkBackendToBuild": + resp, err = s.dispatchBeginLinkBackendToBuild(req) + case "StaticSitesClient.NewListPager": + resp, err = s.dispatchNewListPager(req) + case "StaticSitesClient.NewListBasicAuthPager": + resp, err = s.dispatchNewListBasicAuthPager(req) + case "StaticSitesClient.ListStaticSiteAppSettings": + resp, err = s.dispatchListStaticSiteAppSettings(req) + case "StaticSitesClient.ListStaticSiteBuildAppSettings": + resp, err = s.dispatchListStaticSiteBuildAppSettings(req) + case "StaticSitesClient.ListStaticSiteBuildFunctionAppSettings": + resp, err = s.dispatchListStaticSiteBuildFunctionAppSettings(req) + case "StaticSitesClient.NewListStaticSiteBuildFunctionsPager": + resp, err = s.dispatchNewListStaticSiteBuildFunctionsPager(req) + case "StaticSitesClient.ListStaticSiteConfiguredRoles": + resp, err = s.dispatchListStaticSiteConfiguredRoles(req) + case "StaticSitesClient.NewListStaticSiteCustomDomainsPager": + resp, err = s.dispatchNewListStaticSiteCustomDomainsPager(req) + case "StaticSitesClient.ListStaticSiteFunctionAppSettings": + resp, err = s.dispatchListStaticSiteFunctionAppSettings(req) + case "StaticSitesClient.NewListStaticSiteFunctionsPager": + resp, err = s.dispatchNewListStaticSiteFunctionsPager(req) + case "StaticSitesClient.ListStaticSiteSecrets": + resp, err = s.dispatchListStaticSiteSecrets(req) + case "StaticSitesClient.NewListStaticSiteUsersPager": + resp, err = s.dispatchNewListStaticSiteUsersPager(req) + case "StaticSitesClient.PreviewWorkflow": + resp, err = s.dispatchPreviewWorkflow(req) + case "StaticSitesClient.BeginRegisterUserProvidedFunctionAppWithStaticSite": + resp, err = s.dispatchBeginRegisterUserProvidedFunctionAppWithStaticSite(req) + case "StaticSitesClient.BeginRegisterUserProvidedFunctionAppWithStaticSiteBuild": + resp, err = s.dispatchBeginRegisterUserProvidedFunctionAppWithStaticSiteBuild(req) + case "StaticSitesClient.ResetStaticSiteAPIKey": + resp, err = s.dispatchResetStaticSiteAPIKey(req) + case "StaticSitesClient.UnlinkBackend": + resp, err = s.dispatchUnlinkBackend(req) + case "StaticSitesClient.UnlinkBackendFromBuild": + resp, err = s.dispatchUnlinkBackendFromBuild(req) + case "StaticSitesClient.UpdateBuildDatabaseConnection": + resp, err = s.dispatchUpdateBuildDatabaseConnection(req) + case "StaticSitesClient.UpdateDatabaseConnection": + resp, err = s.dispatchUpdateDatabaseConnection(req) + case "StaticSitesClient.UpdateStaticSite": + resp, err = s.dispatchUpdateStaticSite(req) + case "StaticSitesClient.UpdateStaticSiteUser": + resp, err = s.dispatchUpdateStaticSiteUser(req) + case "StaticSitesClient.BeginValidateBackend": + resp, err = s.dispatchBeginValidateBackend(req) + case "StaticSitesClient.BeginValidateBackendForBuild": + resp, err = s.dispatchBeginValidateBackendForBuild(req) + case "StaticSitesClient.BeginValidateCustomDomainCanBeAddedToStaticSite": + resp, err = s.dispatchBeginValidateCustomDomainCanBeAddedToStaticSite(req) + default: + err = fmt.Errorf("unhandled API %s", method) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchBeginApproveOrRejectPrivateEndpointConnection(req *http.Request) (*http.Response, error) { + if s.srv.BeginApproveOrRejectPrivateEndpointConnection == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginApproveOrRejectPrivateEndpointConnection not implemented")} + } + beginApproveOrRejectPrivateEndpointConnection := s.beginApproveOrRejectPrivateEndpointConnection.get(req) + if beginApproveOrRejectPrivateEndpointConnection == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateEndpointConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.PrivateLinkConnectionApprovalRequestResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + privateEndpointConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("privateEndpointConnectionName")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.BeginApproveOrRejectPrivateEndpointConnection(req.Context(), resourceGroupNameParam, nameParam, privateEndpointConnectionNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginApproveOrRejectPrivateEndpointConnection = &respr + s.beginApproveOrRejectPrivateEndpointConnection.add(req, beginApproveOrRejectPrivateEndpointConnection) + } + + resp, err := server.PollerResponderNext(beginApproveOrRejectPrivateEndpointConnection, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + s.beginApproveOrRejectPrivateEndpointConnection.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginApproveOrRejectPrivateEndpointConnection) { + s.beginApproveOrRejectPrivateEndpointConnection.remove(req) + } + + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchCreateOrUpdateBasicAuth(req *http.Request) (*http.Response, error) { + if s.srv.CreateOrUpdateBasicAuth == nil { + return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdateBasicAuth not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/basicAuth/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.StaticSiteBasicAuthPropertiesARMResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + basicAuthNameParam, err := parseWithCast(matches[regex.SubexpIndex("basicAuthName")], func(v string) (armappservice.BasicAuthName, error) { + p, unescapeErr := url.PathUnescape(v) + if unescapeErr != nil { + return "", unescapeErr + } + return armappservice.BasicAuthName(p), nil + }) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.CreateOrUpdateBasicAuth(req.Context(), resourceGroupNameParam, nameParam, basicAuthNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).StaticSiteBasicAuthPropertiesARMResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchCreateOrUpdateBuildDatabaseConnection(req *http.Request) (*http.Response, error) { + if s.srv.CreateOrUpdateBuildDatabaseConnection == nil { + return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdateBuildDatabaseConnection not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/builds/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/databaseConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.DatabaseConnection](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + environmentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("environmentName")]) + if err != nil { + return nil, err + } + databaseConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("databaseConnectionName")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.CreateOrUpdateBuildDatabaseConnection(req.Context(), resourceGroupNameParam, nameParam, environmentNameParam, databaseConnectionNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).DatabaseConnection, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchCreateOrUpdateDatabaseConnection(req *http.Request) (*http.Response, error) { + if s.srv.CreateOrUpdateDatabaseConnection == nil { + return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdateDatabaseConnection not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/databaseConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.DatabaseConnection](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + databaseConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("databaseConnectionName")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.CreateOrUpdateDatabaseConnection(req.Context(), resourceGroupNameParam, nameParam, databaseConnectionNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).DatabaseConnection, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchBeginCreateOrUpdateStaticSite(req *http.Request) (*http.Response, error) { + if s.srv.BeginCreateOrUpdateStaticSite == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdateStaticSite not implemented")} + } + beginCreateOrUpdateStaticSite := s.beginCreateOrUpdateStaticSite.get(req) + if beginCreateOrUpdateStaticSite == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.StaticSiteARMResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.BeginCreateOrUpdateStaticSite(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginCreateOrUpdateStaticSite = &respr + s.beginCreateOrUpdateStaticSite.add(req, beginCreateOrUpdateStaticSite) + } + + resp, err := server.PollerResponderNext(beginCreateOrUpdateStaticSite, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + s.beginCreateOrUpdateStaticSite.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginCreateOrUpdateStaticSite) { + s.beginCreateOrUpdateStaticSite.remove(req) + } + + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchCreateOrUpdateStaticSiteAppSettings(req *http.Request) (*http.Response, error) { + if s.srv.CreateOrUpdateStaticSiteAppSettings == nil { + return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdateStaticSiteAppSettings not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/appsettings` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.StringDictionary](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.CreateOrUpdateStaticSiteAppSettings(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).StringDictionary, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchCreateOrUpdateStaticSiteBuildAppSettings(req *http.Request) (*http.Response, error) { + if s.srv.CreateOrUpdateStaticSiteBuildAppSettings == nil { + return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdateStaticSiteBuildAppSettings not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/builds/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/appsettings` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.StringDictionary](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + environmentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("environmentName")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.CreateOrUpdateStaticSiteBuildAppSettings(req.Context(), resourceGroupNameParam, nameParam, environmentNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).StringDictionary, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchCreateOrUpdateStaticSiteBuildFunctionAppSettings(req *http.Request) (*http.Response, error) { + if s.srv.CreateOrUpdateStaticSiteBuildFunctionAppSettings == nil { + return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdateStaticSiteBuildFunctionAppSettings not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/builds/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/functionappsettings` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.StringDictionary](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + environmentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("environmentName")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.CreateOrUpdateStaticSiteBuildFunctionAppSettings(req.Context(), resourceGroupNameParam, nameParam, environmentNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).StringDictionary, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchBeginCreateOrUpdateStaticSiteCustomDomain(req *http.Request) (*http.Response, error) { + if s.srv.BeginCreateOrUpdateStaticSiteCustomDomain == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdateStaticSiteCustomDomain not implemented")} + } + beginCreateOrUpdateStaticSiteCustomDomain := s.beginCreateOrUpdateStaticSiteCustomDomain.get(req) + if beginCreateOrUpdateStaticSiteCustomDomain == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/customDomains/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.StaticSiteCustomDomainRequestPropertiesARMResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + domainNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("domainName")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.BeginCreateOrUpdateStaticSiteCustomDomain(req.Context(), resourceGroupNameParam, nameParam, domainNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginCreateOrUpdateStaticSiteCustomDomain = &respr + s.beginCreateOrUpdateStaticSiteCustomDomain.add(req, beginCreateOrUpdateStaticSiteCustomDomain) + } + + resp, err := server.PollerResponderNext(beginCreateOrUpdateStaticSiteCustomDomain, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + s.beginCreateOrUpdateStaticSiteCustomDomain.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginCreateOrUpdateStaticSiteCustomDomain) { + s.beginCreateOrUpdateStaticSiteCustomDomain.remove(req) + } + + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchCreateOrUpdateStaticSiteFunctionAppSettings(req *http.Request) (*http.Response, error) { + if s.srv.CreateOrUpdateStaticSiteFunctionAppSettings == nil { + return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdateStaticSiteFunctionAppSettings not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/functionappsettings` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.StringDictionary](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.CreateOrUpdateStaticSiteFunctionAppSettings(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).StringDictionary, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchCreateUserRolesInvitationLink(req *http.Request) (*http.Response, error) { + if s.srv.CreateUserRolesInvitationLink == nil { + return nil, &nonRetriableError{errors.New("fake for method CreateUserRolesInvitationLink not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/createUserInvitation` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.StaticSiteUserInvitationRequestResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.CreateUserRolesInvitationLink(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).StaticSiteUserInvitationResponseResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchBeginCreateZipDeploymentForStaticSite(req *http.Request) (*http.Response, error) { + if s.srv.BeginCreateZipDeploymentForStaticSite == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginCreateZipDeploymentForStaticSite not implemented")} + } + beginCreateZipDeploymentForStaticSite := s.beginCreateZipDeploymentForStaticSite.get(req) + if beginCreateZipDeploymentForStaticSite == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/zipdeploy` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.StaticSiteZipDeploymentARMResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.BeginCreateZipDeploymentForStaticSite(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginCreateZipDeploymentForStaticSite = &respr + s.beginCreateZipDeploymentForStaticSite.add(req, beginCreateZipDeploymentForStaticSite) + } + + resp, err := server.PollerResponderNext(beginCreateZipDeploymentForStaticSite, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + s.beginCreateZipDeploymentForStaticSite.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginCreateZipDeploymentForStaticSite) { + s.beginCreateZipDeploymentForStaticSite.remove(req) + } + + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchBeginCreateZipDeploymentForStaticSiteBuild(req *http.Request) (*http.Response, error) { + if s.srv.BeginCreateZipDeploymentForStaticSiteBuild == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginCreateZipDeploymentForStaticSiteBuild not implemented")} + } + beginCreateZipDeploymentForStaticSiteBuild := s.beginCreateZipDeploymentForStaticSiteBuild.get(req) + if beginCreateZipDeploymentForStaticSiteBuild == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/builds/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/zipdeploy` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.StaticSiteZipDeploymentARMResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + environmentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("environmentName")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.BeginCreateZipDeploymentForStaticSiteBuild(req.Context(), resourceGroupNameParam, nameParam, environmentNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginCreateZipDeploymentForStaticSiteBuild = &respr + s.beginCreateZipDeploymentForStaticSiteBuild.add(req, beginCreateZipDeploymentForStaticSiteBuild) + } + + resp, err := server.PollerResponderNext(beginCreateZipDeploymentForStaticSiteBuild, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + s.beginCreateZipDeploymentForStaticSiteBuild.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginCreateZipDeploymentForStaticSiteBuild) { + s.beginCreateZipDeploymentForStaticSiteBuild.remove(req) + } + + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchDeleteBuildDatabaseConnection(req *http.Request) (*http.Response, error) { + if s.srv.DeleteBuildDatabaseConnection == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteBuildDatabaseConnection not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/builds/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/databaseConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + environmentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("environmentName")]) + if err != nil { + return nil, err + } + databaseConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("databaseConnectionName")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.DeleteBuildDatabaseConnection(req.Context(), resourceGroupNameParam, nameParam, environmentNameParam, databaseConnectionNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchDeleteDatabaseConnection(req *http.Request) (*http.Response, error) { + if s.srv.DeleteDatabaseConnection == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteDatabaseConnection not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/databaseConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + databaseConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("databaseConnectionName")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.DeleteDatabaseConnection(req.Context(), resourceGroupNameParam, nameParam, databaseConnectionNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchBeginDeletePrivateEndpointConnection(req *http.Request) (*http.Response, error) { + if s.srv.BeginDeletePrivateEndpointConnection == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginDeletePrivateEndpointConnection not implemented")} + } + beginDeletePrivateEndpointConnection := s.beginDeletePrivateEndpointConnection.get(req) + if beginDeletePrivateEndpointConnection == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateEndpointConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + privateEndpointConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("privateEndpointConnectionName")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.BeginDeletePrivateEndpointConnection(req.Context(), resourceGroupNameParam, nameParam, privateEndpointConnectionNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginDeletePrivateEndpointConnection = &respr + s.beginDeletePrivateEndpointConnection.add(req, beginDeletePrivateEndpointConnection) + } + + resp, err := server.PollerResponderNext(beginDeletePrivateEndpointConnection, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + s.beginDeletePrivateEndpointConnection.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + } + if !server.PollerResponderMore(beginDeletePrivateEndpointConnection) { + s.beginDeletePrivateEndpointConnection.remove(req) + } + + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchBeginDeleteStaticSite(req *http.Request) (*http.Response, error) { + if s.srv.BeginDeleteStaticSite == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginDeleteStaticSite not implemented")} + } + beginDeleteStaticSite := s.beginDeleteStaticSite.get(req) + if beginDeleteStaticSite == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.BeginDeleteStaticSite(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginDeleteStaticSite = &respr + s.beginDeleteStaticSite.add(req, beginDeleteStaticSite) + } + + resp, err := server.PollerResponderNext(beginDeleteStaticSite, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + s.beginDeleteStaticSite.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginDeleteStaticSite) { + s.beginDeleteStaticSite.remove(req) + } + + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchBeginDeleteStaticSiteBuild(req *http.Request) (*http.Response, error) { + if s.srv.BeginDeleteStaticSiteBuild == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginDeleteStaticSiteBuild not implemented")} + } + beginDeleteStaticSiteBuild := s.beginDeleteStaticSiteBuild.get(req) + if beginDeleteStaticSiteBuild == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/builds/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + environmentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("environmentName")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.BeginDeleteStaticSiteBuild(req.Context(), resourceGroupNameParam, nameParam, environmentNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginDeleteStaticSiteBuild = &respr + s.beginDeleteStaticSiteBuild.add(req, beginDeleteStaticSiteBuild) + } + + resp, err := server.PollerResponderNext(beginDeleteStaticSiteBuild, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + s.beginDeleteStaticSiteBuild.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + } + if !server.PollerResponderMore(beginDeleteStaticSiteBuild) { + s.beginDeleteStaticSiteBuild.remove(req) + } + + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchBeginDeleteStaticSiteCustomDomain(req *http.Request) (*http.Response, error) { + if s.srv.BeginDeleteStaticSiteCustomDomain == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginDeleteStaticSiteCustomDomain not implemented")} + } + beginDeleteStaticSiteCustomDomain := s.beginDeleteStaticSiteCustomDomain.get(req) + if beginDeleteStaticSiteCustomDomain == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/customDomains/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + domainNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("domainName")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.BeginDeleteStaticSiteCustomDomain(req.Context(), resourceGroupNameParam, nameParam, domainNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginDeleteStaticSiteCustomDomain = &respr + s.beginDeleteStaticSiteCustomDomain.add(req, beginDeleteStaticSiteCustomDomain) + } + + resp, err := server.PollerResponderNext(beginDeleteStaticSiteCustomDomain, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + s.beginDeleteStaticSiteCustomDomain.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginDeleteStaticSiteCustomDomain) { + s.beginDeleteStaticSiteCustomDomain.remove(req) + } + + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchDeleteStaticSiteUser(req *http.Request) (*http.Response, error) { + if s.srv.DeleteStaticSiteUser == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteStaticSiteUser not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/authproviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/users/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + authproviderParam, err := url.PathUnescape(matches[regex.SubexpIndex("authprovider")]) + if err != nil { + return nil, err + } + useridParam, err := url.PathUnescape(matches[regex.SubexpIndex("userid")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.DeleteStaticSiteUser(req.Context(), resourceGroupNameParam, nameParam, authproviderParam, useridParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchBeginDetachStaticSite(req *http.Request) (*http.Response, error) { + if s.srv.BeginDetachStaticSite == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginDetachStaticSite not implemented")} + } + beginDetachStaticSite := s.beginDetachStaticSite.get(req) + if beginDetachStaticSite == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/detach` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.BeginDetachStaticSite(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginDetachStaticSite = &respr + s.beginDetachStaticSite.add(req, beginDetachStaticSite) + } + + resp, err := server.PollerResponderNext(beginDetachStaticSite, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + s.beginDetachStaticSite.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginDetachStaticSite) { + s.beginDetachStaticSite.remove(req) + } + + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchDetachUserProvidedFunctionAppFromStaticSite(req *http.Request) (*http.Response, error) { + if s.srv.DetachUserProvidedFunctionAppFromStaticSite == nil { + return nil, &nonRetriableError{errors.New("fake for method DetachUserProvidedFunctionAppFromStaticSite not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/userProvidedFunctionApps/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + functionAppNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("functionAppName")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.DetachUserProvidedFunctionAppFromStaticSite(req.Context(), resourceGroupNameParam, nameParam, functionAppNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchDetachUserProvidedFunctionAppFromStaticSiteBuild(req *http.Request) (*http.Response, error) { + if s.srv.DetachUserProvidedFunctionAppFromStaticSiteBuild == nil { + return nil, &nonRetriableError{errors.New("fake for method DetachUserProvidedFunctionAppFromStaticSiteBuild not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/builds/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/userProvidedFunctionApps/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + environmentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("environmentName")]) + if err != nil { + return nil, err + } + functionAppNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("functionAppName")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.DetachUserProvidedFunctionAppFromStaticSiteBuild(req.Context(), resourceGroupNameParam, nameParam, environmentNameParam, functionAppNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchGetBasicAuth(req *http.Request) (*http.Response, error) { + if s.srv.GetBasicAuth == nil { + return nil, &nonRetriableError{errors.New("fake for method GetBasicAuth not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/basicAuth/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + basicAuthNameParam, err := parseWithCast(matches[regex.SubexpIndex("basicAuthName")], func(v string) (armappservice.BasicAuthName, error) { + p, unescapeErr := url.PathUnescape(v) + if unescapeErr != nil { + return "", unescapeErr + } + return armappservice.BasicAuthName(p), nil + }) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.GetBasicAuth(req.Context(), resourceGroupNameParam, nameParam, basicAuthNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).StaticSiteBasicAuthPropertiesARMResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchGetBuildDatabaseConnection(req *http.Request) (*http.Response, error) { + if s.srv.GetBuildDatabaseConnection == nil { + return nil, &nonRetriableError{errors.New("fake for method GetBuildDatabaseConnection not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/builds/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/databaseConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + environmentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("environmentName")]) + if err != nil { + return nil, err + } + databaseConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("databaseConnectionName")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.GetBuildDatabaseConnection(req.Context(), resourceGroupNameParam, nameParam, environmentNameParam, databaseConnectionNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).DatabaseConnection, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchGetBuildDatabaseConnectionWithDetails(req *http.Request) (*http.Response, error) { + if s.srv.GetBuildDatabaseConnectionWithDetails == nil { + return nil, &nonRetriableError{errors.New("fake for method GetBuildDatabaseConnectionWithDetails not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/builds/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/databaseConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/show` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + environmentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("environmentName")]) + if err != nil { + return nil, err + } + databaseConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("databaseConnectionName")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.GetBuildDatabaseConnectionWithDetails(req.Context(), resourceGroupNameParam, nameParam, environmentNameParam, databaseConnectionNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).DatabaseConnection, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchNewGetBuildDatabaseConnectionsPager(req *http.Request) (*http.Response, error) { + if s.srv.NewGetBuildDatabaseConnectionsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewGetBuildDatabaseConnectionsPager not implemented")} + } + newGetBuildDatabaseConnectionsPager := s.newGetBuildDatabaseConnectionsPager.get(req) + if newGetBuildDatabaseConnectionsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/builds/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/databaseConnections` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + environmentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("environmentName")]) + if err != nil { + return nil, err + } + resp := s.srv.NewGetBuildDatabaseConnectionsPager(resourceGroupNameParam, nameParam, environmentNameParam, nil) + newGetBuildDatabaseConnectionsPager = &resp + s.newGetBuildDatabaseConnectionsPager.add(req, newGetBuildDatabaseConnectionsPager) + server.PagerResponderInjectNextLinks(newGetBuildDatabaseConnectionsPager, req, func(page *armappservice.StaticSitesClientGetBuildDatabaseConnectionsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newGetBuildDatabaseConnectionsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + s.newGetBuildDatabaseConnectionsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newGetBuildDatabaseConnectionsPager) { + s.newGetBuildDatabaseConnectionsPager.remove(req) + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchNewGetBuildDatabaseConnectionsWithDetailsPager(req *http.Request) (*http.Response, error) { + if s.srv.NewGetBuildDatabaseConnectionsWithDetailsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewGetBuildDatabaseConnectionsWithDetailsPager not implemented")} + } + newGetBuildDatabaseConnectionsWithDetailsPager := s.newGetBuildDatabaseConnectionsWithDetailsPager.get(req) + if newGetBuildDatabaseConnectionsWithDetailsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/builds/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/showDatabaseConnections` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + environmentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("environmentName")]) + if err != nil { + return nil, err + } + resp := s.srv.NewGetBuildDatabaseConnectionsWithDetailsPager(resourceGroupNameParam, nameParam, environmentNameParam, nil) + newGetBuildDatabaseConnectionsWithDetailsPager = &resp + s.newGetBuildDatabaseConnectionsWithDetailsPager.add(req, newGetBuildDatabaseConnectionsWithDetailsPager) + server.PagerResponderInjectNextLinks(newGetBuildDatabaseConnectionsWithDetailsPager, req, func(page *armappservice.StaticSitesClientGetBuildDatabaseConnectionsWithDetailsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newGetBuildDatabaseConnectionsWithDetailsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + s.newGetBuildDatabaseConnectionsWithDetailsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newGetBuildDatabaseConnectionsWithDetailsPager) { + s.newGetBuildDatabaseConnectionsWithDetailsPager.remove(req) + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchGetDatabaseConnection(req *http.Request) (*http.Response, error) { + if s.srv.GetDatabaseConnection == nil { + return nil, &nonRetriableError{errors.New("fake for method GetDatabaseConnection not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/databaseConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + databaseConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("databaseConnectionName")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.GetDatabaseConnection(req.Context(), resourceGroupNameParam, nameParam, databaseConnectionNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).DatabaseConnection, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchGetDatabaseConnectionWithDetails(req *http.Request) (*http.Response, error) { + if s.srv.GetDatabaseConnectionWithDetails == nil { + return nil, &nonRetriableError{errors.New("fake for method GetDatabaseConnectionWithDetails not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/databaseConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/show` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + databaseConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("databaseConnectionName")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.GetDatabaseConnectionWithDetails(req.Context(), resourceGroupNameParam, nameParam, databaseConnectionNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).DatabaseConnection, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchNewGetDatabaseConnectionsPager(req *http.Request) (*http.Response, error) { + if s.srv.NewGetDatabaseConnectionsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewGetDatabaseConnectionsPager not implemented")} + } + newGetDatabaseConnectionsPager := s.newGetDatabaseConnectionsPager.get(req) + if newGetDatabaseConnectionsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/databaseConnections` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := s.srv.NewGetDatabaseConnectionsPager(resourceGroupNameParam, nameParam, nil) + newGetDatabaseConnectionsPager = &resp + s.newGetDatabaseConnectionsPager.add(req, newGetDatabaseConnectionsPager) + server.PagerResponderInjectNextLinks(newGetDatabaseConnectionsPager, req, func(page *armappservice.StaticSitesClientGetDatabaseConnectionsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newGetDatabaseConnectionsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + s.newGetDatabaseConnectionsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newGetDatabaseConnectionsPager) { + s.newGetDatabaseConnectionsPager.remove(req) + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchNewGetDatabaseConnectionsWithDetailsPager(req *http.Request) (*http.Response, error) { + if s.srv.NewGetDatabaseConnectionsWithDetailsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewGetDatabaseConnectionsWithDetailsPager not implemented")} + } + newGetDatabaseConnectionsWithDetailsPager := s.newGetDatabaseConnectionsWithDetailsPager.get(req) + if newGetDatabaseConnectionsWithDetailsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/showDatabaseConnections` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := s.srv.NewGetDatabaseConnectionsWithDetailsPager(resourceGroupNameParam, nameParam, nil) + newGetDatabaseConnectionsWithDetailsPager = &resp + s.newGetDatabaseConnectionsWithDetailsPager.add(req, newGetDatabaseConnectionsWithDetailsPager) + server.PagerResponderInjectNextLinks(newGetDatabaseConnectionsWithDetailsPager, req, func(page *armappservice.StaticSitesClientGetDatabaseConnectionsWithDetailsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newGetDatabaseConnectionsWithDetailsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + s.newGetDatabaseConnectionsWithDetailsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newGetDatabaseConnectionsWithDetailsPager) { + s.newGetDatabaseConnectionsWithDetailsPager.remove(req) + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchGetLinkedBackend(req *http.Request) (*http.Response, error) { + if s.srv.GetLinkedBackend == nil { + return nil, &nonRetriableError{errors.New("fake for method GetLinkedBackend not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/linkedBackends/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + linkedBackendNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("linkedBackendName")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.GetLinkedBackend(req.Context(), resourceGroupNameParam, nameParam, linkedBackendNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).StaticSiteLinkedBackendARMResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchGetLinkedBackendForBuild(req *http.Request) (*http.Response, error) { + if s.srv.GetLinkedBackendForBuild == nil { + return nil, &nonRetriableError{errors.New("fake for method GetLinkedBackendForBuild not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/builds/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/linkedBackends/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + environmentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("environmentName")]) + if err != nil { + return nil, err + } + linkedBackendNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("linkedBackendName")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.GetLinkedBackendForBuild(req.Context(), resourceGroupNameParam, nameParam, environmentNameParam, linkedBackendNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).StaticSiteLinkedBackendARMResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchNewGetLinkedBackendsPager(req *http.Request) (*http.Response, error) { + if s.srv.NewGetLinkedBackendsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewGetLinkedBackendsPager not implemented")} + } + newGetLinkedBackendsPager := s.newGetLinkedBackendsPager.get(req) + if newGetLinkedBackendsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/linkedBackends` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := s.srv.NewGetLinkedBackendsPager(resourceGroupNameParam, nameParam, nil) + newGetLinkedBackendsPager = &resp + s.newGetLinkedBackendsPager.add(req, newGetLinkedBackendsPager) + server.PagerResponderInjectNextLinks(newGetLinkedBackendsPager, req, func(page *armappservice.StaticSitesClientGetLinkedBackendsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newGetLinkedBackendsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + s.newGetLinkedBackendsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newGetLinkedBackendsPager) { + s.newGetLinkedBackendsPager.remove(req) + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchNewGetLinkedBackendsForBuildPager(req *http.Request) (*http.Response, error) { + if s.srv.NewGetLinkedBackendsForBuildPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewGetLinkedBackendsForBuildPager not implemented")} + } + newGetLinkedBackendsForBuildPager := s.newGetLinkedBackendsForBuildPager.get(req) + if newGetLinkedBackendsForBuildPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/builds/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/linkedBackends` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + environmentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("environmentName")]) + if err != nil { + return nil, err + } + resp := s.srv.NewGetLinkedBackendsForBuildPager(resourceGroupNameParam, nameParam, environmentNameParam, nil) + newGetLinkedBackendsForBuildPager = &resp + s.newGetLinkedBackendsForBuildPager.add(req, newGetLinkedBackendsForBuildPager) + server.PagerResponderInjectNextLinks(newGetLinkedBackendsForBuildPager, req, func(page *armappservice.StaticSitesClientGetLinkedBackendsForBuildResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newGetLinkedBackendsForBuildPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + s.newGetLinkedBackendsForBuildPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newGetLinkedBackendsForBuildPager) { + s.newGetLinkedBackendsForBuildPager.remove(req) + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchGetPrivateEndpointConnection(req *http.Request) (*http.Response, error) { + if s.srv.GetPrivateEndpointConnection == nil { + return nil, &nonRetriableError{errors.New("fake for method GetPrivateEndpointConnection not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateEndpointConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + privateEndpointConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("privateEndpointConnectionName")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.GetPrivateEndpointConnection(req.Context(), resourceGroupNameParam, nameParam, privateEndpointConnectionNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).RemotePrivateEndpointConnectionARMResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchNewGetPrivateEndpointConnectionListPager(req *http.Request) (*http.Response, error) { + if s.srv.NewGetPrivateEndpointConnectionListPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewGetPrivateEndpointConnectionListPager not implemented")} + } + newGetPrivateEndpointConnectionListPager := s.newGetPrivateEndpointConnectionListPager.get(req) + if newGetPrivateEndpointConnectionListPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateEndpointConnections` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := s.srv.NewGetPrivateEndpointConnectionListPager(resourceGroupNameParam, nameParam, nil) + newGetPrivateEndpointConnectionListPager = &resp + s.newGetPrivateEndpointConnectionListPager.add(req, newGetPrivateEndpointConnectionListPager) + server.PagerResponderInjectNextLinks(newGetPrivateEndpointConnectionListPager, req, func(page *armappservice.StaticSitesClientGetPrivateEndpointConnectionListResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newGetPrivateEndpointConnectionListPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + s.newGetPrivateEndpointConnectionListPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newGetPrivateEndpointConnectionListPager) { + s.newGetPrivateEndpointConnectionListPager.remove(req) + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchGetPrivateLinkResources(req *http.Request) (*http.Response, error) { + if s.srv.GetPrivateLinkResources == nil { + return nil, &nonRetriableError{errors.New("fake for method GetPrivateLinkResources not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateLinkResources` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.GetPrivateLinkResources(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).PrivateLinkResourcesWrapper, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchGetStaticSite(req *http.Request) (*http.Response, error) { + if s.srv.GetStaticSite == nil { + return nil, &nonRetriableError{errors.New("fake for method GetStaticSite not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.GetStaticSite(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).StaticSiteARMResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchGetStaticSiteBuild(req *http.Request) (*http.Response, error) { + if s.srv.GetStaticSiteBuild == nil { + return nil, &nonRetriableError{errors.New("fake for method GetStaticSiteBuild not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/builds/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + environmentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("environmentName")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.GetStaticSiteBuild(req.Context(), resourceGroupNameParam, nameParam, environmentNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).StaticSiteBuildARMResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchNewGetStaticSiteBuildsPager(req *http.Request) (*http.Response, error) { + if s.srv.NewGetStaticSiteBuildsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewGetStaticSiteBuildsPager not implemented")} + } + newGetStaticSiteBuildsPager := s.newGetStaticSiteBuildsPager.get(req) + if newGetStaticSiteBuildsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/builds` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := s.srv.NewGetStaticSiteBuildsPager(resourceGroupNameParam, nameParam, nil) + newGetStaticSiteBuildsPager = &resp + s.newGetStaticSiteBuildsPager.add(req, newGetStaticSiteBuildsPager) + server.PagerResponderInjectNextLinks(newGetStaticSiteBuildsPager, req, func(page *armappservice.StaticSitesClientGetStaticSiteBuildsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newGetStaticSiteBuildsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + s.newGetStaticSiteBuildsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newGetStaticSiteBuildsPager) { + s.newGetStaticSiteBuildsPager.remove(req) + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchGetStaticSiteCustomDomain(req *http.Request) (*http.Response, error) { + if s.srv.GetStaticSiteCustomDomain == nil { + return nil, &nonRetriableError{errors.New("fake for method GetStaticSiteCustomDomain not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/customDomains/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + domainNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("domainName")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.GetStaticSiteCustomDomain(req.Context(), resourceGroupNameParam, nameParam, domainNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).StaticSiteCustomDomainOverviewARMResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchNewGetStaticSitesByResourceGroupPager(req *http.Request) (*http.Response, error) { + if s.srv.NewGetStaticSitesByResourceGroupPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewGetStaticSitesByResourceGroupPager not implemented")} + } + newGetStaticSitesByResourceGroupPager := s.newGetStaticSitesByResourceGroupPager.get(req) + if newGetStaticSitesByResourceGroupPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 2 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + resp := s.srv.NewGetStaticSitesByResourceGroupPager(resourceGroupNameParam, nil) + newGetStaticSitesByResourceGroupPager = &resp + s.newGetStaticSitesByResourceGroupPager.add(req, newGetStaticSitesByResourceGroupPager) + server.PagerResponderInjectNextLinks(newGetStaticSitesByResourceGroupPager, req, func(page *armappservice.StaticSitesClientGetStaticSitesByResourceGroupResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newGetStaticSitesByResourceGroupPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + s.newGetStaticSitesByResourceGroupPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newGetStaticSitesByResourceGroupPager) { + s.newGetStaticSitesByResourceGroupPager.remove(req) + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchGetUserProvidedFunctionAppForStaticSite(req *http.Request) (*http.Response, error) { + if s.srv.GetUserProvidedFunctionAppForStaticSite == nil { + return nil, &nonRetriableError{errors.New("fake for method GetUserProvidedFunctionAppForStaticSite not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/userProvidedFunctionApps/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + functionAppNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("functionAppName")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.GetUserProvidedFunctionAppForStaticSite(req.Context(), resourceGroupNameParam, nameParam, functionAppNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).StaticSiteUserProvidedFunctionAppARMResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchGetUserProvidedFunctionAppForStaticSiteBuild(req *http.Request) (*http.Response, error) { + if s.srv.GetUserProvidedFunctionAppForStaticSiteBuild == nil { + return nil, &nonRetriableError{errors.New("fake for method GetUserProvidedFunctionAppForStaticSiteBuild not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/builds/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/userProvidedFunctionApps/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + environmentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("environmentName")]) + if err != nil { + return nil, err + } + functionAppNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("functionAppName")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.GetUserProvidedFunctionAppForStaticSiteBuild(req.Context(), resourceGroupNameParam, nameParam, environmentNameParam, functionAppNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).StaticSiteUserProvidedFunctionAppARMResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchNewGetUserProvidedFunctionAppsForStaticSitePager(req *http.Request) (*http.Response, error) { + if s.srv.NewGetUserProvidedFunctionAppsForStaticSitePager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewGetUserProvidedFunctionAppsForStaticSitePager not implemented")} + } + newGetUserProvidedFunctionAppsForStaticSitePager := s.newGetUserProvidedFunctionAppsForStaticSitePager.get(req) + if newGetUserProvidedFunctionAppsForStaticSitePager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/userProvidedFunctionApps` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := s.srv.NewGetUserProvidedFunctionAppsForStaticSitePager(resourceGroupNameParam, nameParam, nil) + newGetUserProvidedFunctionAppsForStaticSitePager = &resp + s.newGetUserProvidedFunctionAppsForStaticSitePager.add(req, newGetUserProvidedFunctionAppsForStaticSitePager) + server.PagerResponderInjectNextLinks(newGetUserProvidedFunctionAppsForStaticSitePager, req, func(page *armappservice.StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newGetUserProvidedFunctionAppsForStaticSitePager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + s.newGetUserProvidedFunctionAppsForStaticSitePager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newGetUserProvidedFunctionAppsForStaticSitePager) { + s.newGetUserProvidedFunctionAppsForStaticSitePager.remove(req) + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchNewGetUserProvidedFunctionAppsForStaticSiteBuildPager(req *http.Request) (*http.Response, error) { + if s.srv.NewGetUserProvidedFunctionAppsForStaticSiteBuildPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewGetUserProvidedFunctionAppsForStaticSiteBuildPager not implemented")} + } + newGetUserProvidedFunctionAppsForStaticSiteBuildPager := s.newGetUserProvidedFunctionAppsForStaticSiteBuildPager.get(req) + if newGetUserProvidedFunctionAppsForStaticSiteBuildPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/builds/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/userProvidedFunctionApps` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + environmentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("environmentName")]) + if err != nil { + return nil, err + } + resp := s.srv.NewGetUserProvidedFunctionAppsForStaticSiteBuildPager(resourceGroupNameParam, nameParam, environmentNameParam, nil) + newGetUserProvidedFunctionAppsForStaticSiteBuildPager = &resp + s.newGetUserProvidedFunctionAppsForStaticSiteBuildPager.add(req, newGetUserProvidedFunctionAppsForStaticSiteBuildPager) + server.PagerResponderInjectNextLinks(newGetUserProvidedFunctionAppsForStaticSiteBuildPager, req, func(page *armappservice.StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newGetUserProvidedFunctionAppsForStaticSiteBuildPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + s.newGetUserProvidedFunctionAppsForStaticSiteBuildPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newGetUserProvidedFunctionAppsForStaticSiteBuildPager) { + s.newGetUserProvidedFunctionAppsForStaticSiteBuildPager.remove(req) + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchBeginLinkBackend(req *http.Request) (*http.Response, error) { + if s.srv.BeginLinkBackend == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginLinkBackend not implemented")} + } + beginLinkBackend := s.beginLinkBackend.get(req) + if beginLinkBackend == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/linkedBackends/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.StaticSiteLinkedBackendARMResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + linkedBackendNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("linkedBackendName")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.BeginLinkBackend(req.Context(), resourceGroupNameParam, nameParam, linkedBackendNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginLinkBackend = &respr + s.beginLinkBackend.add(req, beginLinkBackend) + } + + resp, err := server.PollerResponderNext(beginLinkBackend, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK}, resp.StatusCode) { + s.beginLinkBackend.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PollerResponderMore(beginLinkBackend) { + s.beginLinkBackend.remove(req) + } + + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchBeginLinkBackendToBuild(req *http.Request) (*http.Response, error) { + if s.srv.BeginLinkBackendToBuild == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginLinkBackendToBuild not implemented")} + } + beginLinkBackendToBuild := s.beginLinkBackendToBuild.get(req) + if beginLinkBackendToBuild == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/builds/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/linkedBackends/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.StaticSiteLinkedBackendARMResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + environmentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("environmentName")]) + if err != nil { + return nil, err + } + linkedBackendNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("linkedBackendName")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.BeginLinkBackendToBuild(req.Context(), resourceGroupNameParam, nameParam, environmentNameParam, linkedBackendNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginLinkBackendToBuild = &respr + s.beginLinkBackendToBuild.add(req, beginLinkBackendToBuild) + } + + resp, err := server.PollerResponderNext(beginLinkBackendToBuild, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK}, resp.StatusCode) { + s.beginLinkBackendToBuild.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PollerResponderMore(beginLinkBackendToBuild) { + s.beginLinkBackendToBuild.remove(req) + } + + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchNewListPager(req *http.Request) (*http.Response, error) { + if s.srv.NewListPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} + } + newListPager := s.newListPager.get(req) + if newListPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 1 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resp := s.srv.NewListPager(nil) + newListPager = &resp + s.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armappservice.StaticSitesClientListResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + s.newListPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListPager) { + s.newListPager.remove(req) + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchNewListBasicAuthPager(req *http.Request) (*http.Response, error) { + if s.srv.NewListBasicAuthPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListBasicAuthPager not implemented")} + } + newListBasicAuthPager := s.newListBasicAuthPager.get(req) + if newListBasicAuthPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/basicAuth` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := s.srv.NewListBasicAuthPager(resourceGroupNameParam, nameParam, nil) + newListBasicAuthPager = &resp + s.newListBasicAuthPager.add(req, newListBasicAuthPager) + server.PagerResponderInjectNextLinks(newListBasicAuthPager, req, func(page *armappservice.StaticSitesClientListBasicAuthResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListBasicAuthPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + s.newListBasicAuthPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListBasicAuthPager) { + s.newListBasicAuthPager.remove(req) + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchListStaticSiteAppSettings(req *http.Request) (*http.Response, error) { + if s.srv.ListStaticSiteAppSettings == nil { + return nil, &nonRetriableError{errors.New("fake for method ListStaticSiteAppSettings not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listAppSettings` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.ListStaticSiteAppSettings(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).StringDictionary, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchListStaticSiteBuildAppSettings(req *http.Request) (*http.Response, error) { + if s.srv.ListStaticSiteBuildAppSettings == nil { + return nil, &nonRetriableError{errors.New("fake for method ListStaticSiteBuildAppSettings not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/builds/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listAppSettings` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + environmentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("environmentName")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.ListStaticSiteBuildAppSettings(req.Context(), resourceGroupNameParam, nameParam, environmentNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).StringDictionary, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchListStaticSiteBuildFunctionAppSettings(req *http.Request) (*http.Response, error) { + if s.srv.ListStaticSiteBuildFunctionAppSettings == nil { + return nil, &nonRetriableError{errors.New("fake for method ListStaticSiteBuildFunctionAppSettings not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/builds/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listFunctionAppSettings` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + environmentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("environmentName")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.ListStaticSiteBuildFunctionAppSettings(req.Context(), resourceGroupNameParam, nameParam, environmentNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).StringDictionary, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchNewListStaticSiteBuildFunctionsPager(req *http.Request) (*http.Response, error) { + if s.srv.NewListStaticSiteBuildFunctionsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListStaticSiteBuildFunctionsPager not implemented")} + } + newListStaticSiteBuildFunctionsPager := s.newListStaticSiteBuildFunctionsPager.get(req) + if newListStaticSiteBuildFunctionsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/builds/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/functions` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + environmentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("environmentName")]) + if err != nil { + return nil, err + } + resp := s.srv.NewListStaticSiteBuildFunctionsPager(resourceGroupNameParam, nameParam, environmentNameParam, nil) + newListStaticSiteBuildFunctionsPager = &resp + s.newListStaticSiteBuildFunctionsPager.add(req, newListStaticSiteBuildFunctionsPager) + server.PagerResponderInjectNextLinks(newListStaticSiteBuildFunctionsPager, req, func(page *armappservice.StaticSitesClientListStaticSiteBuildFunctionsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListStaticSiteBuildFunctionsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + s.newListStaticSiteBuildFunctionsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListStaticSiteBuildFunctionsPager) { + s.newListStaticSiteBuildFunctionsPager.remove(req) + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchListStaticSiteConfiguredRoles(req *http.Request) (*http.Response, error) { + if s.srv.ListStaticSiteConfiguredRoles == nil { + return nil, &nonRetriableError{errors.New("fake for method ListStaticSiteConfiguredRoles not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listConfiguredRoles` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.ListStaticSiteConfiguredRoles(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).StringList, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchNewListStaticSiteCustomDomainsPager(req *http.Request) (*http.Response, error) { + if s.srv.NewListStaticSiteCustomDomainsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListStaticSiteCustomDomainsPager not implemented")} + } + newListStaticSiteCustomDomainsPager := s.newListStaticSiteCustomDomainsPager.get(req) + if newListStaticSiteCustomDomainsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/customDomains` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := s.srv.NewListStaticSiteCustomDomainsPager(resourceGroupNameParam, nameParam, nil) + newListStaticSiteCustomDomainsPager = &resp + s.newListStaticSiteCustomDomainsPager.add(req, newListStaticSiteCustomDomainsPager) + server.PagerResponderInjectNextLinks(newListStaticSiteCustomDomainsPager, req, func(page *armappservice.StaticSitesClientListStaticSiteCustomDomainsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListStaticSiteCustomDomainsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + s.newListStaticSiteCustomDomainsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListStaticSiteCustomDomainsPager) { + s.newListStaticSiteCustomDomainsPager.remove(req) + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchListStaticSiteFunctionAppSettings(req *http.Request) (*http.Response, error) { + if s.srv.ListStaticSiteFunctionAppSettings == nil { + return nil, &nonRetriableError{errors.New("fake for method ListStaticSiteFunctionAppSettings not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listFunctionAppSettings` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.ListStaticSiteFunctionAppSettings(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).StringDictionary, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchNewListStaticSiteFunctionsPager(req *http.Request) (*http.Response, error) { + if s.srv.NewListStaticSiteFunctionsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListStaticSiteFunctionsPager not implemented")} + } + newListStaticSiteFunctionsPager := s.newListStaticSiteFunctionsPager.get(req) + if newListStaticSiteFunctionsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/functions` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := s.srv.NewListStaticSiteFunctionsPager(resourceGroupNameParam, nameParam, nil) + newListStaticSiteFunctionsPager = &resp + s.newListStaticSiteFunctionsPager.add(req, newListStaticSiteFunctionsPager) + server.PagerResponderInjectNextLinks(newListStaticSiteFunctionsPager, req, func(page *armappservice.StaticSitesClientListStaticSiteFunctionsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListStaticSiteFunctionsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + s.newListStaticSiteFunctionsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListStaticSiteFunctionsPager) { + s.newListStaticSiteFunctionsPager.remove(req) + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchListStaticSiteSecrets(req *http.Request) (*http.Response, error) { + if s.srv.ListStaticSiteSecrets == nil { + return nil, &nonRetriableError{errors.New("fake for method ListStaticSiteSecrets not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listSecrets` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.ListStaticSiteSecrets(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).StringDictionary, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchNewListStaticSiteUsersPager(req *http.Request) (*http.Response, error) { + if s.srv.NewListStaticSiteUsersPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListStaticSiteUsersPager not implemented")} + } + newListStaticSiteUsersPager := s.newListStaticSiteUsersPager.get(req) + if newListStaticSiteUsersPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/authproviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listUsers` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + authproviderParam, err := url.PathUnescape(matches[regex.SubexpIndex("authprovider")]) + if err != nil { + return nil, err + } + resp := s.srv.NewListStaticSiteUsersPager(resourceGroupNameParam, nameParam, authproviderParam, nil) + newListStaticSiteUsersPager = &resp + s.newListStaticSiteUsersPager.add(req, newListStaticSiteUsersPager) + server.PagerResponderInjectNextLinks(newListStaticSiteUsersPager, req, func(page *armappservice.StaticSitesClientListStaticSiteUsersResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListStaticSiteUsersPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + s.newListStaticSiteUsersPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListStaticSiteUsersPager) { + s.newListStaticSiteUsersPager.remove(req) + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchPreviewWorkflow(req *http.Request) (*http.Response, error) { + if s.srv.PreviewWorkflow == nil { + return nil, &nonRetriableError{errors.New("fake for method PreviewWorkflow not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/previewStaticSiteWorkflowFile` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 2 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.StaticSitesWorkflowPreviewRequest](req) + if err != nil { + return nil, err + } + locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.PreviewWorkflow(req.Context(), locationParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).StaticSitesWorkflowPreview, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchBeginRegisterUserProvidedFunctionAppWithStaticSite(req *http.Request) (*http.Response, error) { + if s.srv.BeginRegisterUserProvidedFunctionAppWithStaticSite == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginRegisterUserProvidedFunctionAppWithStaticSite not implemented")} + } + beginRegisterUserProvidedFunctionAppWithStaticSite := s.beginRegisterUserProvidedFunctionAppWithStaticSite.get(req) + if beginRegisterUserProvidedFunctionAppWithStaticSite == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/userProvidedFunctionApps/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + body, err := server.UnmarshalRequestAsJSON[armappservice.StaticSiteUserProvidedFunctionAppARMResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + functionAppNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("functionAppName")]) + if err != nil { + return nil, err + } + isForcedUnescaped, err := url.QueryUnescape(qp.Get("isForced")) + if err != nil { + return nil, err + } + isForcedParam, err := parseOptional(isForcedUnescaped, strconv.ParseBool) + if err != nil { + return nil, err + } + var options *armappservice.StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteOptions + if isForcedParam != nil { + options = &armappservice.StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteOptions{ + IsForced: isForcedParam, + } + } + respr, errRespr := s.srv.BeginRegisterUserProvidedFunctionAppWithStaticSite(req.Context(), resourceGroupNameParam, nameParam, functionAppNameParam, body, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginRegisterUserProvidedFunctionAppWithStaticSite = &respr + s.beginRegisterUserProvidedFunctionAppWithStaticSite.add(req, beginRegisterUserProvidedFunctionAppWithStaticSite) + } + + resp, err := server.PollerResponderNext(beginRegisterUserProvidedFunctionAppWithStaticSite, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + s.beginRegisterUserProvidedFunctionAppWithStaticSite.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginRegisterUserProvidedFunctionAppWithStaticSite) { + s.beginRegisterUserProvidedFunctionAppWithStaticSite.remove(req) + } + + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchBeginRegisterUserProvidedFunctionAppWithStaticSiteBuild(req *http.Request) (*http.Response, error) { + if s.srv.BeginRegisterUserProvidedFunctionAppWithStaticSiteBuild == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginRegisterUserProvidedFunctionAppWithStaticSiteBuild not implemented")} + } + beginRegisterUserProvidedFunctionAppWithStaticSiteBuild := s.beginRegisterUserProvidedFunctionAppWithStaticSiteBuild.get(req) + if beginRegisterUserProvidedFunctionAppWithStaticSiteBuild == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/builds/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/userProvidedFunctionApps/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + body, err := server.UnmarshalRequestAsJSON[armappservice.StaticSiteUserProvidedFunctionAppARMResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + environmentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("environmentName")]) + if err != nil { + return nil, err + } + functionAppNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("functionAppName")]) + if err != nil { + return nil, err + } + isForcedUnescaped, err := url.QueryUnescape(qp.Get("isForced")) + if err != nil { + return nil, err + } + isForcedParam, err := parseOptional(isForcedUnescaped, strconv.ParseBool) + if err != nil { + return nil, err + } + var options *armappservice.StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteBuildOptions + if isForcedParam != nil { + options = &armappservice.StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteBuildOptions{ + IsForced: isForcedParam, + } + } + respr, errRespr := s.srv.BeginRegisterUserProvidedFunctionAppWithStaticSiteBuild(req.Context(), resourceGroupNameParam, nameParam, environmentNameParam, functionAppNameParam, body, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginRegisterUserProvidedFunctionAppWithStaticSiteBuild = &respr + s.beginRegisterUserProvidedFunctionAppWithStaticSiteBuild.add(req, beginRegisterUserProvidedFunctionAppWithStaticSiteBuild) + } + + resp, err := server.PollerResponderNext(beginRegisterUserProvidedFunctionAppWithStaticSiteBuild, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + s.beginRegisterUserProvidedFunctionAppWithStaticSiteBuild.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginRegisterUserProvidedFunctionAppWithStaticSiteBuild) { + s.beginRegisterUserProvidedFunctionAppWithStaticSiteBuild.remove(req) + } + + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchResetStaticSiteAPIKey(req *http.Request) (*http.Response, error) { + if s.srv.ResetStaticSiteAPIKey == nil { + return nil, &nonRetriableError{errors.New("fake for method ResetStaticSiteAPIKey not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resetapikey` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.StaticSiteResetPropertiesARMResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.ResetStaticSiteAPIKey(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchUnlinkBackend(req *http.Request) (*http.Response, error) { + if s.srv.UnlinkBackend == nil { + return nil, &nonRetriableError{errors.New("fake for method UnlinkBackend not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/linkedBackends/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + linkedBackendNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("linkedBackendName")]) + if err != nil { + return nil, err + } + isCleaningAuthConfigUnescaped, err := url.QueryUnescape(qp.Get("isCleaningAuthConfig")) + if err != nil { + return nil, err + } + isCleaningAuthConfigParam, err := parseOptional(isCleaningAuthConfigUnescaped, strconv.ParseBool) + if err != nil { + return nil, err + } + var options *armappservice.StaticSitesClientUnlinkBackendOptions + if isCleaningAuthConfigParam != nil { + options = &armappservice.StaticSitesClientUnlinkBackendOptions{ + IsCleaningAuthConfig: isCleaningAuthConfigParam, + } + } + respr, errRespr := s.srv.UnlinkBackend(req.Context(), resourceGroupNameParam, nameParam, linkedBackendNameParam, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchUnlinkBackendFromBuild(req *http.Request) (*http.Response, error) { + if s.srv.UnlinkBackendFromBuild == nil { + return nil, &nonRetriableError{errors.New("fake for method UnlinkBackendFromBuild not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/builds/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/linkedBackends/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + environmentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("environmentName")]) + if err != nil { + return nil, err + } + linkedBackendNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("linkedBackendName")]) + if err != nil { + return nil, err + } + isCleaningAuthConfigUnescaped, err := url.QueryUnescape(qp.Get("isCleaningAuthConfig")) + if err != nil { + return nil, err + } + isCleaningAuthConfigParam, err := parseOptional(isCleaningAuthConfigUnescaped, strconv.ParseBool) + if err != nil { + return nil, err + } + var options *armappservice.StaticSitesClientUnlinkBackendFromBuildOptions + if isCleaningAuthConfigParam != nil { + options = &armappservice.StaticSitesClientUnlinkBackendFromBuildOptions{ + IsCleaningAuthConfig: isCleaningAuthConfigParam, + } + } + respr, errRespr := s.srv.UnlinkBackendFromBuild(req.Context(), resourceGroupNameParam, nameParam, environmentNameParam, linkedBackendNameParam, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchUpdateBuildDatabaseConnection(req *http.Request) (*http.Response, error) { + if s.srv.UpdateBuildDatabaseConnection == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateBuildDatabaseConnection not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/builds/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/databaseConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.DatabaseConnectionPatchRequest](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + environmentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("environmentName")]) + if err != nil { + return nil, err + } + databaseConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("databaseConnectionName")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.UpdateBuildDatabaseConnection(req.Context(), resourceGroupNameParam, nameParam, environmentNameParam, databaseConnectionNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).DatabaseConnection, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchUpdateDatabaseConnection(req *http.Request) (*http.Response, error) { + if s.srv.UpdateDatabaseConnection == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateDatabaseConnection not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/databaseConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.DatabaseConnectionPatchRequest](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + databaseConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("databaseConnectionName")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.UpdateDatabaseConnection(req.Context(), resourceGroupNameParam, nameParam, databaseConnectionNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).DatabaseConnection, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchUpdateStaticSite(req *http.Request) (*http.Response, error) { + if s.srv.UpdateStaticSite == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateStaticSite not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.StaticSitePatchResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.UpdateStaticSite(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusAccepted}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).StaticSiteARMResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchUpdateStaticSiteUser(req *http.Request) (*http.Response, error) { + if s.srv.UpdateStaticSiteUser == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateStaticSiteUser not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/authproviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/users/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.StaticSiteUserARMResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + authproviderParam, err := url.PathUnescape(matches[regex.SubexpIndex("authprovider")]) + if err != nil { + return nil, err + } + useridParam, err := url.PathUnescape(matches[regex.SubexpIndex("userid")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.UpdateStaticSiteUser(req.Context(), resourceGroupNameParam, nameParam, authproviderParam, useridParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).StaticSiteUserARMResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchBeginValidateBackend(req *http.Request) (*http.Response, error) { + if s.srv.BeginValidateBackend == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginValidateBackend not implemented")} + } + beginValidateBackend := s.beginValidateBackend.get(req) + if beginValidateBackend == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/linkedBackends/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/validate` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.StaticSiteLinkedBackendARMResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + linkedBackendNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("linkedBackendName")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.BeginValidateBackend(req.Context(), resourceGroupNameParam, nameParam, linkedBackendNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginValidateBackend = &respr + s.beginValidateBackend.add(req, beginValidateBackend) + } + + resp, err := server.PollerResponderNext(beginValidateBackend, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + s.beginValidateBackend.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + } + if !server.PollerResponderMore(beginValidateBackend) { + s.beginValidateBackend.remove(req) + } + + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchBeginValidateBackendForBuild(req *http.Request) (*http.Response, error) { + if s.srv.BeginValidateBackendForBuild == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginValidateBackendForBuild not implemented")} + } + beginValidateBackendForBuild := s.beginValidateBackendForBuild.get(req) + if beginValidateBackendForBuild == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/builds/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/linkedBackends/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/validate` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.StaticSiteLinkedBackendARMResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + environmentNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("environmentName")]) + if err != nil { + return nil, err + } + linkedBackendNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("linkedBackendName")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.BeginValidateBackendForBuild(req.Context(), resourceGroupNameParam, nameParam, environmentNameParam, linkedBackendNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginValidateBackendForBuild = &respr + s.beginValidateBackendForBuild.add(req, beginValidateBackendForBuild) + } + + resp, err := server.PollerResponderNext(beginValidateBackendForBuild, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + s.beginValidateBackendForBuild.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + } + if !server.PollerResponderMore(beginValidateBackendForBuild) { + s.beginValidateBackendForBuild.remove(req) + } + + return resp, nil +} + +func (s *StaticSitesServerTransport) dispatchBeginValidateCustomDomainCanBeAddedToStaticSite(req *http.Request) (*http.Response, error) { + if s.srv.BeginValidateCustomDomainCanBeAddedToStaticSite == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginValidateCustomDomainCanBeAddedToStaticSite not implemented")} + } + beginValidateCustomDomainCanBeAddedToStaticSite := s.beginValidateCustomDomainCanBeAddedToStaticSite.get(req) + if beginValidateCustomDomainCanBeAddedToStaticSite == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/staticSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/customDomains/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/validate` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.StaticSiteCustomDomainRequestPropertiesARMResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + domainNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("domainName")]) + if err != nil { + return nil, err + } + respr, errRespr := s.srv.BeginValidateCustomDomainCanBeAddedToStaticSite(req.Context(), resourceGroupNameParam, nameParam, domainNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginValidateCustomDomainCanBeAddedToStaticSite = &respr + s.beginValidateCustomDomainCanBeAddedToStaticSite.add(req, beginValidateCustomDomainCanBeAddedToStaticSite) + } + + resp, err := server.PollerResponderNext(beginValidateCustomDomainCanBeAddedToStaticSite, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + s.beginValidateCustomDomainCanBeAddedToStaticSite.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginValidateCustomDomainCanBeAddedToStaticSite) { + s.beginValidateCustomDomainCanBeAddedToStaticSite.remove(req) + } + + return resp, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/fake/time_rfc3339.go b/sdk/resourcemanager/appservice/armappservice/fake/time_rfc3339.go new file mode 100644 index 000000000000..b0535a7b63e6 --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/fake/time_rfc3339.go @@ -0,0 +1,86 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "reflect" + "regexp" + "strings" + "time" +) + +// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. +var tzOffsetRegex = regexp.MustCompile(`(Z|z|\+|-)(\d+:\d+)*"*$`) + +const ( + utcDateTimeJSON = `"2006-01-02T15:04:05.999999999"` + utcDateTime = "2006-01-02T15:04:05.999999999" + dateTimeJSON = `"` + time.RFC3339Nano + `"` +) + +type dateTimeRFC3339 time.Time + +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { + tt := time.Time(t) + return tt.MarshalJSON() +} + +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { + tt := time.Time(t) + return tt.MarshalText() +} + +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + layout := utcDateTimeJSON + if tzOffsetRegex.Match(data) { + layout = dateTimeJSON + } + return t.Parse(layout, string(data)) +} + +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + layout := utcDateTime + if tzOffsetRegex.Match(data) { + layout = time.RFC3339Nano + } + return t.Parse(layout, string(data)) +} + +func (t *dateTimeRFC3339) Parse(layout, value string) error { + p, err := time.Parse(layout, strings.ToUpper(value)) + *t = dateTimeRFC3339(p) + return err +} + +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { + if t == nil { + return + } else if azcore.IsNullValue(t) { + m[k] = nil + return + } else if reflect.ValueOf(t).IsNil() { + return + } + m[k] = (*dateTimeRFC3339)(t) +} + +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { + if data == nil || strings.EqualFold(string(data), "null") { + return nil + } + var aux dateTimeRFC3339 + if err := json.Unmarshal(data, &aux); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + *t = (*time.Time)(&aux) + return nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/fake/topleveldomains_server.go b/sdk/resourcemanager/appservice/armappservice/fake/topleveldomains_server.go new file mode 100644 index 000000000000..31bf057d046f --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/fake/topleveldomains_server.go @@ -0,0 +1,189 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "context" + "errors" + "fmt" + azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" + "net/http" + "net/url" + "regexp" +) + +// TopLevelDomainsServer is a fake server for instances of the armappservice.TopLevelDomainsClient type. +type TopLevelDomainsServer struct { + // Get is the fake for method TopLevelDomainsClient.Get + // HTTP status codes to indicate success: http.StatusOK + Get func(ctx context.Context, name string, options *armappservice.TopLevelDomainsClientGetOptions) (resp azfake.Responder[armappservice.TopLevelDomainsClientGetResponse], errResp azfake.ErrorResponder) + + // NewListPager is the fake for method TopLevelDomainsClient.NewListPager + // HTTP status codes to indicate success: http.StatusOK + NewListPager func(options *armappservice.TopLevelDomainsClientListOptions) (resp azfake.PagerResponder[armappservice.TopLevelDomainsClientListResponse]) + + // NewListAgreementsPager is the fake for method TopLevelDomainsClient.NewListAgreementsPager + // HTTP status codes to indicate success: http.StatusOK + NewListAgreementsPager func(name string, agreementOption armappservice.TopLevelDomainAgreementOption, options *armappservice.TopLevelDomainsClientListAgreementsOptions) (resp azfake.PagerResponder[armappservice.TopLevelDomainsClientListAgreementsResponse]) +} + +// NewTopLevelDomainsServerTransport creates a new instance of TopLevelDomainsServerTransport with the provided implementation. +// The returned TopLevelDomainsServerTransport instance is connected to an instance of armappservice.TopLevelDomainsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewTopLevelDomainsServerTransport(srv *TopLevelDomainsServer) *TopLevelDomainsServerTransport { + return &TopLevelDomainsServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armappservice.TopLevelDomainsClientListResponse]](), + newListAgreementsPager: newTracker[azfake.PagerResponder[armappservice.TopLevelDomainsClientListAgreementsResponse]](), + } +} + +// TopLevelDomainsServerTransport connects instances of armappservice.TopLevelDomainsClient to instances of TopLevelDomainsServer. +// Don't use this type directly, use NewTopLevelDomainsServerTransport instead. +type TopLevelDomainsServerTransport struct { + srv *TopLevelDomainsServer + newListPager *tracker[azfake.PagerResponder[armappservice.TopLevelDomainsClientListResponse]] + newListAgreementsPager *tracker[azfake.PagerResponder[armappservice.TopLevelDomainsClientListAgreementsResponse]] +} + +// Do implements the policy.Transporter interface for TopLevelDomainsServerTransport. +func (t *TopLevelDomainsServerTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + var resp *http.Response + var err error + + switch method { + case "TopLevelDomainsClient.Get": + resp, err = t.dispatchGet(req) + case "TopLevelDomainsClient.NewListPager": + resp, err = t.dispatchNewListPager(req) + case "TopLevelDomainsClient.NewListAgreementsPager": + resp, err = t.dispatchNewListAgreementsPager(req) + default: + err = fmt.Errorf("unhandled API %s", method) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func (t *TopLevelDomainsServerTransport) dispatchGet(req *http.Request) (*http.Response, error) { + if t.srv.Get == nil { + return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DomainRegistration/topLevelDomains/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 2 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := t.srv.Get(req.Context(), nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).TopLevelDomain, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (t *TopLevelDomainsServerTransport) dispatchNewListPager(req *http.Request) (*http.Response, error) { + if t.srv.NewListPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} + } + newListPager := t.newListPager.get(req) + if newListPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DomainRegistration/topLevelDomains` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 1 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resp := t.srv.NewListPager(nil) + newListPager = &resp + t.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armappservice.TopLevelDomainsClientListResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + t.newListPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListPager) { + t.newListPager.remove(req) + } + return resp, nil +} + +func (t *TopLevelDomainsServerTransport) dispatchNewListAgreementsPager(req *http.Request) (*http.Response, error) { + if t.srv.NewListAgreementsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListAgreementsPager not implemented")} + } + newListAgreementsPager := t.newListAgreementsPager.get(req) + if newListAgreementsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.DomainRegistration/topLevelDomains/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listAgreements` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 2 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.TopLevelDomainAgreementOption](req) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := t.srv.NewListAgreementsPager(nameParam, body, nil) + newListAgreementsPager = &resp + t.newListAgreementsPager.add(req, newListAgreementsPager) + server.PagerResponderInjectNextLinks(newListAgreementsPager, req, func(page *armappservice.TopLevelDomainsClientListAgreementsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListAgreementsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + t.newListAgreementsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListAgreementsPager) { + t.newListAgreementsPager.remove(req) + } + return resp, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/fake/webapps_server.go b/sdk/resourcemanager/appservice/armappservice/fake/webapps_server.go new file mode 100644 index 000000000000..314a938c4bf0 --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/fake/webapps_server.go @@ -0,0 +1,19683 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "context" + "errors" + "fmt" + azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" + "net/http" + "net/url" + "reflect" + "regexp" + "strconv" +) + +// WebAppsServer is a fake server for instances of the armappservice.WebAppsClient type. +type WebAppsServer struct { + // AddPremierAddOn is the fake for method WebAppsClient.AddPremierAddOn + // HTTP status codes to indicate success: http.StatusOK + AddPremierAddOn func(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, premierAddOn armappservice.PremierAddOn, options *armappservice.WebAppsClientAddPremierAddOnOptions) (resp azfake.Responder[armappservice.WebAppsClientAddPremierAddOnResponse], errResp azfake.ErrorResponder) + + // AddPremierAddOnSlot is the fake for method WebAppsClient.AddPremierAddOnSlot + // HTTP status codes to indicate success: http.StatusOK + AddPremierAddOnSlot func(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string, premierAddOn armappservice.PremierAddOn, options *armappservice.WebAppsClientAddPremierAddOnSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientAddPremierAddOnSlotResponse], errResp azfake.ErrorResponder) + + // AnalyzeCustomHostname is the fake for method WebAppsClient.AnalyzeCustomHostname + // HTTP status codes to indicate success: http.StatusOK + AnalyzeCustomHostname func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientAnalyzeCustomHostnameOptions) (resp azfake.Responder[armappservice.WebAppsClientAnalyzeCustomHostnameResponse], errResp azfake.ErrorResponder) + + // AnalyzeCustomHostnameSlot is the fake for method WebAppsClient.AnalyzeCustomHostnameSlot + // HTTP status codes to indicate success: http.StatusOK + AnalyzeCustomHostnameSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientAnalyzeCustomHostnameSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientAnalyzeCustomHostnameSlotResponse], errResp azfake.ErrorResponder) + + // ApplySlotConfigToProduction is the fake for method WebAppsClient.ApplySlotConfigToProduction + // HTTP status codes to indicate success: http.StatusOK + ApplySlotConfigToProduction func(ctx context.Context, resourceGroupName string, name string, slotSwapEntity armappservice.CsmSlotEntity, options *armappservice.WebAppsClientApplySlotConfigToProductionOptions) (resp azfake.Responder[armappservice.WebAppsClientApplySlotConfigToProductionResponse], errResp azfake.ErrorResponder) + + // ApplySlotConfigurationSlot is the fake for method WebAppsClient.ApplySlotConfigurationSlot + // HTTP status codes to indicate success: http.StatusOK + ApplySlotConfigurationSlot func(ctx context.Context, resourceGroupName string, name string, slot string, slotSwapEntity armappservice.CsmSlotEntity, options *armappservice.WebAppsClientApplySlotConfigurationSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientApplySlotConfigurationSlotResponse], errResp azfake.ErrorResponder) + + // BeginApproveOrRejectPrivateEndpointConnection is the fake for method WebAppsClient.BeginApproveOrRejectPrivateEndpointConnection + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginApproveOrRejectPrivateEndpointConnection func(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper armappservice.PrivateLinkConnectionApprovalRequestResource, options *armappservice.WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (resp azfake.PollerResponder[armappservice.WebAppsClientApproveOrRejectPrivateEndpointConnectionResponse], errResp azfake.ErrorResponder) + + // BeginApproveOrRejectPrivateEndpointConnectionSlot is the fake for method WebAppsClient.BeginApproveOrRejectPrivateEndpointConnectionSlot + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginApproveOrRejectPrivateEndpointConnectionSlot func(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, slot string, privateEndpointWrapper armappservice.PrivateLinkConnectionApprovalRequestResource, options *armappservice.WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionSlotOptions) (resp azfake.PollerResponder[armappservice.WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotResponse], errResp azfake.ErrorResponder) + + // Backup is the fake for method WebAppsClient.Backup + // HTTP status codes to indicate success: http.StatusOK + Backup func(ctx context.Context, resourceGroupName string, name string, request armappservice.BackupRequest, options *armappservice.WebAppsClientBackupOptions) (resp azfake.Responder[armappservice.WebAppsClientBackupResponse], errResp azfake.ErrorResponder) + + // BackupSlot is the fake for method WebAppsClient.BackupSlot + // HTTP status codes to indicate success: http.StatusOK + BackupSlot func(ctx context.Context, resourceGroupName string, name string, slot string, request armappservice.BackupRequest, options *armappservice.WebAppsClientBackupSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientBackupSlotResponse], errResp azfake.ErrorResponder) + + // CreateDeployment is the fake for method WebAppsClient.CreateDeployment + // HTTP status codes to indicate success: http.StatusOK + CreateDeployment func(ctx context.Context, resourceGroupName string, name string, id string, deployment armappservice.Deployment, options *armappservice.WebAppsClientCreateDeploymentOptions) (resp azfake.Responder[armappservice.WebAppsClientCreateDeploymentResponse], errResp azfake.ErrorResponder) + + // CreateDeploymentSlot is the fake for method WebAppsClient.CreateDeploymentSlot + // HTTP status codes to indicate success: http.StatusOK + CreateDeploymentSlot func(ctx context.Context, resourceGroupName string, name string, id string, slot string, deployment armappservice.Deployment, options *armappservice.WebAppsClientCreateDeploymentSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientCreateDeploymentSlotResponse], errResp azfake.ErrorResponder) + + // BeginCreateFunction is the fake for method WebAppsClient.BeginCreateFunction + // HTTP status codes to indicate success: http.StatusCreated + BeginCreateFunction func(ctx context.Context, resourceGroupName string, name string, functionName string, functionEnvelope armappservice.FunctionEnvelope, options *armappservice.WebAppsClientBeginCreateFunctionOptions) (resp azfake.PollerResponder[armappservice.WebAppsClientCreateFunctionResponse], errResp azfake.ErrorResponder) + + // BeginCreateInstanceFunctionSlot is the fake for method WebAppsClient.BeginCreateInstanceFunctionSlot + // HTTP status codes to indicate success: http.StatusCreated + BeginCreateInstanceFunctionSlot func(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, functionEnvelope armappservice.FunctionEnvelope, options *armappservice.WebAppsClientBeginCreateInstanceFunctionSlotOptions) (resp azfake.PollerResponder[armappservice.WebAppsClientCreateInstanceFunctionSlotResponse], errResp azfake.ErrorResponder) + + // BeginCreateInstanceMSDeployOperation is the fake for method WebAppsClient.BeginCreateInstanceMSDeployOperation + // HTTP status codes to indicate success: http.StatusCreated + BeginCreateInstanceMSDeployOperation func(ctx context.Context, resourceGroupName string, name string, instanceID string, msDeploy armappservice.MSDeploy, options *armappservice.WebAppsClientBeginCreateInstanceMSDeployOperationOptions) (resp azfake.PollerResponder[armappservice.WebAppsClientCreateInstanceMSDeployOperationResponse], errResp azfake.ErrorResponder) + + // BeginCreateInstanceMSDeployOperationSlot is the fake for method WebAppsClient.BeginCreateInstanceMSDeployOperationSlot + // HTTP status codes to indicate success: http.StatusCreated + BeginCreateInstanceMSDeployOperationSlot func(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string, msDeploy armappservice.MSDeploy, options *armappservice.WebAppsClientBeginCreateInstanceMSDeployOperationSlotOptions) (resp azfake.PollerResponder[armappservice.WebAppsClientCreateInstanceMSDeployOperationSlotResponse], errResp azfake.ErrorResponder) + + // BeginCreateMSDeployOperation is the fake for method WebAppsClient.BeginCreateMSDeployOperation + // HTTP status codes to indicate success: http.StatusCreated + BeginCreateMSDeployOperation func(ctx context.Context, resourceGroupName string, name string, msDeploy armappservice.MSDeploy, options *armappservice.WebAppsClientBeginCreateMSDeployOperationOptions) (resp azfake.PollerResponder[armappservice.WebAppsClientCreateMSDeployOperationResponse], errResp azfake.ErrorResponder) + + // BeginCreateMSDeployOperationSlot is the fake for method WebAppsClient.BeginCreateMSDeployOperationSlot + // HTTP status codes to indicate success: http.StatusCreated + BeginCreateMSDeployOperationSlot func(ctx context.Context, resourceGroupName string, name string, slot string, msDeploy armappservice.MSDeploy, options *armappservice.WebAppsClientBeginCreateMSDeployOperationSlotOptions) (resp azfake.PollerResponder[armappservice.WebAppsClientCreateMSDeployOperationSlotResponse], errResp azfake.ErrorResponder) + + // CreateOneDeployOperation is the fake for method WebAppsClient.CreateOneDeployOperation + // HTTP status codes to indicate success: http.StatusOK + CreateOneDeployOperation func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientCreateOneDeployOperationOptions) (resp azfake.Responder[armappservice.WebAppsClientCreateOneDeployOperationResponse], errResp azfake.ErrorResponder) + + // BeginCreateOrUpdate is the fake for method WebAppsClient.BeginCreateOrUpdate + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginCreateOrUpdate func(ctx context.Context, resourceGroupName string, name string, siteEnvelope armappservice.Site, options *armappservice.WebAppsClientBeginCreateOrUpdateOptions) (resp azfake.PollerResponder[armappservice.WebAppsClientCreateOrUpdateResponse], errResp azfake.ErrorResponder) + + // CreateOrUpdateConfiguration is the fake for method WebAppsClient.CreateOrUpdateConfiguration + // HTTP status codes to indicate success: http.StatusOK + CreateOrUpdateConfiguration func(ctx context.Context, resourceGroupName string, name string, siteConfig armappservice.SiteConfigResource, options *armappservice.WebAppsClientCreateOrUpdateConfigurationOptions) (resp azfake.Responder[armappservice.WebAppsClientCreateOrUpdateConfigurationResponse], errResp azfake.ErrorResponder) + + // CreateOrUpdateConfigurationSlot is the fake for method WebAppsClient.CreateOrUpdateConfigurationSlot + // HTTP status codes to indicate success: http.StatusOK + CreateOrUpdateConfigurationSlot func(ctx context.Context, resourceGroupName string, name string, slot string, siteConfig armappservice.SiteConfigResource, options *armappservice.WebAppsClientCreateOrUpdateConfigurationSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientCreateOrUpdateConfigurationSlotResponse], errResp azfake.ErrorResponder) + + // CreateOrUpdateDomainOwnershipIdentifier is the fake for method WebAppsClient.CreateOrUpdateDomainOwnershipIdentifier + // HTTP status codes to indicate success: http.StatusOK + CreateOrUpdateDomainOwnershipIdentifier func(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier armappservice.Identifier, options *armappservice.WebAppsClientCreateOrUpdateDomainOwnershipIdentifierOptions) (resp azfake.Responder[armappservice.WebAppsClientCreateOrUpdateDomainOwnershipIdentifierResponse], errResp azfake.ErrorResponder) + + // CreateOrUpdateDomainOwnershipIdentifierSlot is the fake for method WebAppsClient.CreateOrUpdateDomainOwnershipIdentifierSlot + // HTTP status codes to indicate success: http.StatusOK + CreateOrUpdateDomainOwnershipIdentifierSlot func(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string, domainOwnershipIdentifier armappservice.Identifier, options *armappservice.WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotResponse], errResp azfake.ErrorResponder) + + // CreateOrUpdateFunctionSecret is the fake for method WebAppsClient.CreateOrUpdateFunctionSecret + // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated + CreateOrUpdateFunctionSecret func(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, key armappservice.KeyInfo, options *armappservice.WebAppsClientCreateOrUpdateFunctionSecretOptions) (resp azfake.Responder[armappservice.WebAppsClientCreateOrUpdateFunctionSecretResponse], errResp azfake.ErrorResponder) + + // CreateOrUpdateFunctionSecretSlot is the fake for method WebAppsClient.CreateOrUpdateFunctionSecretSlot + // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated + CreateOrUpdateFunctionSecretSlot func(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, slot string, key armappservice.KeyInfo, options *armappservice.WebAppsClientCreateOrUpdateFunctionSecretSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientCreateOrUpdateFunctionSecretSlotResponse], errResp azfake.ErrorResponder) + + // CreateOrUpdateHostNameBinding is the fake for method WebAppsClient.CreateOrUpdateHostNameBinding + // HTTP status codes to indicate success: http.StatusOK + CreateOrUpdateHostNameBinding func(ctx context.Context, resourceGroupName string, name string, hostName string, hostNameBinding armappservice.HostNameBinding, options *armappservice.WebAppsClientCreateOrUpdateHostNameBindingOptions) (resp azfake.Responder[armappservice.WebAppsClientCreateOrUpdateHostNameBindingResponse], errResp azfake.ErrorResponder) + + // CreateOrUpdateHostNameBindingSlot is the fake for method WebAppsClient.CreateOrUpdateHostNameBindingSlot + // HTTP status codes to indicate success: http.StatusOK + CreateOrUpdateHostNameBindingSlot func(ctx context.Context, resourceGroupName string, name string, hostName string, slot string, hostNameBinding armappservice.HostNameBinding, options *armappservice.WebAppsClientCreateOrUpdateHostNameBindingSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientCreateOrUpdateHostNameBindingSlotResponse], errResp azfake.ErrorResponder) + + // CreateOrUpdateHostSecret is the fake for method WebAppsClient.CreateOrUpdateHostSecret + // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated + CreateOrUpdateHostSecret func(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, key armappservice.KeyInfo, options *armappservice.WebAppsClientCreateOrUpdateHostSecretOptions) (resp azfake.Responder[armappservice.WebAppsClientCreateOrUpdateHostSecretResponse], errResp azfake.ErrorResponder) + + // CreateOrUpdateHostSecretSlot is the fake for method WebAppsClient.CreateOrUpdateHostSecretSlot + // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated + CreateOrUpdateHostSecretSlot func(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, slot string, key armappservice.KeyInfo, options *armappservice.WebAppsClientCreateOrUpdateHostSecretSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientCreateOrUpdateHostSecretSlotResponse], errResp azfake.ErrorResponder) + + // CreateOrUpdateHybridConnection is the fake for method WebAppsClient.CreateOrUpdateHybridConnection + // HTTP status codes to indicate success: http.StatusOK + CreateOrUpdateHybridConnection func(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope armappservice.HybridConnection, options *armappservice.WebAppsClientCreateOrUpdateHybridConnectionOptions) (resp azfake.Responder[armappservice.WebAppsClientCreateOrUpdateHybridConnectionResponse], errResp azfake.ErrorResponder) + + // CreateOrUpdateHybridConnectionSlot is the fake for method WebAppsClient.CreateOrUpdateHybridConnectionSlot + // HTTP status codes to indicate success: http.StatusOK + CreateOrUpdateHybridConnectionSlot func(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string, connectionEnvelope armappservice.HybridConnection, options *armappservice.WebAppsClientCreateOrUpdateHybridConnectionSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientCreateOrUpdateHybridConnectionSlotResponse], errResp azfake.ErrorResponder) + + // CreateOrUpdatePublicCertificate is the fake for method WebAppsClient.CreateOrUpdatePublicCertificate + // HTTP status codes to indicate success: http.StatusOK + CreateOrUpdatePublicCertificate func(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, publicCertificate armappservice.PublicCertificate, options *armappservice.WebAppsClientCreateOrUpdatePublicCertificateOptions) (resp azfake.Responder[armappservice.WebAppsClientCreateOrUpdatePublicCertificateResponse], errResp azfake.ErrorResponder) + + // CreateOrUpdatePublicCertificateSlot is the fake for method WebAppsClient.CreateOrUpdatePublicCertificateSlot + // HTTP status codes to indicate success: http.StatusOK + CreateOrUpdatePublicCertificateSlot func(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, slot string, publicCertificate armappservice.PublicCertificate, options *armappservice.WebAppsClientCreateOrUpdatePublicCertificateSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientCreateOrUpdatePublicCertificateSlotResponse], errResp azfake.ErrorResponder) + + // CreateOrUpdateRelayServiceConnection is the fake for method WebAppsClient.CreateOrUpdateRelayServiceConnection + // HTTP status codes to indicate success: http.StatusOK + CreateOrUpdateRelayServiceConnection func(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope armappservice.RelayServiceConnectionEntity, options *armappservice.WebAppsClientCreateOrUpdateRelayServiceConnectionOptions) (resp azfake.Responder[armappservice.WebAppsClientCreateOrUpdateRelayServiceConnectionResponse], errResp azfake.ErrorResponder) + + // CreateOrUpdateRelayServiceConnectionSlot is the fake for method WebAppsClient.CreateOrUpdateRelayServiceConnectionSlot + // HTTP status codes to indicate success: http.StatusOK + CreateOrUpdateRelayServiceConnectionSlot func(ctx context.Context, resourceGroupName string, name string, entityName string, slot string, connectionEnvelope armappservice.RelayServiceConnectionEntity, options *armappservice.WebAppsClientCreateOrUpdateRelayServiceConnectionSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientCreateOrUpdateRelayServiceConnectionSlotResponse], errResp azfake.ErrorResponder) + + // BeginCreateOrUpdateSlot is the fake for method WebAppsClient.BeginCreateOrUpdateSlot + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginCreateOrUpdateSlot func(ctx context.Context, resourceGroupName string, name string, slot string, siteEnvelope armappservice.Site, options *armappservice.WebAppsClientBeginCreateOrUpdateSlotOptions) (resp azfake.PollerResponder[armappservice.WebAppsClientCreateOrUpdateSlotResponse], errResp azfake.ErrorResponder) + + // BeginCreateOrUpdateSourceControl is the fake for method WebAppsClient.BeginCreateOrUpdateSourceControl + // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated, http.StatusAccepted + BeginCreateOrUpdateSourceControl func(ctx context.Context, resourceGroupName string, name string, siteSourceControl armappservice.SiteSourceControl, options *armappservice.WebAppsClientBeginCreateOrUpdateSourceControlOptions) (resp azfake.PollerResponder[armappservice.WebAppsClientCreateOrUpdateSourceControlResponse], errResp azfake.ErrorResponder) + + // BeginCreateOrUpdateSourceControlSlot is the fake for method WebAppsClient.BeginCreateOrUpdateSourceControlSlot + // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated, http.StatusAccepted + BeginCreateOrUpdateSourceControlSlot func(ctx context.Context, resourceGroupName string, name string, slot string, siteSourceControl armappservice.SiteSourceControl, options *armappservice.WebAppsClientBeginCreateOrUpdateSourceControlSlotOptions) (resp azfake.PollerResponder[armappservice.WebAppsClientCreateOrUpdateSourceControlSlotResponse], errResp azfake.ErrorResponder) + + // CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck is the fake for method WebAppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck + // HTTP status codes to indicate success: http.StatusOK + CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck func(ctx context.Context, resourceGroupName string, name string, connectionEnvelope armappservice.SwiftVirtualNetwork, options *armappservice.WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckOptions) (resp azfake.Responder[armappservice.WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResponse], errResp azfake.ErrorResponder) + + // CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot is the fake for method WebAppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot + // HTTP status codes to indicate success: http.StatusOK + CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot func(ctx context.Context, resourceGroupName string, name string, slot string, connectionEnvelope armappservice.SwiftVirtualNetwork, options *armappservice.WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse], errResp azfake.ErrorResponder) + + // CreateOrUpdateVnetConnection is the fake for method WebAppsClient.CreateOrUpdateVnetConnection + // HTTP status codes to indicate success: http.StatusOK + CreateOrUpdateVnetConnection func(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope armappservice.VnetInfoResource, options *armappservice.WebAppsClientCreateOrUpdateVnetConnectionOptions) (resp azfake.Responder[armappservice.WebAppsClientCreateOrUpdateVnetConnectionResponse], errResp azfake.ErrorResponder) + + // CreateOrUpdateVnetConnectionGateway is the fake for method WebAppsClient.CreateOrUpdateVnetConnectionGateway + // HTTP status codes to indicate success: http.StatusOK + CreateOrUpdateVnetConnectionGateway func(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope armappservice.VnetGateway, options *armappservice.WebAppsClientCreateOrUpdateVnetConnectionGatewayOptions) (resp azfake.Responder[armappservice.WebAppsClientCreateOrUpdateVnetConnectionGatewayResponse], errResp azfake.ErrorResponder) + + // CreateOrUpdateVnetConnectionGatewaySlot is the fake for method WebAppsClient.CreateOrUpdateVnetConnectionGatewaySlot + // HTTP status codes to indicate success: http.StatusOK + CreateOrUpdateVnetConnectionGatewaySlot func(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, slot string, connectionEnvelope armappservice.VnetGateway, options *armappservice.WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotOptions) (resp azfake.Responder[armappservice.WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotResponse], errResp azfake.ErrorResponder) + + // CreateOrUpdateVnetConnectionSlot is the fake for method WebAppsClient.CreateOrUpdateVnetConnectionSlot + // HTTP status codes to indicate success: http.StatusOK + CreateOrUpdateVnetConnectionSlot func(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string, connectionEnvelope armappservice.VnetInfoResource, options *armappservice.WebAppsClientCreateOrUpdateVnetConnectionSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientCreateOrUpdateVnetConnectionSlotResponse], errResp azfake.ErrorResponder) + + // Delete is the fake for method WebAppsClient.Delete + // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent + Delete func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientDeleteOptions) (resp azfake.Responder[armappservice.WebAppsClientDeleteResponse], errResp azfake.ErrorResponder) + + // DeleteBackup is the fake for method WebAppsClient.DeleteBackup + // HTTP status codes to indicate success: http.StatusOK + DeleteBackup func(ctx context.Context, resourceGroupName string, name string, backupID string, options *armappservice.WebAppsClientDeleteBackupOptions) (resp azfake.Responder[armappservice.WebAppsClientDeleteBackupResponse], errResp azfake.ErrorResponder) + + // DeleteBackupConfiguration is the fake for method WebAppsClient.DeleteBackupConfiguration + // HTTP status codes to indicate success: http.StatusOK + DeleteBackupConfiguration func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientDeleteBackupConfigurationOptions) (resp azfake.Responder[armappservice.WebAppsClientDeleteBackupConfigurationResponse], errResp azfake.ErrorResponder) + + // DeleteBackupConfigurationSlot is the fake for method WebAppsClient.DeleteBackupConfigurationSlot + // HTTP status codes to indicate success: http.StatusOK + DeleteBackupConfigurationSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientDeleteBackupConfigurationSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientDeleteBackupConfigurationSlotResponse], errResp azfake.ErrorResponder) + + // DeleteBackupSlot is the fake for method WebAppsClient.DeleteBackupSlot + // HTTP status codes to indicate success: http.StatusOK + DeleteBackupSlot func(ctx context.Context, resourceGroupName string, name string, backupID string, slot string, options *armappservice.WebAppsClientDeleteBackupSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientDeleteBackupSlotResponse], errResp azfake.ErrorResponder) + + // DeleteContinuousWebJob is the fake for method WebAppsClient.DeleteContinuousWebJob + // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent + DeleteContinuousWebJob func(ctx context.Context, resourceGroupName string, name string, webJobName string, options *armappservice.WebAppsClientDeleteContinuousWebJobOptions) (resp azfake.Responder[armappservice.WebAppsClientDeleteContinuousWebJobResponse], errResp azfake.ErrorResponder) + + // DeleteContinuousWebJobSlot is the fake for method WebAppsClient.DeleteContinuousWebJobSlot + // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent + DeleteContinuousWebJobSlot func(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *armappservice.WebAppsClientDeleteContinuousWebJobSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientDeleteContinuousWebJobSlotResponse], errResp azfake.ErrorResponder) + + // DeleteDeployment is the fake for method WebAppsClient.DeleteDeployment + // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent + DeleteDeployment func(ctx context.Context, resourceGroupName string, name string, id string, options *armappservice.WebAppsClientDeleteDeploymentOptions) (resp azfake.Responder[armappservice.WebAppsClientDeleteDeploymentResponse], errResp azfake.ErrorResponder) + + // DeleteDeploymentSlot is the fake for method WebAppsClient.DeleteDeploymentSlot + // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent + DeleteDeploymentSlot func(ctx context.Context, resourceGroupName string, name string, id string, slot string, options *armappservice.WebAppsClientDeleteDeploymentSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientDeleteDeploymentSlotResponse], errResp azfake.ErrorResponder) + + // DeleteDomainOwnershipIdentifier is the fake for method WebAppsClient.DeleteDomainOwnershipIdentifier + // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent + DeleteDomainOwnershipIdentifier func(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, options *armappservice.WebAppsClientDeleteDomainOwnershipIdentifierOptions) (resp azfake.Responder[armappservice.WebAppsClientDeleteDomainOwnershipIdentifierResponse], errResp azfake.ErrorResponder) + + // DeleteDomainOwnershipIdentifierSlot is the fake for method WebAppsClient.DeleteDomainOwnershipIdentifierSlot + // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent + DeleteDomainOwnershipIdentifierSlot func(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string, options *armappservice.WebAppsClientDeleteDomainOwnershipIdentifierSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientDeleteDomainOwnershipIdentifierSlotResponse], errResp azfake.ErrorResponder) + + // DeleteFunction is the fake for method WebAppsClient.DeleteFunction + // HTTP status codes to indicate success: http.StatusNoContent + DeleteFunction func(ctx context.Context, resourceGroupName string, name string, functionName string, options *armappservice.WebAppsClientDeleteFunctionOptions) (resp azfake.Responder[armappservice.WebAppsClientDeleteFunctionResponse], errResp azfake.ErrorResponder) + + // DeleteFunctionSecret is the fake for method WebAppsClient.DeleteFunctionSecret + // HTTP status codes to indicate success: http.StatusNoContent + DeleteFunctionSecret func(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, options *armappservice.WebAppsClientDeleteFunctionSecretOptions) (resp azfake.Responder[armappservice.WebAppsClientDeleteFunctionSecretResponse], errResp azfake.ErrorResponder) + + // DeleteFunctionSecretSlot is the fake for method WebAppsClient.DeleteFunctionSecretSlot + // HTTP status codes to indicate success: http.StatusNoContent + DeleteFunctionSecretSlot func(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, slot string, options *armappservice.WebAppsClientDeleteFunctionSecretSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientDeleteFunctionSecretSlotResponse], errResp azfake.ErrorResponder) + + // DeleteHostNameBinding is the fake for method WebAppsClient.DeleteHostNameBinding + // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent + DeleteHostNameBinding func(ctx context.Context, resourceGroupName string, name string, hostName string, options *armappservice.WebAppsClientDeleteHostNameBindingOptions) (resp azfake.Responder[armappservice.WebAppsClientDeleteHostNameBindingResponse], errResp azfake.ErrorResponder) + + // DeleteHostNameBindingSlot is the fake for method WebAppsClient.DeleteHostNameBindingSlot + // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent + DeleteHostNameBindingSlot func(ctx context.Context, resourceGroupName string, name string, slot string, hostName string, options *armappservice.WebAppsClientDeleteHostNameBindingSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientDeleteHostNameBindingSlotResponse], errResp azfake.ErrorResponder) + + // DeleteHostSecret is the fake for method WebAppsClient.DeleteHostSecret + // HTTP status codes to indicate success: http.StatusNoContent + DeleteHostSecret func(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, options *armappservice.WebAppsClientDeleteHostSecretOptions) (resp azfake.Responder[armappservice.WebAppsClientDeleteHostSecretResponse], errResp azfake.ErrorResponder) + + // DeleteHostSecretSlot is the fake for method WebAppsClient.DeleteHostSecretSlot + // HTTP status codes to indicate success: http.StatusNoContent + DeleteHostSecretSlot func(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, slot string, options *armappservice.WebAppsClientDeleteHostSecretSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientDeleteHostSecretSlotResponse], errResp azfake.ErrorResponder) + + // DeleteHybridConnection is the fake for method WebAppsClient.DeleteHybridConnection + // HTTP status codes to indicate success: http.StatusOK + DeleteHybridConnection func(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, options *armappservice.WebAppsClientDeleteHybridConnectionOptions) (resp azfake.Responder[armappservice.WebAppsClientDeleteHybridConnectionResponse], errResp azfake.ErrorResponder) + + // DeleteHybridConnectionSlot is the fake for method WebAppsClient.DeleteHybridConnectionSlot + // HTTP status codes to indicate success: http.StatusOK + DeleteHybridConnectionSlot func(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string, options *armappservice.WebAppsClientDeleteHybridConnectionSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientDeleteHybridConnectionSlotResponse], errResp azfake.ErrorResponder) + + // DeleteInstanceFunctionSlot is the fake for method WebAppsClient.DeleteInstanceFunctionSlot + // HTTP status codes to indicate success: http.StatusNoContent + DeleteInstanceFunctionSlot func(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, options *armappservice.WebAppsClientDeleteInstanceFunctionSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientDeleteInstanceFunctionSlotResponse], errResp azfake.ErrorResponder) + + // DeleteInstanceProcess is the fake for method WebAppsClient.DeleteInstanceProcess + // HTTP status codes to indicate success: http.StatusNoContent + DeleteInstanceProcess func(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string, options *armappservice.WebAppsClientDeleteInstanceProcessOptions) (resp azfake.Responder[armappservice.WebAppsClientDeleteInstanceProcessResponse], errResp azfake.ErrorResponder) + + // DeleteInstanceProcessSlot is the fake for method WebAppsClient.DeleteInstanceProcessSlot + // HTTP status codes to indicate success: http.StatusNoContent + DeleteInstanceProcessSlot func(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string, options *armappservice.WebAppsClientDeleteInstanceProcessSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientDeleteInstanceProcessSlotResponse], errResp azfake.ErrorResponder) + + // DeletePremierAddOn is the fake for method WebAppsClient.DeletePremierAddOn + // HTTP status codes to indicate success: http.StatusOK + DeletePremierAddOn func(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, options *armappservice.WebAppsClientDeletePremierAddOnOptions) (resp azfake.Responder[armappservice.WebAppsClientDeletePremierAddOnResponse], errResp azfake.ErrorResponder) + + // DeletePremierAddOnSlot is the fake for method WebAppsClient.DeletePremierAddOnSlot + // HTTP status codes to indicate success: http.StatusOK + DeletePremierAddOnSlot func(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string, options *armappservice.WebAppsClientDeletePremierAddOnSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientDeletePremierAddOnSlotResponse], errResp azfake.ErrorResponder) + + // BeginDeletePrivateEndpointConnection is the fake for method WebAppsClient.BeginDeletePrivateEndpointConnection + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent + BeginDeletePrivateEndpointConnection func(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *armappservice.WebAppsClientBeginDeletePrivateEndpointConnectionOptions) (resp azfake.PollerResponder[armappservice.WebAppsClientDeletePrivateEndpointConnectionResponse], errResp azfake.ErrorResponder) + + // BeginDeletePrivateEndpointConnectionSlot is the fake for method WebAppsClient.BeginDeletePrivateEndpointConnectionSlot + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent + BeginDeletePrivateEndpointConnectionSlot func(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, slot string, options *armappservice.WebAppsClientBeginDeletePrivateEndpointConnectionSlotOptions) (resp azfake.PollerResponder[armappservice.WebAppsClientDeletePrivateEndpointConnectionSlotResponse], errResp azfake.ErrorResponder) + + // DeleteProcess is the fake for method WebAppsClient.DeleteProcess + // HTTP status codes to indicate success: http.StatusNoContent + DeleteProcess func(ctx context.Context, resourceGroupName string, name string, processID string, options *armappservice.WebAppsClientDeleteProcessOptions) (resp azfake.Responder[armappservice.WebAppsClientDeleteProcessResponse], errResp azfake.ErrorResponder) + + // DeleteProcessSlot is the fake for method WebAppsClient.DeleteProcessSlot + // HTTP status codes to indicate success: http.StatusNoContent + DeleteProcessSlot func(ctx context.Context, resourceGroupName string, name string, processID string, slot string, options *armappservice.WebAppsClientDeleteProcessSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientDeleteProcessSlotResponse], errResp azfake.ErrorResponder) + + // DeletePublicCertificate is the fake for method WebAppsClient.DeletePublicCertificate + // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent + DeletePublicCertificate func(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, options *armappservice.WebAppsClientDeletePublicCertificateOptions) (resp azfake.Responder[armappservice.WebAppsClientDeletePublicCertificateResponse], errResp azfake.ErrorResponder) + + // DeletePublicCertificateSlot is the fake for method WebAppsClient.DeletePublicCertificateSlot + // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent + DeletePublicCertificateSlot func(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string, options *armappservice.WebAppsClientDeletePublicCertificateSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientDeletePublicCertificateSlotResponse], errResp azfake.ErrorResponder) + + // DeleteRelayServiceConnection is the fake for method WebAppsClient.DeleteRelayServiceConnection + // HTTP status codes to indicate success: http.StatusOK + DeleteRelayServiceConnection func(ctx context.Context, resourceGroupName string, name string, entityName string, options *armappservice.WebAppsClientDeleteRelayServiceConnectionOptions) (resp azfake.Responder[armappservice.WebAppsClientDeleteRelayServiceConnectionResponse], errResp azfake.ErrorResponder) + + // DeleteRelayServiceConnectionSlot is the fake for method WebAppsClient.DeleteRelayServiceConnectionSlot + // HTTP status codes to indicate success: http.StatusOK + DeleteRelayServiceConnectionSlot func(ctx context.Context, resourceGroupName string, name string, entityName string, slot string, options *armappservice.WebAppsClientDeleteRelayServiceConnectionSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientDeleteRelayServiceConnectionSlotResponse], errResp azfake.ErrorResponder) + + // DeleteSiteExtension is the fake for method WebAppsClient.DeleteSiteExtension + // HTTP status codes to indicate success: http.StatusNoContent + DeleteSiteExtension func(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, options *armappservice.WebAppsClientDeleteSiteExtensionOptions) (resp azfake.Responder[armappservice.WebAppsClientDeleteSiteExtensionResponse], errResp azfake.ErrorResponder) + + // DeleteSiteExtensionSlot is the fake for method WebAppsClient.DeleteSiteExtensionSlot + // HTTP status codes to indicate success: http.StatusNoContent + DeleteSiteExtensionSlot func(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string, options *armappservice.WebAppsClientDeleteSiteExtensionSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientDeleteSiteExtensionSlotResponse], errResp azfake.ErrorResponder) + + // DeleteSlot is the fake for method WebAppsClient.DeleteSlot + // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent + DeleteSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientDeleteSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientDeleteSlotResponse], errResp azfake.ErrorResponder) + + // DeleteSourceControl is the fake for method WebAppsClient.DeleteSourceControl + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + DeleteSourceControl func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientDeleteSourceControlOptions) (resp azfake.Responder[armappservice.WebAppsClientDeleteSourceControlResponse], errResp azfake.ErrorResponder) + + // DeleteSourceControlSlot is the fake for method WebAppsClient.DeleteSourceControlSlot + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + DeleteSourceControlSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientDeleteSourceControlSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientDeleteSourceControlSlotResponse], errResp azfake.ErrorResponder) + + // DeleteSwiftVirtualNetwork is the fake for method WebAppsClient.DeleteSwiftVirtualNetwork + // HTTP status codes to indicate success: http.StatusOK + DeleteSwiftVirtualNetwork func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientDeleteSwiftVirtualNetworkOptions) (resp azfake.Responder[armappservice.WebAppsClientDeleteSwiftVirtualNetworkResponse], errResp azfake.ErrorResponder) + + // DeleteSwiftVirtualNetworkSlot is the fake for method WebAppsClient.DeleteSwiftVirtualNetworkSlot + // HTTP status codes to indicate success: http.StatusOK + DeleteSwiftVirtualNetworkSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientDeleteSwiftVirtualNetworkSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientDeleteSwiftVirtualNetworkSlotResponse], errResp azfake.ErrorResponder) + + // DeleteTriggeredWebJob is the fake for method WebAppsClient.DeleteTriggeredWebJob + // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent + DeleteTriggeredWebJob func(ctx context.Context, resourceGroupName string, name string, webJobName string, options *armappservice.WebAppsClientDeleteTriggeredWebJobOptions) (resp azfake.Responder[armappservice.WebAppsClientDeleteTriggeredWebJobResponse], errResp azfake.ErrorResponder) + + // DeleteTriggeredWebJobSlot is the fake for method WebAppsClient.DeleteTriggeredWebJobSlot + // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent + DeleteTriggeredWebJobSlot func(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *armappservice.WebAppsClientDeleteTriggeredWebJobSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientDeleteTriggeredWebJobSlotResponse], errResp azfake.ErrorResponder) + + // DeleteVnetConnection is the fake for method WebAppsClient.DeleteVnetConnection + // HTTP status codes to indicate success: http.StatusOK + DeleteVnetConnection func(ctx context.Context, resourceGroupName string, name string, vnetName string, options *armappservice.WebAppsClientDeleteVnetConnectionOptions) (resp azfake.Responder[armappservice.WebAppsClientDeleteVnetConnectionResponse], errResp azfake.ErrorResponder) + + // DeleteVnetConnectionSlot is the fake for method WebAppsClient.DeleteVnetConnectionSlot + // HTTP status codes to indicate success: http.StatusOK + DeleteVnetConnectionSlot func(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string, options *armappservice.WebAppsClientDeleteVnetConnectionSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientDeleteVnetConnectionSlotResponse], errResp azfake.ErrorResponder) + + // DeployWorkflowArtifacts is the fake for method WebAppsClient.DeployWorkflowArtifacts + // HTTP status codes to indicate success: http.StatusOK + DeployWorkflowArtifacts func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientDeployWorkflowArtifactsOptions) (resp azfake.Responder[armappservice.WebAppsClientDeployWorkflowArtifactsResponse], errResp azfake.ErrorResponder) + + // DeployWorkflowArtifactsSlot is the fake for method WebAppsClient.DeployWorkflowArtifactsSlot + // HTTP status codes to indicate success: http.StatusOK + DeployWorkflowArtifactsSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientDeployWorkflowArtifactsSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientDeployWorkflowArtifactsSlotResponse], errResp azfake.ErrorResponder) + + // DiscoverBackup is the fake for method WebAppsClient.DiscoverBackup + // HTTP status codes to indicate success: http.StatusOK + DiscoverBackup func(ctx context.Context, resourceGroupName string, name string, request armappservice.RestoreRequest, options *armappservice.WebAppsClientDiscoverBackupOptions) (resp azfake.Responder[armappservice.WebAppsClientDiscoverBackupResponse], errResp azfake.ErrorResponder) + + // DiscoverBackupSlot is the fake for method WebAppsClient.DiscoverBackupSlot + // HTTP status codes to indicate success: http.StatusOK + DiscoverBackupSlot func(ctx context.Context, resourceGroupName string, name string, slot string, request armappservice.RestoreRequest, options *armappservice.WebAppsClientDiscoverBackupSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientDiscoverBackupSlotResponse], errResp azfake.ErrorResponder) + + // GenerateNewSitePublishingPassword is the fake for method WebAppsClient.GenerateNewSitePublishingPassword + // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent + GenerateNewSitePublishingPassword func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientGenerateNewSitePublishingPasswordOptions) (resp azfake.Responder[armappservice.WebAppsClientGenerateNewSitePublishingPasswordResponse], errResp azfake.ErrorResponder) + + // GenerateNewSitePublishingPasswordSlot is the fake for method WebAppsClient.GenerateNewSitePublishingPasswordSlot + // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent + GenerateNewSitePublishingPasswordSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientGenerateNewSitePublishingPasswordSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGenerateNewSitePublishingPasswordSlotResponse], errResp azfake.ErrorResponder) + + // Get is the fake for method WebAppsClient.Get + // HTTP status codes to indicate success: http.StatusOK + Get func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientGetOptions) (resp azfake.Responder[armappservice.WebAppsClientGetResponse], errResp azfake.ErrorResponder) + + // GetAppSettingKeyVaultReference is the fake for method WebAppsClient.GetAppSettingKeyVaultReference + // HTTP status codes to indicate success: http.StatusOK + GetAppSettingKeyVaultReference func(ctx context.Context, resourceGroupName string, name string, appSettingKey string, options *armappservice.WebAppsClientGetAppSettingKeyVaultReferenceOptions) (resp azfake.Responder[armappservice.WebAppsClientGetAppSettingKeyVaultReferenceResponse], errResp azfake.ErrorResponder) + + // GetAppSettingKeyVaultReferenceSlot is the fake for method WebAppsClient.GetAppSettingKeyVaultReferenceSlot + // HTTP status codes to indicate success: http.StatusOK + GetAppSettingKeyVaultReferenceSlot func(ctx context.Context, resourceGroupName string, name string, appSettingKey string, slot string, options *armappservice.WebAppsClientGetAppSettingKeyVaultReferenceSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetAppSettingKeyVaultReferenceSlotResponse], errResp azfake.ErrorResponder) + + // NewGetAppSettingsKeyVaultReferencesPager is the fake for method WebAppsClient.NewGetAppSettingsKeyVaultReferencesPager + // HTTP status codes to indicate success: http.StatusOK + NewGetAppSettingsKeyVaultReferencesPager func(resourceGroupName string, name string, options *armappservice.WebAppsClientGetAppSettingsKeyVaultReferencesOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientGetAppSettingsKeyVaultReferencesResponse]) + + // NewGetAppSettingsKeyVaultReferencesSlotPager is the fake for method WebAppsClient.NewGetAppSettingsKeyVaultReferencesSlotPager + // HTTP status codes to indicate success: http.StatusOK + NewGetAppSettingsKeyVaultReferencesSlotPager func(resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientGetAppSettingsKeyVaultReferencesSlotOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse]) + + // GetAuthSettings is the fake for method WebAppsClient.GetAuthSettings + // HTTP status codes to indicate success: http.StatusOK + GetAuthSettings func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientGetAuthSettingsOptions) (resp azfake.Responder[armappservice.WebAppsClientGetAuthSettingsResponse], errResp azfake.ErrorResponder) + + // GetAuthSettingsSlot is the fake for method WebAppsClient.GetAuthSettingsSlot + // HTTP status codes to indicate success: http.StatusOK + GetAuthSettingsSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientGetAuthSettingsSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetAuthSettingsSlotResponse], errResp azfake.ErrorResponder) + + // GetAuthSettingsV2 is the fake for method WebAppsClient.GetAuthSettingsV2 + // HTTP status codes to indicate success: http.StatusOK + GetAuthSettingsV2 func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientGetAuthSettingsV2Options) (resp azfake.Responder[armappservice.WebAppsClientGetAuthSettingsV2Response], errResp azfake.ErrorResponder) + + // GetAuthSettingsV2Slot is the fake for method WebAppsClient.GetAuthSettingsV2Slot + // HTTP status codes to indicate success: http.StatusOK + GetAuthSettingsV2Slot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientGetAuthSettingsV2SlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetAuthSettingsV2SlotResponse], errResp azfake.ErrorResponder) + + // GetAuthSettingsV2WithoutSecrets is the fake for method WebAppsClient.GetAuthSettingsV2WithoutSecrets + // HTTP status codes to indicate success: http.StatusOK + GetAuthSettingsV2WithoutSecrets func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientGetAuthSettingsV2WithoutSecretsOptions) (resp azfake.Responder[armappservice.WebAppsClientGetAuthSettingsV2WithoutSecretsResponse], errResp azfake.ErrorResponder) + + // GetAuthSettingsV2WithoutSecretsSlot is the fake for method WebAppsClient.GetAuthSettingsV2WithoutSecretsSlot + // HTTP status codes to indicate success: http.StatusOK + GetAuthSettingsV2WithoutSecretsSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientGetAuthSettingsV2WithoutSecretsSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetAuthSettingsV2WithoutSecretsSlotResponse], errResp azfake.ErrorResponder) + + // GetBackupConfiguration is the fake for method WebAppsClient.GetBackupConfiguration + // HTTP status codes to indicate success: http.StatusOK + GetBackupConfiguration func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientGetBackupConfigurationOptions) (resp azfake.Responder[armappservice.WebAppsClientGetBackupConfigurationResponse], errResp azfake.ErrorResponder) + + // GetBackupConfigurationSlot is the fake for method WebAppsClient.GetBackupConfigurationSlot + // HTTP status codes to indicate success: http.StatusOK + GetBackupConfigurationSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientGetBackupConfigurationSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetBackupConfigurationSlotResponse], errResp azfake.ErrorResponder) + + // GetBackupStatus is the fake for method WebAppsClient.GetBackupStatus + // HTTP status codes to indicate success: http.StatusOK + GetBackupStatus func(ctx context.Context, resourceGroupName string, name string, backupID string, options *armappservice.WebAppsClientGetBackupStatusOptions) (resp azfake.Responder[armappservice.WebAppsClientGetBackupStatusResponse], errResp azfake.ErrorResponder) + + // GetBackupStatusSlot is the fake for method WebAppsClient.GetBackupStatusSlot + // HTTP status codes to indicate success: http.StatusOK + GetBackupStatusSlot func(ctx context.Context, resourceGroupName string, name string, backupID string, slot string, options *armappservice.WebAppsClientGetBackupStatusSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetBackupStatusSlotResponse], errResp azfake.ErrorResponder) + + // GetConfiguration is the fake for method WebAppsClient.GetConfiguration + // HTTP status codes to indicate success: http.StatusOK + GetConfiguration func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientGetConfigurationOptions) (resp azfake.Responder[armappservice.WebAppsClientGetConfigurationResponse], errResp azfake.ErrorResponder) + + // GetConfigurationSlot is the fake for method WebAppsClient.GetConfigurationSlot + // HTTP status codes to indicate success: http.StatusOK + GetConfigurationSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientGetConfigurationSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetConfigurationSlotResponse], errResp azfake.ErrorResponder) + + // GetConfigurationSnapshot is the fake for method WebAppsClient.GetConfigurationSnapshot + // HTTP status codes to indicate success: http.StatusOK + GetConfigurationSnapshot func(ctx context.Context, resourceGroupName string, name string, snapshotID string, options *armappservice.WebAppsClientGetConfigurationSnapshotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetConfigurationSnapshotResponse], errResp azfake.ErrorResponder) + + // GetConfigurationSnapshotSlot is the fake for method WebAppsClient.GetConfigurationSnapshotSlot + // HTTP status codes to indicate success: http.StatusOK + GetConfigurationSnapshotSlot func(ctx context.Context, resourceGroupName string, name string, snapshotID string, slot string, options *armappservice.WebAppsClientGetConfigurationSnapshotSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetConfigurationSnapshotSlotResponse], errResp azfake.ErrorResponder) + + // GetContainerLogsZip is the fake for method WebAppsClient.GetContainerLogsZip + // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent + GetContainerLogsZip func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientGetContainerLogsZipOptions) (resp azfake.Responder[armappservice.WebAppsClientGetContainerLogsZipResponse], errResp azfake.ErrorResponder) + + // GetContainerLogsZipSlot is the fake for method WebAppsClient.GetContainerLogsZipSlot + // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent + GetContainerLogsZipSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientGetContainerLogsZipSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetContainerLogsZipSlotResponse], errResp azfake.ErrorResponder) + + // GetContinuousWebJob is the fake for method WebAppsClient.GetContinuousWebJob + // HTTP status codes to indicate success: http.StatusOK + GetContinuousWebJob func(ctx context.Context, resourceGroupName string, name string, webJobName string, options *armappservice.WebAppsClientGetContinuousWebJobOptions) (resp azfake.Responder[armappservice.WebAppsClientGetContinuousWebJobResponse], errResp azfake.ErrorResponder) + + // GetContinuousWebJobSlot is the fake for method WebAppsClient.GetContinuousWebJobSlot + // HTTP status codes to indicate success: http.StatusOK + GetContinuousWebJobSlot func(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *armappservice.WebAppsClientGetContinuousWebJobSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetContinuousWebJobSlotResponse], errResp azfake.ErrorResponder) + + // GetDeployment is the fake for method WebAppsClient.GetDeployment + // HTTP status codes to indicate success: http.StatusOK + GetDeployment func(ctx context.Context, resourceGroupName string, name string, id string, options *armappservice.WebAppsClientGetDeploymentOptions) (resp azfake.Responder[armappservice.WebAppsClientGetDeploymentResponse], errResp azfake.ErrorResponder) + + // GetDeploymentSlot is the fake for method WebAppsClient.GetDeploymentSlot + // HTTP status codes to indicate success: http.StatusOK + GetDeploymentSlot func(ctx context.Context, resourceGroupName string, name string, id string, slot string, options *armappservice.WebAppsClientGetDeploymentSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetDeploymentSlotResponse], errResp azfake.ErrorResponder) + + // GetDiagnosticLogsConfiguration is the fake for method WebAppsClient.GetDiagnosticLogsConfiguration + // HTTP status codes to indicate success: http.StatusOK + GetDiagnosticLogsConfiguration func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientGetDiagnosticLogsConfigurationOptions) (resp azfake.Responder[armappservice.WebAppsClientGetDiagnosticLogsConfigurationResponse], errResp azfake.ErrorResponder) + + // GetDiagnosticLogsConfigurationSlot is the fake for method WebAppsClient.GetDiagnosticLogsConfigurationSlot + // HTTP status codes to indicate success: http.StatusOK + GetDiagnosticLogsConfigurationSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientGetDiagnosticLogsConfigurationSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetDiagnosticLogsConfigurationSlotResponse], errResp azfake.ErrorResponder) + + // GetDomainOwnershipIdentifier is the fake for method WebAppsClient.GetDomainOwnershipIdentifier + // HTTP status codes to indicate success: http.StatusOK + GetDomainOwnershipIdentifier func(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, options *armappservice.WebAppsClientGetDomainOwnershipIdentifierOptions) (resp azfake.Responder[armappservice.WebAppsClientGetDomainOwnershipIdentifierResponse], errResp azfake.ErrorResponder) + + // GetDomainOwnershipIdentifierSlot is the fake for method WebAppsClient.GetDomainOwnershipIdentifierSlot + // HTTP status codes to indicate success: http.StatusOK + GetDomainOwnershipIdentifierSlot func(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string, options *armappservice.WebAppsClientGetDomainOwnershipIdentifierSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetDomainOwnershipIdentifierSlotResponse], errResp azfake.ErrorResponder) + + // GetFtpAllowed is the fake for method WebAppsClient.GetFtpAllowed + // HTTP status codes to indicate success: http.StatusOK + GetFtpAllowed func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientGetFtpAllowedOptions) (resp azfake.Responder[armappservice.WebAppsClientGetFtpAllowedResponse], errResp azfake.ErrorResponder) + + // GetFtpAllowedSlot is the fake for method WebAppsClient.GetFtpAllowedSlot + // HTTP status codes to indicate success: http.StatusOK + GetFtpAllowedSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientGetFtpAllowedSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetFtpAllowedSlotResponse], errResp azfake.ErrorResponder) + + // GetFunction is the fake for method WebAppsClient.GetFunction + // HTTP status codes to indicate success: http.StatusOK + GetFunction func(ctx context.Context, resourceGroupName string, name string, functionName string, options *armappservice.WebAppsClientGetFunctionOptions) (resp azfake.Responder[armappservice.WebAppsClientGetFunctionResponse], errResp azfake.ErrorResponder) + + // GetFunctionsAdminToken is the fake for method WebAppsClient.GetFunctionsAdminToken + // HTTP status codes to indicate success: http.StatusOK + GetFunctionsAdminToken func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientGetFunctionsAdminTokenOptions) (resp azfake.Responder[armappservice.WebAppsClientGetFunctionsAdminTokenResponse], errResp azfake.ErrorResponder) + + // GetFunctionsAdminTokenSlot is the fake for method WebAppsClient.GetFunctionsAdminTokenSlot + // HTTP status codes to indicate success: http.StatusOK + GetFunctionsAdminTokenSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientGetFunctionsAdminTokenSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetFunctionsAdminTokenSlotResponse], errResp azfake.ErrorResponder) + + // GetHostNameBinding is the fake for method WebAppsClient.GetHostNameBinding + // HTTP status codes to indicate success: http.StatusOK + GetHostNameBinding func(ctx context.Context, resourceGroupName string, name string, hostName string, options *armappservice.WebAppsClientGetHostNameBindingOptions) (resp azfake.Responder[armappservice.WebAppsClientGetHostNameBindingResponse], errResp azfake.ErrorResponder) + + // GetHostNameBindingSlot is the fake for method WebAppsClient.GetHostNameBindingSlot + // HTTP status codes to indicate success: http.StatusOK + GetHostNameBindingSlot func(ctx context.Context, resourceGroupName string, name string, slot string, hostName string, options *armappservice.WebAppsClientGetHostNameBindingSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetHostNameBindingSlotResponse], errResp azfake.ErrorResponder) + + // GetHybridConnection is the fake for method WebAppsClient.GetHybridConnection + // HTTP status codes to indicate success: http.StatusOK + GetHybridConnection func(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, options *armappservice.WebAppsClientGetHybridConnectionOptions) (resp azfake.Responder[armappservice.WebAppsClientGetHybridConnectionResponse], errResp azfake.ErrorResponder) + + // GetHybridConnectionSlot is the fake for method WebAppsClient.GetHybridConnectionSlot + // HTTP status codes to indicate success: http.StatusOK + GetHybridConnectionSlot func(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string, options *armappservice.WebAppsClientGetHybridConnectionSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetHybridConnectionSlotResponse], errResp azfake.ErrorResponder) + + // GetInstanceFunctionSlot is the fake for method WebAppsClient.GetInstanceFunctionSlot + // HTTP status codes to indicate success: http.StatusOK + GetInstanceFunctionSlot func(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, options *armappservice.WebAppsClientGetInstanceFunctionSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetInstanceFunctionSlotResponse], errResp azfake.ErrorResponder) + + // GetInstanceInfo is the fake for method WebAppsClient.GetInstanceInfo + // HTTP status codes to indicate success: http.StatusOK + GetInstanceInfo func(ctx context.Context, resourceGroupName string, name string, instanceID string, options *armappservice.WebAppsClientGetInstanceInfoOptions) (resp azfake.Responder[armappservice.WebAppsClientGetInstanceInfoResponse], errResp azfake.ErrorResponder) + + // GetInstanceInfoSlot is the fake for method WebAppsClient.GetInstanceInfoSlot + // HTTP status codes to indicate success: http.StatusOK + GetInstanceInfoSlot func(ctx context.Context, resourceGroupName string, name string, instanceID string, slot string, options *armappservice.WebAppsClientGetInstanceInfoSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetInstanceInfoSlotResponse], errResp azfake.ErrorResponder) + + // GetInstanceMSDeployLog is the fake for method WebAppsClient.GetInstanceMSDeployLog + // HTTP status codes to indicate success: http.StatusOK + GetInstanceMSDeployLog func(ctx context.Context, resourceGroupName string, name string, instanceID string, options *armappservice.WebAppsClientGetInstanceMSDeployLogOptions) (resp azfake.Responder[armappservice.WebAppsClientGetInstanceMSDeployLogResponse], errResp azfake.ErrorResponder) + + // GetInstanceMSDeployLogSlot is the fake for method WebAppsClient.GetInstanceMSDeployLogSlot + // HTTP status codes to indicate success: http.StatusOK + GetInstanceMSDeployLogSlot func(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string, options *armappservice.WebAppsClientGetInstanceMSDeployLogSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetInstanceMSDeployLogSlotResponse], errResp azfake.ErrorResponder) + + // GetInstanceMsDeployStatus is the fake for method WebAppsClient.GetInstanceMsDeployStatus + // HTTP status codes to indicate success: http.StatusOK + GetInstanceMsDeployStatus func(ctx context.Context, resourceGroupName string, name string, instanceID string, options *armappservice.WebAppsClientGetInstanceMsDeployStatusOptions) (resp azfake.Responder[armappservice.WebAppsClientGetInstanceMsDeployStatusResponse], errResp azfake.ErrorResponder) + + // GetInstanceMsDeployStatusSlot is the fake for method WebAppsClient.GetInstanceMsDeployStatusSlot + // HTTP status codes to indicate success: http.StatusOK + GetInstanceMsDeployStatusSlot func(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string, options *armappservice.WebAppsClientGetInstanceMsDeployStatusSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetInstanceMsDeployStatusSlotResponse], errResp azfake.ErrorResponder) + + // GetInstanceProcess is the fake for method WebAppsClient.GetInstanceProcess + // HTTP status codes to indicate success: http.StatusOK + GetInstanceProcess func(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string, options *armappservice.WebAppsClientGetInstanceProcessOptions) (resp azfake.Responder[armappservice.WebAppsClientGetInstanceProcessResponse], errResp azfake.ErrorResponder) + + // GetInstanceProcessDump is the fake for method WebAppsClient.GetInstanceProcessDump + // HTTP status codes to indicate success: http.StatusOK + GetInstanceProcessDump func(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string, options *armappservice.WebAppsClientGetInstanceProcessDumpOptions) (resp azfake.Responder[armappservice.WebAppsClientGetInstanceProcessDumpResponse], errResp azfake.ErrorResponder) + + // GetInstanceProcessDumpSlot is the fake for method WebAppsClient.GetInstanceProcessDumpSlot + // HTTP status codes to indicate success: http.StatusOK + GetInstanceProcessDumpSlot func(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string, options *armappservice.WebAppsClientGetInstanceProcessDumpSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetInstanceProcessDumpSlotResponse], errResp azfake.ErrorResponder) + + // GetInstanceProcessModule is the fake for method WebAppsClient.GetInstanceProcessModule + // HTTP status codes to indicate success: http.StatusOK + GetInstanceProcessModule func(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, instanceID string, options *armappservice.WebAppsClientGetInstanceProcessModuleOptions) (resp azfake.Responder[armappservice.WebAppsClientGetInstanceProcessModuleResponse], errResp azfake.ErrorResponder) + + // GetInstanceProcessModuleSlot is the fake for method WebAppsClient.GetInstanceProcessModuleSlot + // HTTP status codes to indicate success: http.StatusOK + GetInstanceProcessModuleSlot func(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string, instanceID string, options *armappservice.WebAppsClientGetInstanceProcessModuleSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetInstanceProcessModuleSlotResponse], errResp azfake.ErrorResponder) + + // GetInstanceProcessSlot is the fake for method WebAppsClient.GetInstanceProcessSlot + // HTTP status codes to indicate success: http.StatusOK + GetInstanceProcessSlot func(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string, options *armappservice.WebAppsClientGetInstanceProcessSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetInstanceProcessSlotResponse], errResp azfake.ErrorResponder) + + // GetInstanceWorkflowSlot is the fake for method WebAppsClient.GetInstanceWorkflowSlot + // HTTP status codes to indicate success: http.StatusOK + GetInstanceWorkflowSlot func(ctx context.Context, resourceGroupName string, name string, slot string, workflowName string, options *armappservice.WebAppsClientGetInstanceWorkflowSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetInstanceWorkflowSlotResponse], errResp azfake.ErrorResponder) + + // GetMSDeployLog is the fake for method WebAppsClient.GetMSDeployLog + // HTTP status codes to indicate success: http.StatusOK + GetMSDeployLog func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientGetMSDeployLogOptions) (resp azfake.Responder[armappservice.WebAppsClientGetMSDeployLogResponse], errResp azfake.ErrorResponder) + + // GetMSDeployLogSlot is the fake for method WebAppsClient.GetMSDeployLogSlot + // HTTP status codes to indicate success: http.StatusOK + GetMSDeployLogSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientGetMSDeployLogSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetMSDeployLogSlotResponse], errResp azfake.ErrorResponder) + + // GetMSDeployStatus is the fake for method WebAppsClient.GetMSDeployStatus + // HTTP status codes to indicate success: http.StatusOK + GetMSDeployStatus func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientGetMSDeployStatusOptions) (resp azfake.Responder[armappservice.WebAppsClientGetMSDeployStatusResponse], errResp azfake.ErrorResponder) + + // GetMSDeployStatusSlot is the fake for method WebAppsClient.GetMSDeployStatusSlot + // HTTP status codes to indicate success: http.StatusOK + GetMSDeployStatusSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientGetMSDeployStatusSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetMSDeployStatusSlotResponse], errResp azfake.ErrorResponder) + + // GetMigrateMySQLStatus is the fake for method WebAppsClient.GetMigrateMySQLStatus + // HTTP status codes to indicate success: http.StatusOK + GetMigrateMySQLStatus func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientGetMigrateMySQLStatusOptions) (resp azfake.Responder[armappservice.WebAppsClientGetMigrateMySQLStatusResponse], errResp azfake.ErrorResponder) + + // GetMigrateMySQLStatusSlot is the fake for method WebAppsClient.GetMigrateMySQLStatusSlot + // HTTP status codes to indicate success: http.StatusOK + GetMigrateMySQLStatusSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientGetMigrateMySQLStatusSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetMigrateMySQLStatusSlotResponse], errResp azfake.ErrorResponder) + + // GetNetworkTraceOperation is the fake for method WebAppsClient.GetNetworkTraceOperation + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + GetNetworkTraceOperation func(ctx context.Context, resourceGroupName string, name string, operationID string, options *armappservice.WebAppsClientGetNetworkTraceOperationOptions) (resp azfake.Responder[armappservice.WebAppsClientGetNetworkTraceOperationResponse], errResp azfake.ErrorResponder) + + // GetNetworkTraceOperationSlot is the fake for method WebAppsClient.GetNetworkTraceOperationSlot + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + GetNetworkTraceOperationSlot func(ctx context.Context, resourceGroupName string, name string, operationID string, slot string, options *armappservice.WebAppsClientGetNetworkTraceOperationSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetNetworkTraceOperationSlotResponse], errResp azfake.ErrorResponder) + + // GetNetworkTraceOperationSlotV2 is the fake for method WebAppsClient.GetNetworkTraceOperationSlotV2 + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + GetNetworkTraceOperationSlotV2 func(ctx context.Context, resourceGroupName string, name string, operationID string, slot string, options *armappservice.WebAppsClientGetNetworkTraceOperationSlotV2Options) (resp azfake.Responder[armappservice.WebAppsClientGetNetworkTraceOperationSlotV2Response], errResp azfake.ErrorResponder) + + // GetNetworkTraceOperationV2 is the fake for method WebAppsClient.GetNetworkTraceOperationV2 + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + GetNetworkTraceOperationV2 func(ctx context.Context, resourceGroupName string, name string, operationID string, options *armappservice.WebAppsClientGetNetworkTraceOperationV2Options) (resp azfake.Responder[armappservice.WebAppsClientGetNetworkTraceOperationV2Response], errResp azfake.ErrorResponder) + + // GetNetworkTraces is the fake for method WebAppsClient.GetNetworkTraces + // HTTP status codes to indicate success: http.StatusOK + GetNetworkTraces func(ctx context.Context, resourceGroupName string, name string, operationID string, options *armappservice.WebAppsClientGetNetworkTracesOptions) (resp azfake.Responder[armappservice.WebAppsClientGetNetworkTracesResponse], errResp azfake.ErrorResponder) + + // GetNetworkTracesSlot is the fake for method WebAppsClient.GetNetworkTracesSlot + // HTTP status codes to indicate success: http.StatusOK + GetNetworkTracesSlot func(ctx context.Context, resourceGroupName string, name string, operationID string, slot string, options *armappservice.WebAppsClientGetNetworkTracesSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetNetworkTracesSlotResponse], errResp azfake.ErrorResponder) + + // GetNetworkTracesSlotV2 is the fake for method WebAppsClient.GetNetworkTracesSlotV2 + // HTTP status codes to indicate success: http.StatusOK + GetNetworkTracesSlotV2 func(ctx context.Context, resourceGroupName string, name string, operationID string, slot string, options *armappservice.WebAppsClientGetNetworkTracesSlotV2Options) (resp azfake.Responder[armappservice.WebAppsClientGetNetworkTracesSlotV2Response], errResp azfake.ErrorResponder) + + // GetNetworkTracesV2 is the fake for method WebAppsClient.GetNetworkTracesV2 + // HTTP status codes to indicate success: http.StatusOK + GetNetworkTracesV2 func(ctx context.Context, resourceGroupName string, name string, operationID string, options *armappservice.WebAppsClientGetNetworkTracesV2Options) (resp azfake.Responder[armappservice.WebAppsClientGetNetworkTracesV2Response], errResp azfake.ErrorResponder) + + // GetOneDeployStatus is the fake for method WebAppsClient.GetOneDeployStatus + // HTTP status codes to indicate success: http.StatusOK + GetOneDeployStatus func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientGetOneDeployStatusOptions) (resp azfake.Responder[armappservice.WebAppsClientGetOneDeployStatusResponse], errResp azfake.ErrorResponder) + + // GetPremierAddOn is the fake for method WebAppsClient.GetPremierAddOn + // HTTP status codes to indicate success: http.StatusOK + GetPremierAddOn func(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, options *armappservice.WebAppsClientGetPremierAddOnOptions) (resp azfake.Responder[armappservice.WebAppsClientGetPremierAddOnResponse], errResp azfake.ErrorResponder) + + // GetPremierAddOnSlot is the fake for method WebAppsClient.GetPremierAddOnSlot + // HTTP status codes to indicate success: http.StatusOK + GetPremierAddOnSlot func(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string, options *armappservice.WebAppsClientGetPremierAddOnSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetPremierAddOnSlotResponse], errResp azfake.ErrorResponder) + + // GetPrivateAccess is the fake for method WebAppsClient.GetPrivateAccess + // HTTP status codes to indicate success: http.StatusOK + GetPrivateAccess func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientGetPrivateAccessOptions) (resp azfake.Responder[armappservice.WebAppsClientGetPrivateAccessResponse], errResp azfake.ErrorResponder) + + // GetPrivateAccessSlot is the fake for method WebAppsClient.GetPrivateAccessSlot + // HTTP status codes to indicate success: http.StatusOK + GetPrivateAccessSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientGetPrivateAccessSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetPrivateAccessSlotResponse], errResp azfake.ErrorResponder) + + // GetPrivateEndpointConnection is the fake for method WebAppsClient.GetPrivateEndpointConnection + // HTTP status codes to indicate success: http.StatusOK + GetPrivateEndpointConnection func(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *armappservice.WebAppsClientGetPrivateEndpointConnectionOptions) (resp azfake.Responder[armappservice.WebAppsClientGetPrivateEndpointConnectionResponse], errResp azfake.ErrorResponder) + + // NewGetPrivateEndpointConnectionListPager is the fake for method WebAppsClient.NewGetPrivateEndpointConnectionListPager + // HTTP status codes to indicate success: http.StatusOK + NewGetPrivateEndpointConnectionListPager func(resourceGroupName string, name string, options *armappservice.WebAppsClientGetPrivateEndpointConnectionListOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientGetPrivateEndpointConnectionListResponse]) + + // NewGetPrivateEndpointConnectionListSlotPager is the fake for method WebAppsClient.NewGetPrivateEndpointConnectionListSlotPager + // HTTP status codes to indicate success: http.StatusOK + NewGetPrivateEndpointConnectionListSlotPager func(resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientGetPrivateEndpointConnectionListSlotOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientGetPrivateEndpointConnectionListSlotResponse]) + + // GetPrivateEndpointConnectionSlot is the fake for method WebAppsClient.GetPrivateEndpointConnectionSlot + // HTTP status codes to indicate success: http.StatusOK + GetPrivateEndpointConnectionSlot func(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, slot string, options *armappservice.WebAppsClientGetPrivateEndpointConnectionSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetPrivateEndpointConnectionSlotResponse], errResp azfake.ErrorResponder) + + // GetPrivateLinkResources is the fake for method WebAppsClient.GetPrivateLinkResources + // HTTP status codes to indicate success: http.StatusOK + GetPrivateLinkResources func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientGetPrivateLinkResourcesOptions) (resp azfake.Responder[armappservice.WebAppsClientGetPrivateLinkResourcesResponse], errResp azfake.ErrorResponder) + + // GetPrivateLinkResourcesSlot is the fake for method WebAppsClient.GetPrivateLinkResourcesSlot + // HTTP status codes to indicate success: http.StatusOK + GetPrivateLinkResourcesSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientGetPrivateLinkResourcesSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetPrivateLinkResourcesSlotResponse], errResp azfake.ErrorResponder) + + // GetProcess is the fake for method WebAppsClient.GetProcess + // HTTP status codes to indicate success: http.StatusOK + GetProcess func(ctx context.Context, resourceGroupName string, name string, processID string, options *armappservice.WebAppsClientGetProcessOptions) (resp azfake.Responder[armappservice.WebAppsClientGetProcessResponse], errResp azfake.ErrorResponder) + + // GetProcessDump is the fake for method WebAppsClient.GetProcessDump + // HTTP status codes to indicate success: http.StatusOK + GetProcessDump func(ctx context.Context, resourceGroupName string, name string, processID string, options *armappservice.WebAppsClientGetProcessDumpOptions) (resp azfake.Responder[armappservice.WebAppsClientGetProcessDumpResponse], errResp azfake.ErrorResponder) + + // GetProcessDumpSlot is the fake for method WebAppsClient.GetProcessDumpSlot + // HTTP status codes to indicate success: http.StatusOK + GetProcessDumpSlot func(ctx context.Context, resourceGroupName string, name string, processID string, slot string, options *armappservice.WebAppsClientGetProcessDumpSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetProcessDumpSlotResponse], errResp azfake.ErrorResponder) + + // GetProcessModule is the fake for method WebAppsClient.GetProcessModule + // HTTP status codes to indicate success: http.StatusOK + GetProcessModule func(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, options *armappservice.WebAppsClientGetProcessModuleOptions) (resp azfake.Responder[armappservice.WebAppsClientGetProcessModuleResponse], errResp azfake.ErrorResponder) + + // GetProcessModuleSlot is the fake for method WebAppsClient.GetProcessModuleSlot + // HTTP status codes to indicate success: http.StatusOK + GetProcessModuleSlot func(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string, options *armappservice.WebAppsClientGetProcessModuleSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetProcessModuleSlotResponse], errResp azfake.ErrorResponder) + + // GetProcessSlot is the fake for method WebAppsClient.GetProcessSlot + // HTTP status codes to indicate success: http.StatusOK + GetProcessSlot func(ctx context.Context, resourceGroupName string, name string, processID string, slot string, options *armappservice.WebAppsClientGetProcessSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetProcessSlotResponse], errResp azfake.ErrorResponder) + + // BeginGetProductionSiteDeploymentStatus is the fake for method WebAppsClient.BeginGetProductionSiteDeploymentStatus + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginGetProductionSiteDeploymentStatus func(ctx context.Context, resourceGroupName string, name string, deploymentStatusID string, options *armappservice.WebAppsClientBeginGetProductionSiteDeploymentStatusOptions) (resp azfake.PollerResponder[armappservice.WebAppsClientGetProductionSiteDeploymentStatusResponse], errResp azfake.ErrorResponder) + + // GetPublicCertificate is the fake for method WebAppsClient.GetPublicCertificate + // HTTP status codes to indicate success: http.StatusOK + GetPublicCertificate func(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, options *armappservice.WebAppsClientGetPublicCertificateOptions) (resp azfake.Responder[armappservice.WebAppsClientGetPublicCertificateResponse], errResp azfake.ErrorResponder) + + // GetPublicCertificateSlot is the fake for method WebAppsClient.GetPublicCertificateSlot + // HTTP status codes to indicate success: http.StatusOK + GetPublicCertificateSlot func(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string, options *armappservice.WebAppsClientGetPublicCertificateSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetPublicCertificateSlotResponse], errResp azfake.ErrorResponder) + + // GetRelayServiceConnection is the fake for method WebAppsClient.GetRelayServiceConnection + // HTTP status codes to indicate success: http.StatusOK + GetRelayServiceConnection func(ctx context.Context, resourceGroupName string, name string, entityName string, options *armappservice.WebAppsClientGetRelayServiceConnectionOptions) (resp azfake.Responder[armappservice.WebAppsClientGetRelayServiceConnectionResponse], errResp azfake.ErrorResponder) + + // GetRelayServiceConnectionSlot is the fake for method WebAppsClient.GetRelayServiceConnectionSlot + // HTTP status codes to indicate success: http.StatusOK + GetRelayServiceConnectionSlot func(ctx context.Context, resourceGroupName string, name string, entityName string, slot string, options *armappservice.WebAppsClientGetRelayServiceConnectionSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetRelayServiceConnectionSlotResponse], errResp azfake.ErrorResponder) + + // GetScmAllowed is the fake for method WebAppsClient.GetScmAllowed + // HTTP status codes to indicate success: http.StatusOK + GetScmAllowed func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientGetScmAllowedOptions) (resp azfake.Responder[armappservice.WebAppsClientGetScmAllowedResponse], errResp azfake.ErrorResponder) + + // GetScmAllowedSlot is the fake for method WebAppsClient.GetScmAllowedSlot + // HTTP status codes to indicate success: http.StatusOK + GetScmAllowedSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientGetScmAllowedSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetScmAllowedSlotResponse], errResp azfake.ErrorResponder) + + // GetSiteConnectionStringKeyVaultReference is the fake for method WebAppsClient.GetSiteConnectionStringKeyVaultReference + // HTTP status codes to indicate success: http.StatusOK + GetSiteConnectionStringKeyVaultReference func(ctx context.Context, resourceGroupName string, name string, connectionStringKey string, options *armappservice.WebAppsClientGetSiteConnectionStringKeyVaultReferenceOptions) (resp azfake.Responder[armappservice.WebAppsClientGetSiteConnectionStringKeyVaultReferenceResponse], errResp azfake.ErrorResponder) + + // GetSiteConnectionStringKeyVaultReferenceSlot is the fake for method WebAppsClient.GetSiteConnectionStringKeyVaultReferenceSlot + // HTTP status codes to indicate success: http.StatusOK + GetSiteConnectionStringKeyVaultReferenceSlot func(ctx context.Context, resourceGroupName string, name string, connectionStringKey string, slot string, options *armappservice.WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotResponse], errResp azfake.ErrorResponder) + + // NewGetSiteConnectionStringKeyVaultReferencesPager is the fake for method WebAppsClient.NewGetSiteConnectionStringKeyVaultReferencesPager + // HTTP status codes to indicate success: http.StatusOK + NewGetSiteConnectionStringKeyVaultReferencesPager func(resourceGroupName string, name string, options *armappservice.WebAppsClientGetSiteConnectionStringKeyVaultReferencesOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse]) + + // NewGetSiteConnectionStringKeyVaultReferencesSlotPager is the fake for method WebAppsClient.NewGetSiteConnectionStringKeyVaultReferencesSlotPager + // HTTP status codes to indicate success: http.StatusOK + NewGetSiteConnectionStringKeyVaultReferencesSlotPager func(resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse]) + + // GetSiteExtension is the fake for method WebAppsClient.GetSiteExtension + // HTTP status codes to indicate success: http.StatusOK + GetSiteExtension func(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, options *armappservice.WebAppsClientGetSiteExtensionOptions) (resp azfake.Responder[armappservice.WebAppsClientGetSiteExtensionResponse], errResp azfake.ErrorResponder) + + // GetSiteExtensionSlot is the fake for method WebAppsClient.GetSiteExtensionSlot + // HTTP status codes to indicate success: http.StatusOK + GetSiteExtensionSlot func(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string, options *armappservice.WebAppsClientGetSiteExtensionSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetSiteExtensionSlotResponse], errResp azfake.ErrorResponder) + + // GetSitePhpErrorLogFlag is the fake for method WebAppsClient.GetSitePhpErrorLogFlag + // HTTP status codes to indicate success: http.StatusOK + GetSitePhpErrorLogFlag func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientGetSitePhpErrorLogFlagOptions) (resp azfake.Responder[armappservice.WebAppsClientGetSitePhpErrorLogFlagResponse], errResp azfake.ErrorResponder) + + // GetSitePhpErrorLogFlagSlot is the fake for method WebAppsClient.GetSitePhpErrorLogFlagSlot + // HTTP status codes to indicate success: http.StatusOK + GetSitePhpErrorLogFlagSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientGetSitePhpErrorLogFlagSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetSitePhpErrorLogFlagSlotResponse], errResp azfake.ErrorResponder) + + // GetSlot is the fake for method WebAppsClient.GetSlot + // HTTP status codes to indicate success: http.StatusOK + GetSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientGetSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetSlotResponse], errResp azfake.ErrorResponder) + + // BeginGetSlotSiteDeploymentStatusSlot is the fake for method WebAppsClient.BeginGetSlotSiteDeploymentStatusSlot + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginGetSlotSiteDeploymentStatusSlot func(ctx context.Context, resourceGroupName string, name string, slot string, deploymentStatusID string, options *armappservice.WebAppsClientBeginGetSlotSiteDeploymentStatusSlotOptions) (resp azfake.PollerResponder[armappservice.WebAppsClientGetSlotSiteDeploymentStatusSlotResponse], errResp azfake.ErrorResponder) + + // GetSourceControl is the fake for method WebAppsClient.GetSourceControl + // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated, http.StatusAccepted + GetSourceControl func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientGetSourceControlOptions) (resp azfake.Responder[armappservice.WebAppsClientGetSourceControlResponse], errResp azfake.ErrorResponder) + + // GetSourceControlSlot is the fake for method WebAppsClient.GetSourceControlSlot + // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated, http.StatusAccepted + GetSourceControlSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientGetSourceControlSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetSourceControlSlotResponse], errResp azfake.ErrorResponder) + + // GetSwiftVirtualNetworkConnection is the fake for method WebAppsClient.GetSwiftVirtualNetworkConnection + // HTTP status codes to indicate success: http.StatusOK + GetSwiftVirtualNetworkConnection func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientGetSwiftVirtualNetworkConnectionOptions) (resp azfake.Responder[armappservice.WebAppsClientGetSwiftVirtualNetworkConnectionResponse], errResp azfake.ErrorResponder) + + // GetSwiftVirtualNetworkConnectionSlot is the fake for method WebAppsClient.GetSwiftVirtualNetworkConnectionSlot + // HTTP status codes to indicate success: http.StatusOK + GetSwiftVirtualNetworkConnectionSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientGetSwiftVirtualNetworkConnectionSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetSwiftVirtualNetworkConnectionSlotResponse], errResp azfake.ErrorResponder) + + // GetTriggeredWebJob is the fake for method WebAppsClient.GetTriggeredWebJob + // HTTP status codes to indicate success: http.StatusOK + GetTriggeredWebJob func(ctx context.Context, resourceGroupName string, name string, webJobName string, options *armappservice.WebAppsClientGetTriggeredWebJobOptions) (resp azfake.Responder[armappservice.WebAppsClientGetTriggeredWebJobResponse], errResp azfake.ErrorResponder) + + // GetTriggeredWebJobHistory is the fake for method WebAppsClient.GetTriggeredWebJobHistory + // HTTP status codes to indicate success: http.StatusOK + GetTriggeredWebJobHistory func(ctx context.Context, resourceGroupName string, name string, webJobName string, id string, options *armappservice.WebAppsClientGetTriggeredWebJobHistoryOptions) (resp azfake.Responder[armappservice.WebAppsClientGetTriggeredWebJobHistoryResponse], errResp azfake.ErrorResponder) + + // GetTriggeredWebJobHistorySlot is the fake for method WebAppsClient.GetTriggeredWebJobHistorySlot + // HTTP status codes to indicate success: http.StatusOK + GetTriggeredWebJobHistorySlot func(ctx context.Context, resourceGroupName string, name string, webJobName string, id string, slot string, options *armappservice.WebAppsClientGetTriggeredWebJobHistorySlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetTriggeredWebJobHistorySlotResponse], errResp azfake.ErrorResponder) + + // GetTriggeredWebJobSlot is the fake for method WebAppsClient.GetTriggeredWebJobSlot + // HTTP status codes to indicate success: http.StatusOK + GetTriggeredWebJobSlot func(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *armappservice.WebAppsClientGetTriggeredWebJobSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetTriggeredWebJobSlotResponse], errResp azfake.ErrorResponder) + + // GetVnetConnection is the fake for method WebAppsClient.GetVnetConnection + // HTTP status codes to indicate success: http.StatusOK + GetVnetConnection func(ctx context.Context, resourceGroupName string, name string, vnetName string, options *armappservice.WebAppsClientGetVnetConnectionOptions) (resp azfake.Responder[armappservice.WebAppsClientGetVnetConnectionResponse], errResp azfake.ErrorResponder) + + // GetVnetConnectionGateway is the fake for method WebAppsClient.GetVnetConnectionGateway + // HTTP status codes to indicate success: http.StatusOK + GetVnetConnectionGateway func(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, options *armappservice.WebAppsClientGetVnetConnectionGatewayOptions) (resp azfake.Responder[armappservice.WebAppsClientGetVnetConnectionGatewayResponse], errResp azfake.ErrorResponder) + + // GetVnetConnectionGatewaySlot is the fake for method WebAppsClient.GetVnetConnectionGatewaySlot + // HTTP status codes to indicate success: http.StatusOK + GetVnetConnectionGatewaySlot func(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, slot string, options *armappservice.WebAppsClientGetVnetConnectionGatewaySlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetVnetConnectionGatewaySlotResponse], errResp azfake.ErrorResponder) + + // GetVnetConnectionSlot is the fake for method WebAppsClient.GetVnetConnectionSlot + // HTTP status codes to indicate success: http.StatusOK + GetVnetConnectionSlot func(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string, options *armappservice.WebAppsClientGetVnetConnectionSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetVnetConnectionSlotResponse], errResp azfake.ErrorResponder) + + // GetWebJob is the fake for method WebAppsClient.GetWebJob + // HTTP status codes to indicate success: http.StatusOK + GetWebJob func(ctx context.Context, resourceGroupName string, name string, webJobName string, options *armappservice.WebAppsClientGetWebJobOptions) (resp azfake.Responder[armappservice.WebAppsClientGetWebJobResponse], errResp azfake.ErrorResponder) + + // GetWebJobSlot is the fake for method WebAppsClient.GetWebJobSlot + // HTTP status codes to indicate success: http.StatusOK + GetWebJobSlot func(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *armappservice.WebAppsClientGetWebJobSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetWebJobSlotResponse], errResp azfake.ErrorResponder) + + // GetWebSiteContainerLogs is the fake for method WebAppsClient.GetWebSiteContainerLogs + // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent + GetWebSiteContainerLogs func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientGetWebSiteContainerLogsOptions) (resp azfake.Responder[armappservice.WebAppsClientGetWebSiteContainerLogsResponse], errResp azfake.ErrorResponder) + + // GetWebSiteContainerLogsSlot is the fake for method WebAppsClient.GetWebSiteContainerLogsSlot + // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent + GetWebSiteContainerLogsSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientGetWebSiteContainerLogsSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientGetWebSiteContainerLogsSlotResponse], errResp azfake.ErrorResponder) + + // GetWorkflow is the fake for method WebAppsClient.GetWorkflow + // HTTP status codes to indicate success: http.StatusOK + GetWorkflow func(ctx context.Context, resourceGroupName string, name string, workflowName string, options *armappservice.WebAppsClientGetWorkflowOptions) (resp azfake.Responder[armappservice.WebAppsClientGetWorkflowResponse], errResp azfake.ErrorResponder) + + // BeginInstallSiteExtension is the fake for method WebAppsClient.BeginInstallSiteExtension + // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated + BeginInstallSiteExtension func(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, options *armappservice.WebAppsClientBeginInstallSiteExtensionOptions) (resp azfake.PollerResponder[armappservice.WebAppsClientInstallSiteExtensionResponse], errResp azfake.ErrorResponder) + + // BeginInstallSiteExtensionSlot is the fake for method WebAppsClient.BeginInstallSiteExtensionSlot + // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated + BeginInstallSiteExtensionSlot func(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string, options *armappservice.WebAppsClientBeginInstallSiteExtensionSlotOptions) (resp azfake.PollerResponder[armappservice.WebAppsClientInstallSiteExtensionSlotResponse], errResp azfake.ErrorResponder) + + // IsCloneable is the fake for method WebAppsClient.IsCloneable + // HTTP status codes to indicate success: http.StatusOK + IsCloneable func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientIsCloneableOptions) (resp azfake.Responder[armappservice.WebAppsClientIsCloneableResponse], errResp azfake.ErrorResponder) + + // IsCloneableSlot is the fake for method WebAppsClient.IsCloneableSlot + // HTTP status codes to indicate success: http.StatusOK + IsCloneableSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientIsCloneableSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientIsCloneableSlotResponse], errResp azfake.ErrorResponder) + + // NewListPager is the fake for method WebAppsClient.NewListPager + // HTTP status codes to indicate success: http.StatusOK + NewListPager func(options *armappservice.WebAppsClientListOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListResponse]) + + // ListApplicationSettings is the fake for method WebAppsClient.ListApplicationSettings + // HTTP status codes to indicate success: http.StatusOK + ListApplicationSettings func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientListApplicationSettingsOptions) (resp azfake.Responder[armappservice.WebAppsClientListApplicationSettingsResponse], errResp azfake.ErrorResponder) + + // ListApplicationSettingsSlot is the fake for method WebAppsClient.ListApplicationSettingsSlot + // HTTP status codes to indicate success: http.StatusOK + ListApplicationSettingsSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientListApplicationSettingsSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientListApplicationSettingsSlotResponse], errResp azfake.ErrorResponder) + + // ListAzureStorageAccounts is the fake for method WebAppsClient.ListAzureStorageAccounts + // HTTP status codes to indicate success: http.StatusOK + ListAzureStorageAccounts func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientListAzureStorageAccountsOptions) (resp azfake.Responder[armappservice.WebAppsClientListAzureStorageAccountsResponse], errResp azfake.ErrorResponder) + + // ListAzureStorageAccountsSlot is the fake for method WebAppsClient.ListAzureStorageAccountsSlot + // HTTP status codes to indicate success: http.StatusOK + ListAzureStorageAccountsSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientListAzureStorageAccountsSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientListAzureStorageAccountsSlotResponse], errResp azfake.ErrorResponder) + + // ListBackupStatusSecrets is the fake for method WebAppsClient.ListBackupStatusSecrets + // HTTP status codes to indicate success: http.StatusOK + ListBackupStatusSecrets func(ctx context.Context, resourceGroupName string, name string, backupID string, request armappservice.BackupRequest, options *armappservice.WebAppsClientListBackupStatusSecretsOptions) (resp azfake.Responder[armappservice.WebAppsClientListBackupStatusSecretsResponse], errResp azfake.ErrorResponder) + + // ListBackupStatusSecretsSlot is the fake for method WebAppsClient.ListBackupStatusSecretsSlot + // HTTP status codes to indicate success: http.StatusOK + ListBackupStatusSecretsSlot func(ctx context.Context, resourceGroupName string, name string, backupID string, slot string, request armappservice.BackupRequest, options *armappservice.WebAppsClientListBackupStatusSecretsSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientListBackupStatusSecretsSlotResponse], errResp azfake.ErrorResponder) + + // NewListBackupsPager is the fake for method WebAppsClient.NewListBackupsPager + // HTTP status codes to indicate success: http.StatusOK + NewListBackupsPager func(resourceGroupName string, name string, options *armappservice.WebAppsClientListBackupsOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListBackupsResponse]) + + // NewListBackupsSlotPager is the fake for method WebAppsClient.NewListBackupsSlotPager + // HTTP status codes to indicate success: http.StatusOK + NewListBackupsSlotPager func(resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientListBackupsSlotOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListBackupsSlotResponse]) + + // NewListBasicPublishingCredentialsPoliciesPager is the fake for method WebAppsClient.NewListBasicPublishingCredentialsPoliciesPager + // HTTP status codes to indicate success: http.StatusOK + NewListBasicPublishingCredentialsPoliciesPager func(resourceGroupName string, name string, options *armappservice.WebAppsClientListBasicPublishingCredentialsPoliciesOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListBasicPublishingCredentialsPoliciesResponse]) + + // NewListBasicPublishingCredentialsPoliciesSlotPager is the fake for method WebAppsClient.NewListBasicPublishingCredentialsPoliciesSlotPager + // HTTP status codes to indicate success: http.StatusOK + NewListBasicPublishingCredentialsPoliciesSlotPager func(resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientListBasicPublishingCredentialsPoliciesSlotOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse]) + + // NewListByResourceGroupPager is the fake for method WebAppsClient.NewListByResourceGroupPager + // HTTP status codes to indicate success: http.StatusOK + NewListByResourceGroupPager func(resourceGroupName string, options *armappservice.WebAppsClientListByResourceGroupOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListByResourceGroupResponse]) + + // NewListConfigurationSnapshotInfoPager is the fake for method WebAppsClient.NewListConfigurationSnapshotInfoPager + // HTTP status codes to indicate success: http.StatusOK + NewListConfigurationSnapshotInfoPager func(resourceGroupName string, name string, options *armappservice.WebAppsClientListConfigurationSnapshotInfoOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListConfigurationSnapshotInfoResponse]) + + // NewListConfigurationSnapshotInfoSlotPager is the fake for method WebAppsClient.NewListConfigurationSnapshotInfoSlotPager + // HTTP status codes to indicate success: http.StatusOK + NewListConfigurationSnapshotInfoSlotPager func(resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientListConfigurationSnapshotInfoSlotOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListConfigurationSnapshotInfoSlotResponse]) + + // NewListConfigurationsPager is the fake for method WebAppsClient.NewListConfigurationsPager + // HTTP status codes to indicate success: http.StatusOK + NewListConfigurationsPager func(resourceGroupName string, name string, options *armappservice.WebAppsClientListConfigurationsOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListConfigurationsResponse]) + + // NewListConfigurationsSlotPager is the fake for method WebAppsClient.NewListConfigurationsSlotPager + // HTTP status codes to indicate success: http.StatusOK + NewListConfigurationsSlotPager func(resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientListConfigurationsSlotOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListConfigurationsSlotResponse]) + + // ListConnectionStrings is the fake for method WebAppsClient.ListConnectionStrings + // HTTP status codes to indicate success: http.StatusOK + ListConnectionStrings func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientListConnectionStringsOptions) (resp azfake.Responder[armappservice.WebAppsClientListConnectionStringsResponse], errResp azfake.ErrorResponder) + + // ListConnectionStringsSlot is the fake for method WebAppsClient.ListConnectionStringsSlot + // HTTP status codes to indicate success: http.StatusOK + ListConnectionStringsSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientListConnectionStringsSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientListConnectionStringsSlotResponse], errResp azfake.ErrorResponder) + + // NewListContinuousWebJobsPager is the fake for method WebAppsClient.NewListContinuousWebJobsPager + // HTTP status codes to indicate success: http.StatusOK + NewListContinuousWebJobsPager func(resourceGroupName string, name string, options *armappservice.WebAppsClientListContinuousWebJobsOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListContinuousWebJobsResponse]) + + // NewListContinuousWebJobsSlotPager is the fake for method WebAppsClient.NewListContinuousWebJobsSlotPager + // HTTP status codes to indicate success: http.StatusOK + NewListContinuousWebJobsSlotPager func(resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientListContinuousWebJobsSlotOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListContinuousWebJobsSlotResponse]) + + // ListDeploymentLog is the fake for method WebAppsClient.ListDeploymentLog + // HTTP status codes to indicate success: http.StatusOK + ListDeploymentLog func(ctx context.Context, resourceGroupName string, name string, id string, options *armappservice.WebAppsClientListDeploymentLogOptions) (resp azfake.Responder[armappservice.WebAppsClientListDeploymentLogResponse], errResp azfake.ErrorResponder) + + // ListDeploymentLogSlot is the fake for method WebAppsClient.ListDeploymentLogSlot + // HTTP status codes to indicate success: http.StatusOK + ListDeploymentLogSlot func(ctx context.Context, resourceGroupName string, name string, id string, slot string, options *armappservice.WebAppsClientListDeploymentLogSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientListDeploymentLogSlotResponse], errResp azfake.ErrorResponder) + + // NewListDeploymentsPager is the fake for method WebAppsClient.NewListDeploymentsPager + // HTTP status codes to indicate success: http.StatusOK + NewListDeploymentsPager func(resourceGroupName string, name string, options *armappservice.WebAppsClientListDeploymentsOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListDeploymentsResponse]) + + // NewListDeploymentsSlotPager is the fake for method WebAppsClient.NewListDeploymentsSlotPager + // HTTP status codes to indicate success: http.StatusOK + NewListDeploymentsSlotPager func(resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientListDeploymentsSlotOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListDeploymentsSlotResponse]) + + // NewListDomainOwnershipIdentifiersPager is the fake for method WebAppsClient.NewListDomainOwnershipIdentifiersPager + // HTTP status codes to indicate success: http.StatusOK + NewListDomainOwnershipIdentifiersPager func(resourceGroupName string, name string, options *armappservice.WebAppsClientListDomainOwnershipIdentifiersOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListDomainOwnershipIdentifiersResponse]) + + // NewListDomainOwnershipIdentifiersSlotPager is the fake for method WebAppsClient.NewListDomainOwnershipIdentifiersSlotPager + // HTTP status codes to indicate success: http.StatusOK + NewListDomainOwnershipIdentifiersSlotPager func(resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientListDomainOwnershipIdentifiersSlotOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListDomainOwnershipIdentifiersSlotResponse]) + + // ListFunctionKeys is the fake for method WebAppsClient.ListFunctionKeys + // HTTP status codes to indicate success: http.StatusOK + ListFunctionKeys func(ctx context.Context, resourceGroupName string, name string, functionName string, options *armappservice.WebAppsClientListFunctionKeysOptions) (resp azfake.Responder[armappservice.WebAppsClientListFunctionKeysResponse], errResp azfake.ErrorResponder) + + // ListFunctionKeysSlot is the fake for method WebAppsClient.ListFunctionKeysSlot + // HTTP status codes to indicate success: http.StatusOK + ListFunctionKeysSlot func(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, options *armappservice.WebAppsClientListFunctionKeysSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientListFunctionKeysSlotResponse], errResp azfake.ErrorResponder) + + // ListFunctionSecrets is the fake for method WebAppsClient.ListFunctionSecrets + // HTTP status codes to indicate success: http.StatusOK + ListFunctionSecrets func(ctx context.Context, resourceGroupName string, name string, functionName string, options *armappservice.WebAppsClientListFunctionSecretsOptions) (resp azfake.Responder[armappservice.WebAppsClientListFunctionSecretsResponse], errResp azfake.ErrorResponder) + + // ListFunctionSecretsSlot is the fake for method WebAppsClient.ListFunctionSecretsSlot + // HTTP status codes to indicate success: http.StatusOK + ListFunctionSecretsSlot func(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, options *armappservice.WebAppsClientListFunctionSecretsSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientListFunctionSecretsSlotResponse], errResp azfake.ErrorResponder) + + // NewListFunctionsPager is the fake for method WebAppsClient.NewListFunctionsPager + // HTTP status codes to indicate success: http.StatusOK + NewListFunctionsPager func(resourceGroupName string, name string, options *armappservice.WebAppsClientListFunctionsOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListFunctionsResponse]) + + // ListHostKeys is the fake for method WebAppsClient.ListHostKeys + // HTTP status codes to indicate success: http.StatusOK + ListHostKeys func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientListHostKeysOptions) (resp azfake.Responder[armappservice.WebAppsClientListHostKeysResponse], errResp azfake.ErrorResponder) + + // ListHostKeysSlot is the fake for method WebAppsClient.ListHostKeysSlot + // HTTP status codes to indicate success: http.StatusOK + ListHostKeysSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientListHostKeysSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientListHostKeysSlotResponse], errResp azfake.ErrorResponder) + + // NewListHostNameBindingsPager is the fake for method WebAppsClient.NewListHostNameBindingsPager + // HTTP status codes to indicate success: http.StatusOK + NewListHostNameBindingsPager func(resourceGroupName string, name string, options *armappservice.WebAppsClientListHostNameBindingsOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListHostNameBindingsResponse]) + + // NewListHostNameBindingsSlotPager is the fake for method WebAppsClient.NewListHostNameBindingsSlotPager + // HTTP status codes to indicate success: http.StatusOK + NewListHostNameBindingsSlotPager func(resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientListHostNameBindingsSlotOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListHostNameBindingsSlotResponse]) + + // ListHybridConnections is the fake for method WebAppsClient.ListHybridConnections + // HTTP status codes to indicate success: http.StatusOK + ListHybridConnections func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientListHybridConnectionsOptions) (resp azfake.Responder[armappservice.WebAppsClientListHybridConnectionsResponse], errResp azfake.ErrorResponder) + + // ListHybridConnectionsSlot is the fake for method WebAppsClient.ListHybridConnectionsSlot + // HTTP status codes to indicate success: http.StatusOK + ListHybridConnectionsSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientListHybridConnectionsSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientListHybridConnectionsSlotResponse], errResp azfake.ErrorResponder) + + // NewListInstanceFunctionsSlotPager is the fake for method WebAppsClient.NewListInstanceFunctionsSlotPager + // HTTP status codes to indicate success: http.StatusOK + NewListInstanceFunctionsSlotPager func(resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientListInstanceFunctionsSlotOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListInstanceFunctionsSlotResponse]) + + // NewListInstanceIdentifiersPager is the fake for method WebAppsClient.NewListInstanceIdentifiersPager + // HTTP status codes to indicate success: http.StatusOK + NewListInstanceIdentifiersPager func(resourceGroupName string, name string, options *armappservice.WebAppsClientListInstanceIdentifiersOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListInstanceIdentifiersResponse]) + + // NewListInstanceIdentifiersSlotPager is the fake for method WebAppsClient.NewListInstanceIdentifiersSlotPager + // HTTP status codes to indicate success: http.StatusOK + NewListInstanceIdentifiersSlotPager func(resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientListInstanceIdentifiersSlotOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListInstanceIdentifiersSlotResponse]) + + // NewListInstanceProcessModulesPager is the fake for method WebAppsClient.NewListInstanceProcessModulesPager + // HTTP status codes to indicate success: http.StatusOK + NewListInstanceProcessModulesPager func(resourceGroupName string, name string, processID string, instanceID string, options *armappservice.WebAppsClientListInstanceProcessModulesOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListInstanceProcessModulesResponse]) + + // NewListInstanceProcessModulesSlotPager is the fake for method WebAppsClient.NewListInstanceProcessModulesSlotPager + // HTTP status codes to indicate success: http.StatusOK + NewListInstanceProcessModulesSlotPager func(resourceGroupName string, name string, processID string, slot string, instanceID string, options *armappservice.WebAppsClientListInstanceProcessModulesSlotOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListInstanceProcessModulesSlotResponse]) + + // NewListInstanceProcessThreadsPager is the fake for method WebAppsClient.NewListInstanceProcessThreadsPager + // HTTP status codes to indicate success: http.StatusOK + NewListInstanceProcessThreadsPager func(resourceGroupName string, name string, processID string, instanceID string, options *armappservice.WebAppsClientListInstanceProcessThreadsOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListInstanceProcessThreadsResponse]) + + // NewListInstanceProcessThreadsSlotPager is the fake for method WebAppsClient.NewListInstanceProcessThreadsSlotPager + // HTTP status codes to indicate success: http.StatusOK + NewListInstanceProcessThreadsSlotPager func(resourceGroupName string, name string, processID string, slot string, instanceID string, options *armappservice.WebAppsClientListInstanceProcessThreadsSlotOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListInstanceProcessThreadsSlotResponse]) + + // NewListInstanceProcessesPager is the fake for method WebAppsClient.NewListInstanceProcessesPager + // HTTP status codes to indicate success: http.StatusOK + NewListInstanceProcessesPager func(resourceGroupName string, name string, instanceID string, options *armappservice.WebAppsClientListInstanceProcessesOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListInstanceProcessesResponse]) + + // NewListInstanceProcessesSlotPager is the fake for method WebAppsClient.NewListInstanceProcessesSlotPager + // HTTP status codes to indicate success: http.StatusOK + NewListInstanceProcessesSlotPager func(resourceGroupName string, name string, slot string, instanceID string, options *armappservice.WebAppsClientListInstanceProcessesSlotOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListInstanceProcessesSlotResponse]) + + // NewListInstanceWorkflowsSlotPager is the fake for method WebAppsClient.NewListInstanceWorkflowsSlotPager + // HTTP status codes to indicate success: http.StatusOK + NewListInstanceWorkflowsSlotPager func(resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientListInstanceWorkflowsSlotOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListInstanceWorkflowsSlotResponse]) + + // ListMetadata is the fake for method WebAppsClient.ListMetadata + // HTTP status codes to indicate success: http.StatusOK + ListMetadata func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientListMetadataOptions) (resp azfake.Responder[armappservice.WebAppsClientListMetadataResponse], errResp azfake.ErrorResponder) + + // ListMetadataSlot is the fake for method WebAppsClient.ListMetadataSlot + // HTTP status codes to indicate success: http.StatusOK + ListMetadataSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientListMetadataSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientListMetadataSlotResponse], errResp azfake.ErrorResponder) + + // ListNetworkFeatures is the fake for method WebAppsClient.ListNetworkFeatures + // HTTP status codes to indicate success: http.StatusOK + ListNetworkFeatures func(ctx context.Context, resourceGroupName string, name string, view string, options *armappservice.WebAppsClientListNetworkFeaturesOptions) (resp azfake.Responder[armappservice.WebAppsClientListNetworkFeaturesResponse], errResp azfake.ErrorResponder) + + // ListNetworkFeaturesSlot is the fake for method WebAppsClient.ListNetworkFeaturesSlot + // HTTP status codes to indicate success: http.StatusOK + ListNetworkFeaturesSlot func(ctx context.Context, resourceGroupName string, name string, view string, slot string, options *armappservice.WebAppsClientListNetworkFeaturesSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientListNetworkFeaturesSlotResponse], errResp azfake.ErrorResponder) + + // NewListPerfMonCountersPager is the fake for method WebAppsClient.NewListPerfMonCountersPager + // HTTP status codes to indicate success: http.StatusOK + NewListPerfMonCountersPager func(resourceGroupName string, name string, options *armappservice.WebAppsClientListPerfMonCountersOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListPerfMonCountersResponse]) + + // NewListPerfMonCountersSlotPager is the fake for method WebAppsClient.NewListPerfMonCountersSlotPager + // HTTP status codes to indicate success: http.StatusOK + NewListPerfMonCountersSlotPager func(resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientListPerfMonCountersSlotOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListPerfMonCountersSlotResponse]) + + // ListPremierAddOns is the fake for method WebAppsClient.ListPremierAddOns + // HTTP status codes to indicate success: http.StatusOK + ListPremierAddOns func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientListPremierAddOnsOptions) (resp azfake.Responder[armappservice.WebAppsClientListPremierAddOnsResponse], errResp azfake.ErrorResponder) + + // ListPremierAddOnsSlot is the fake for method WebAppsClient.ListPremierAddOnsSlot + // HTTP status codes to indicate success: http.StatusOK + ListPremierAddOnsSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientListPremierAddOnsSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientListPremierAddOnsSlotResponse], errResp azfake.ErrorResponder) + + // NewListProcessModulesPager is the fake for method WebAppsClient.NewListProcessModulesPager + // HTTP status codes to indicate success: http.StatusOK + NewListProcessModulesPager func(resourceGroupName string, name string, processID string, options *armappservice.WebAppsClientListProcessModulesOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListProcessModulesResponse]) + + // NewListProcessModulesSlotPager is the fake for method WebAppsClient.NewListProcessModulesSlotPager + // HTTP status codes to indicate success: http.StatusOK + NewListProcessModulesSlotPager func(resourceGroupName string, name string, processID string, slot string, options *armappservice.WebAppsClientListProcessModulesSlotOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListProcessModulesSlotResponse]) + + // NewListProcessThreadsPager is the fake for method WebAppsClient.NewListProcessThreadsPager + // HTTP status codes to indicate success: http.StatusOK + NewListProcessThreadsPager func(resourceGroupName string, name string, processID string, options *armappservice.WebAppsClientListProcessThreadsOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListProcessThreadsResponse]) + + // NewListProcessThreadsSlotPager is the fake for method WebAppsClient.NewListProcessThreadsSlotPager + // HTTP status codes to indicate success: http.StatusOK + NewListProcessThreadsSlotPager func(resourceGroupName string, name string, processID string, slot string, options *armappservice.WebAppsClientListProcessThreadsSlotOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListProcessThreadsSlotResponse]) + + // NewListProcessesPager is the fake for method WebAppsClient.NewListProcessesPager + // HTTP status codes to indicate success: http.StatusOK + NewListProcessesPager func(resourceGroupName string, name string, options *armappservice.WebAppsClientListProcessesOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListProcessesResponse]) + + // NewListProcessesSlotPager is the fake for method WebAppsClient.NewListProcessesSlotPager + // HTTP status codes to indicate success: http.StatusOK + NewListProcessesSlotPager func(resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientListProcessesSlotOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListProcessesSlotResponse]) + + // NewListProductionSiteDeploymentStatusesPager is the fake for method WebAppsClient.NewListProductionSiteDeploymentStatusesPager + // HTTP status codes to indicate success: http.StatusOK + NewListProductionSiteDeploymentStatusesPager func(resourceGroupName string, name string, options *armappservice.WebAppsClientListProductionSiteDeploymentStatusesOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListProductionSiteDeploymentStatusesResponse]) + + // NewListPublicCertificatesPager is the fake for method WebAppsClient.NewListPublicCertificatesPager + // HTTP status codes to indicate success: http.StatusOK + NewListPublicCertificatesPager func(resourceGroupName string, name string, options *armappservice.WebAppsClientListPublicCertificatesOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListPublicCertificatesResponse]) + + // NewListPublicCertificatesSlotPager is the fake for method WebAppsClient.NewListPublicCertificatesSlotPager + // HTTP status codes to indicate success: http.StatusOK + NewListPublicCertificatesSlotPager func(resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientListPublicCertificatesSlotOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListPublicCertificatesSlotResponse]) + + // BeginListPublishingCredentials is the fake for method WebAppsClient.BeginListPublishingCredentials + // HTTP status codes to indicate success: http.StatusOK + BeginListPublishingCredentials func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientBeginListPublishingCredentialsOptions) (resp azfake.PollerResponder[armappservice.WebAppsClientListPublishingCredentialsResponse], errResp azfake.ErrorResponder) + + // BeginListPublishingCredentialsSlot is the fake for method WebAppsClient.BeginListPublishingCredentialsSlot + // HTTP status codes to indicate success: http.StatusOK + BeginListPublishingCredentialsSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientBeginListPublishingCredentialsSlotOptions) (resp azfake.PollerResponder[armappservice.WebAppsClientListPublishingCredentialsSlotResponse], errResp azfake.ErrorResponder) + + // ListPublishingProfileXMLWithSecrets is the fake for method WebAppsClient.ListPublishingProfileXMLWithSecrets + // HTTP status codes to indicate success: http.StatusOK + ListPublishingProfileXMLWithSecrets func(ctx context.Context, resourceGroupName string, name string, publishingProfileOptions armappservice.CsmPublishingProfileOptions, options *armappservice.WebAppsClientListPublishingProfileXMLWithSecretsOptions) (resp azfake.Responder[armappservice.WebAppsClientListPublishingProfileXMLWithSecretsResponse], errResp azfake.ErrorResponder) + + // ListPublishingProfileXMLWithSecretsSlot is the fake for method WebAppsClient.ListPublishingProfileXMLWithSecretsSlot + // HTTP status codes to indicate success: http.StatusOK + ListPublishingProfileXMLWithSecretsSlot func(ctx context.Context, resourceGroupName string, name string, slot string, publishingProfileOptions armappservice.CsmPublishingProfileOptions, options *armappservice.WebAppsClientListPublishingProfileXMLWithSecretsSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientListPublishingProfileXMLWithSecretsSlotResponse], errResp azfake.ErrorResponder) + + // ListRelayServiceConnections is the fake for method WebAppsClient.ListRelayServiceConnections + // HTTP status codes to indicate success: http.StatusOK + ListRelayServiceConnections func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientListRelayServiceConnectionsOptions) (resp azfake.Responder[armappservice.WebAppsClientListRelayServiceConnectionsResponse], errResp azfake.ErrorResponder) + + // ListRelayServiceConnectionsSlot is the fake for method WebAppsClient.ListRelayServiceConnectionsSlot + // HTTP status codes to indicate success: http.StatusOK + ListRelayServiceConnectionsSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientListRelayServiceConnectionsSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientListRelayServiceConnectionsSlotResponse], errResp azfake.ErrorResponder) + + // NewListSiteBackupsPager is the fake for method WebAppsClient.NewListSiteBackupsPager + // HTTP status codes to indicate success: http.StatusOK + NewListSiteBackupsPager func(resourceGroupName string, name string, options *armappservice.WebAppsClientListSiteBackupsOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListSiteBackupsResponse]) + + // NewListSiteBackupsSlotPager is the fake for method WebAppsClient.NewListSiteBackupsSlotPager + // HTTP status codes to indicate success: http.StatusOK + NewListSiteBackupsSlotPager func(resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientListSiteBackupsSlotOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListSiteBackupsSlotResponse]) + + // NewListSiteExtensionsPager is the fake for method WebAppsClient.NewListSiteExtensionsPager + // HTTP status codes to indicate success: http.StatusOK + NewListSiteExtensionsPager func(resourceGroupName string, name string, options *armappservice.WebAppsClientListSiteExtensionsOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListSiteExtensionsResponse]) + + // NewListSiteExtensionsSlotPager is the fake for method WebAppsClient.NewListSiteExtensionsSlotPager + // HTTP status codes to indicate success: http.StatusOK + NewListSiteExtensionsSlotPager func(resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientListSiteExtensionsSlotOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListSiteExtensionsSlotResponse]) + + // ListSitePushSettings is the fake for method WebAppsClient.ListSitePushSettings + // HTTP status codes to indicate success: http.StatusOK + ListSitePushSettings func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientListSitePushSettingsOptions) (resp azfake.Responder[armappservice.WebAppsClientListSitePushSettingsResponse], errResp azfake.ErrorResponder) + + // ListSitePushSettingsSlot is the fake for method WebAppsClient.ListSitePushSettingsSlot + // HTTP status codes to indicate success: http.StatusOK + ListSitePushSettingsSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientListSitePushSettingsSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientListSitePushSettingsSlotResponse], errResp azfake.ErrorResponder) + + // ListSlotConfigurationNames is the fake for method WebAppsClient.ListSlotConfigurationNames + // HTTP status codes to indicate success: http.StatusOK + ListSlotConfigurationNames func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientListSlotConfigurationNamesOptions) (resp azfake.Responder[armappservice.WebAppsClientListSlotConfigurationNamesResponse], errResp azfake.ErrorResponder) + + // NewListSlotDifferencesFromProductionPager is the fake for method WebAppsClient.NewListSlotDifferencesFromProductionPager + // HTTP status codes to indicate success: http.StatusOK + NewListSlotDifferencesFromProductionPager func(resourceGroupName string, name string, slotSwapEntity armappservice.CsmSlotEntity, options *armappservice.WebAppsClientListSlotDifferencesFromProductionOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListSlotDifferencesFromProductionResponse]) + + // NewListSlotDifferencesSlotPager is the fake for method WebAppsClient.NewListSlotDifferencesSlotPager + // HTTP status codes to indicate success: http.StatusOK + NewListSlotDifferencesSlotPager func(resourceGroupName string, name string, slot string, slotSwapEntity armappservice.CsmSlotEntity, options *armappservice.WebAppsClientListSlotDifferencesSlotOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListSlotDifferencesSlotResponse]) + + // NewListSlotSiteDeploymentStatusesSlotPager is the fake for method WebAppsClient.NewListSlotSiteDeploymentStatusesSlotPager + // HTTP status codes to indicate success: http.StatusOK + NewListSlotSiteDeploymentStatusesSlotPager func(resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientListSlotSiteDeploymentStatusesSlotOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListSlotSiteDeploymentStatusesSlotResponse]) + + // NewListSlotsPager is the fake for method WebAppsClient.NewListSlotsPager + // HTTP status codes to indicate success: http.StatusOK + NewListSlotsPager func(resourceGroupName string, name string, options *armappservice.WebAppsClientListSlotsOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListSlotsResponse]) + + // NewListSnapshotsPager is the fake for method WebAppsClient.NewListSnapshotsPager + // HTTP status codes to indicate success: http.StatusOK + NewListSnapshotsPager func(resourceGroupName string, name string, options *armappservice.WebAppsClientListSnapshotsOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListSnapshotsResponse]) + + // NewListSnapshotsFromDRSecondaryPager is the fake for method WebAppsClient.NewListSnapshotsFromDRSecondaryPager + // HTTP status codes to indicate success: http.StatusOK + NewListSnapshotsFromDRSecondaryPager func(resourceGroupName string, name string, options *armappservice.WebAppsClientListSnapshotsFromDRSecondaryOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListSnapshotsFromDRSecondaryResponse]) + + // NewListSnapshotsFromDRSecondarySlotPager is the fake for method WebAppsClient.NewListSnapshotsFromDRSecondarySlotPager + // HTTP status codes to indicate success: http.StatusOK + NewListSnapshotsFromDRSecondarySlotPager func(resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientListSnapshotsFromDRSecondarySlotOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListSnapshotsFromDRSecondarySlotResponse]) + + // NewListSnapshotsSlotPager is the fake for method WebAppsClient.NewListSnapshotsSlotPager + // HTTP status codes to indicate success: http.StatusOK + NewListSnapshotsSlotPager func(resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientListSnapshotsSlotOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListSnapshotsSlotResponse]) + + // ListSyncFunctionTriggers is the fake for method WebAppsClient.ListSyncFunctionTriggers + // HTTP status codes to indicate success: http.StatusOK + ListSyncFunctionTriggers func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientListSyncFunctionTriggersOptions) (resp azfake.Responder[armappservice.WebAppsClientListSyncFunctionTriggersResponse], errResp azfake.ErrorResponder) + + // ListSyncFunctionTriggersSlot is the fake for method WebAppsClient.ListSyncFunctionTriggersSlot + // HTTP status codes to indicate success: http.StatusOK + ListSyncFunctionTriggersSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientListSyncFunctionTriggersSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientListSyncFunctionTriggersSlotResponse], errResp azfake.ErrorResponder) + + // ListSyncStatus is the fake for method WebAppsClient.ListSyncStatus + // HTTP status codes to indicate success: http.StatusNoContent + ListSyncStatus func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientListSyncStatusOptions) (resp azfake.Responder[armappservice.WebAppsClientListSyncStatusResponse], errResp azfake.ErrorResponder) + + // ListSyncStatusSlot is the fake for method WebAppsClient.ListSyncStatusSlot + // HTTP status codes to indicate success: http.StatusNoContent + ListSyncStatusSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientListSyncStatusSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientListSyncStatusSlotResponse], errResp azfake.ErrorResponder) + + // NewListTriggeredWebJobHistoryPager is the fake for method WebAppsClient.NewListTriggeredWebJobHistoryPager + // HTTP status codes to indicate success: http.StatusOK + NewListTriggeredWebJobHistoryPager func(resourceGroupName string, name string, webJobName string, options *armappservice.WebAppsClientListTriggeredWebJobHistoryOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListTriggeredWebJobHistoryResponse]) + + // NewListTriggeredWebJobHistorySlotPager is the fake for method WebAppsClient.NewListTriggeredWebJobHistorySlotPager + // HTTP status codes to indicate success: http.StatusOK + NewListTriggeredWebJobHistorySlotPager func(resourceGroupName string, name string, webJobName string, slot string, options *armappservice.WebAppsClientListTriggeredWebJobHistorySlotOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListTriggeredWebJobHistorySlotResponse]) + + // NewListTriggeredWebJobsPager is the fake for method WebAppsClient.NewListTriggeredWebJobsPager + // HTTP status codes to indicate success: http.StatusOK + NewListTriggeredWebJobsPager func(resourceGroupName string, name string, options *armappservice.WebAppsClientListTriggeredWebJobsOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListTriggeredWebJobsResponse]) + + // NewListTriggeredWebJobsSlotPager is the fake for method WebAppsClient.NewListTriggeredWebJobsSlotPager + // HTTP status codes to indicate success: http.StatusOK + NewListTriggeredWebJobsSlotPager func(resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientListTriggeredWebJobsSlotOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListTriggeredWebJobsSlotResponse]) + + // NewListUsagesPager is the fake for method WebAppsClient.NewListUsagesPager + // HTTP status codes to indicate success: http.StatusOK + NewListUsagesPager func(resourceGroupName string, name string, options *armappservice.WebAppsClientListUsagesOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListUsagesResponse]) + + // NewListUsagesSlotPager is the fake for method WebAppsClient.NewListUsagesSlotPager + // HTTP status codes to indicate success: http.StatusOK + NewListUsagesSlotPager func(resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientListUsagesSlotOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListUsagesSlotResponse]) + + // ListVnetConnections is the fake for method WebAppsClient.ListVnetConnections + // HTTP status codes to indicate success: http.StatusOK + ListVnetConnections func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientListVnetConnectionsOptions) (resp azfake.Responder[armappservice.WebAppsClientListVnetConnectionsResponse], errResp azfake.ErrorResponder) + + // ListVnetConnectionsSlot is the fake for method WebAppsClient.ListVnetConnectionsSlot + // HTTP status codes to indicate success: http.StatusOK + ListVnetConnectionsSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientListVnetConnectionsSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientListVnetConnectionsSlotResponse], errResp azfake.ErrorResponder) + + // NewListWebJobsPager is the fake for method WebAppsClient.NewListWebJobsPager + // HTTP status codes to indicate success: http.StatusOK + NewListWebJobsPager func(resourceGroupName string, name string, options *armappservice.WebAppsClientListWebJobsOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListWebJobsResponse]) + + // NewListWebJobsSlotPager is the fake for method WebAppsClient.NewListWebJobsSlotPager + // HTTP status codes to indicate success: http.StatusOK + NewListWebJobsSlotPager func(resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientListWebJobsSlotOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListWebJobsSlotResponse]) + + // NewListWorkflowsPager is the fake for method WebAppsClient.NewListWorkflowsPager + // HTTP status codes to indicate success: http.StatusOK + NewListWorkflowsPager func(resourceGroupName string, name string, options *armappservice.WebAppsClientListWorkflowsOptions) (resp azfake.PagerResponder[armappservice.WebAppsClientListWorkflowsResponse]) + + // ListWorkflowsConnections is the fake for method WebAppsClient.ListWorkflowsConnections + // HTTP status codes to indicate success: http.StatusOK + ListWorkflowsConnections func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientListWorkflowsConnectionsOptions) (resp azfake.Responder[armappservice.WebAppsClientListWorkflowsConnectionsResponse], errResp azfake.ErrorResponder) + + // ListWorkflowsConnectionsSlot is the fake for method WebAppsClient.ListWorkflowsConnectionsSlot + // HTTP status codes to indicate success: http.StatusOK + ListWorkflowsConnectionsSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientListWorkflowsConnectionsSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientListWorkflowsConnectionsSlotResponse], errResp azfake.ErrorResponder) + + // BeginMigrateMySQL is the fake for method WebAppsClient.BeginMigrateMySQL + // HTTP status codes to indicate success: http.StatusOK + BeginMigrateMySQL func(ctx context.Context, resourceGroupName string, name string, migrationRequestEnvelope armappservice.MigrateMySQLRequest, options *armappservice.WebAppsClientBeginMigrateMySQLOptions) (resp azfake.PollerResponder[armappservice.WebAppsClientMigrateMySQLResponse], errResp azfake.ErrorResponder) + + // BeginMigrateStorage is the fake for method WebAppsClient.BeginMigrateStorage + // HTTP status codes to indicate success: http.StatusOK + BeginMigrateStorage func(ctx context.Context, subscriptionName string, resourceGroupName string, name string, migrationOptions armappservice.StorageMigrationOptions, options *armappservice.WebAppsClientBeginMigrateStorageOptions) (resp azfake.PollerResponder[armappservice.WebAppsClientMigrateStorageResponse], errResp azfake.ErrorResponder) + + // PutPrivateAccessVnet is the fake for method WebAppsClient.PutPrivateAccessVnet + // HTTP status codes to indicate success: http.StatusOK + PutPrivateAccessVnet func(ctx context.Context, resourceGroupName string, name string, access armappservice.PrivateAccess, options *armappservice.WebAppsClientPutPrivateAccessVnetOptions) (resp azfake.Responder[armappservice.WebAppsClientPutPrivateAccessVnetResponse], errResp azfake.ErrorResponder) + + // PutPrivateAccessVnetSlot is the fake for method WebAppsClient.PutPrivateAccessVnetSlot + // HTTP status codes to indicate success: http.StatusOK + PutPrivateAccessVnetSlot func(ctx context.Context, resourceGroupName string, name string, slot string, access armappservice.PrivateAccess, options *armappservice.WebAppsClientPutPrivateAccessVnetSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientPutPrivateAccessVnetSlotResponse], errResp azfake.ErrorResponder) + + // RecoverSiteConfigurationSnapshot is the fake for method WebAppsClient.RecoverSiteConfigurationSnapshot + // HTTP status codes to indicate success: http.StatusNoContent + RecoverSiteConfigurationSnapshot func(ctx context.Context, resourceGroupName string, name string, snapshotID string, options *armappservice.WebAppsClientRecoverSiteConfigurationSnapshotOptions) (resp azfake.Responder[armappservice.WebAppsClientRecoverSiteConfigurationSnapshotResponse], errResp azfake.ErrorResponder) + + // RecoverSiteConfigurationSnapshotSlot is the fake for method WebAppsClient.RecoverSiteConfigurationSnapshotSlot + // HTTP status codes to indicate success: http.StatusNoContent + RecoverSiteConfigurationSnapshotSlot func(ctx context.Context, resourceGroupName string, name string, snapshotID string, slot string, options *armappservice.WebAppsClientRecoverSiteConfigurationSnapshotSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientRecoverSiteConfigurationSnapshotSlotResponse], errResp azfake.ErrorResponder) + + // ResetProductionSlotConfig is the fake for method WebAppsClient.ResetProductionSlotConfig + // HTTP status codes to indicate success: http.StatusOK + ResetProductionSlotConfig func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientResetProductionSlotConfigOptions) (resp azfake.Responder[armappservice.WebAppsClientResetProductionSlotConfigResponse], errResp azfake.ErrorResponder) + + // ResetSlotConfigurationSlot is the fake for method WebAppsClient.ResetSlotConfigurationSlot + // HTTP status codes to indicate success: http.StatusOK + ResetSlotConfigurationSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientResetSlotConfigurationSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientResetSlotConfigurationSlotResponse], errResp azfake.ErrorResponder) + + // Restart is the fake for method WebAppsClient.Restart + // HTTP status codes to indicate success: http.StatusOK + Restart func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientRestartOptions) (resp azfake.Responder[armappservice.WebAppsClientRestartResponse], errResp azfake.ErrorResponder) + + // RestartSlot is the fake for method WebAppsClient.RestartSlot + // HTTP status codes to indicate success: http.StatusOK + RestartSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientRestartSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientRestartSlotResponse], errResp azfake.ErrorResponder) + + // BeginRestore is the fake for method WebAppsClient.BeginRestore + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginRestore func(ctx context.Context, resourceGroupName string, name string, backupID string, request armappservice.RestoreRequest, options *armappservice.WebAppsClientBeginRestoreOptions) (resp azfake.PollerResponder[armappservice.WebAppsClientRestoreResponse], errResp azfake.ErrorResponder) + + // BeginRestoreFromBackupBlob is the fake for method WebAppsClient.BeginRestoreFromBackupBlob + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginRestoreFromBackupBlob func(ctx context.Context, resourceGroupName string, name string, request armappservice.RestoreRequest, options *armappservice.WebAppsClientBeginRestoreFromBackupBlobOptions) (resp azfake.PollerResponder[armappservice.WebAppsClientRestoreFromBackupBlobResponse], errResp azfake.ErrorResponder) + + // BeginRestoreFromBackupBlobSlot is the fake for method WebAppsClient.BeginRestoreFromBackupBlobSlot + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginRestoreFromBackupBlobSlot func(ctx context.Context, resourceGroupName string, name string, slot string, request armappservice.RestoreRequest, options *armappservice.WebAppsClientBeginRestoreFromBackupBlobSlotOptions) (resp azfake.PollerResponder[armappservice.WebAppsClientRestoreFromBackupBlobSlotResponse], errResp azfake.ErrorResponder) + + // BeginRestoreFromDeletedApp is the fake for method WebAppsClient.BeginRestoreFromDeletedApp + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginRestoreFromDeletedApp func(ctx context.Context, resourceGroupName string, name string, restoreRequest armappservice.DeletedAppRestoreRequest, options *armappservice.WebAppsClientBeginRestoreFromDeletedAppOptions) (resp azfake.PollerResponder[armappservice.WebAppsClientRestoreFromDeletedAppResponse], errResp azfake.ErrorResponder) + + // BeginRestoreFromDeletedAppSlot is the fake for method WebAppsClient.BeginRestoreFromDeletedAppSlot + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginRestoreFromDeletedAppSlot func(ctx context.Context, resourceGroupName string, name string, slot string, restoreRequest armappservice.DeletedAppRestoreRequest, options *armappservice.WebAppsClientBeginRestoreFromDeletedAppSlotOptions) (resp azfake.PollerResponder[armappservice.WebAppsClientRestoreFromDeletedAppSlotResponse], errResp azfake.ErrorResponder) + + // BeginRestoreSlot is the fake for method WebAppsClient.BeginRestoreSlot + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginRestoreSlot func(ctx context.Context, resourceGroupName string, name string, backupID string, slot string, request armappservice.RestoreRequest, options *armappservice.WebAppsClientBeginRestoreSlotOptions) (resp azfake.PollerResponder[armappservice.WebAppsClientRestoreSlotResponse], errResp azfake.ErrorResponder) + + // BeginRestoreSnapshot is the fake for method WebAppsClient.BeginRestoreSnapshot + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginRestoreSnapshot func(ctx context.Context, resourceGroupName string, name string, restoreRequest armappservice.SnapshotRestoreRequest, options *armappservice.WebAppsClientBeginRestoreSnapshotOptions) (resp azfake.PollerResponder[armappservice.WebAppsClientRestoreSnapshotResponse], errResp azfake.ErrorResponder) + + // BeginRestoreSnapshotSlot is the fake for method WebAppsClient.BeginRestoreSnapshotSlot + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginRestoreSnapshotSlot func(ctx context.Context, resourceGroupName string, name string, slot string, restoreRequest armappservice.SnapshotRestoreRequest, options *armappservice.WebAppsClientBeginRestoreSnapshotSlotOptions) (resp azfake.PollerResponder[armappservice.WebAppsClientRestoreSnapshotSlotResponse], errResp azfake.ErrorResponder) + + // RunTriggeredWebJob is the fake for method WebAppsClient.RunTriggeredWebJob + // HTTP status codes to indicate success: http.StatusOK + RunTriggeredWebJob func(ctx context.Context, resourceGroupName string, name string, webJobName string, options *armappservice.WebAppsClientRunTriggeredWebJobOptions) (resp azfake.Responder[armappservice.WebAppsClientRunTriggeredWebJobResponse], errResp azfake.ErrorResponder) + + // RunTriggeredWebJobSlot is the fake for method WebAppsClient.RunTriggeredWebJobSlot + // HTTP status codes to indicate success: http.StatusOK + RunTriggeredWebJobSlot func(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *armappservice.WebAppsClientRunTriggeredWebJobSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientRunTriggeredWebJobSlotResponse], errResp azfake.ErrorResponder) + + // Start is the fake for method WebAppsClient.Start + // HTTP status codes to indicate success: http.StatusOK + Start func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientStartOptions) (resp azfake.Responder[armappservice.WebAppsClientStartResponse], errResp azfake.ErrorResponder) + + // StartContinuousWebJob is the fake for method WebAppsClient.StartContinuousWebJob + // HTTP status codes to indicate success: http.StatusOK + StartContinuousWebJob func(ctx context.Context, resourceGroupName string, name string, webJobName string, options *armappservice.WebAppsClientStartContinuousWebJobOptions) (resp azfake.Responder[armappservice.WebAppsClientStartContinuousWebJobResponse], errResp azfake.ErrorResponder) + + // StartContinuousWebJobSlot is the fake for method WebAppsClient.StartContinuousWebJobSlot + // HTTP status codes to indicate success: http.StatusOK + StartContinuousWebJobSlot func(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *armappservice.WebAppsClientStartContinuousWebJobSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientStartContinuousWebJobSlotResponse], errResp azfake.ErrorResponder) + + // BeginStartNetworkTrace is the fake for method WebAppsClient.BeginStartNetworkTrace + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginStartNetworkTrace func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientBeginStartNetworkTraceOptions) (resp azfake.PollerResponder[armappservice.WebAppsClientStartNetworkTraceResponse], errResp azfake.ErrorResponder) + + // BeginStartNetworkTraceSlot is the fake for method WebAppsClient.BeginStartNetworkTraceSlot + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginStartNetworkTraceSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientBeginStartNetworkTraceSlotOptions) (resp azfake.PollerResponder[armappservice.WebAppsClientStartNetworkTraceSlotResponse], errResp azfake.ErrorResponder) + + // StartSlot is the fake for method WebAppsClient.StartSlot + // HTTP status codes to indicate success: http.StatusOK + StartSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientStartSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientStartSlotResponse], errResp azfake.ErrorResponder) + + // StartWebSiteNetworkTrace is the fake for method WebAppsClient.StartWebSiteNetworkTrace + // HTTP status codes to indicate success: http.StatusOK + StartWebSiteNetworkTrace func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientStartWebSiteNetworkTraceOptions) (resp azfake.Responder[armappservice.WebAppsClientStartWebSiteNetworkTraceResponse], errResp azfake.ErrorResponder) + + // BeginStartWebSiteNetworkTraceOperation is the fake for method WebAppsClient.BeginStartWebSiteNetworkTraceOperation + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginStartWebSiteNetworkTraceOperation func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientBeginStartWebSiteNetworkTraceOperationOptions) (resp azfake.PollerResponder[armappservice.WebAppsClientStartWebSiteNetworkTraceOperationResponse], errResp azfake.ErrorResponder) + + // BeginStartWebSiteNetworkTraceOperationSlot is the fake for method WebAppsClient.BeginStartWebSiteNetworkTraceOperationSlot + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginStartWebSiteNetworkTraceOperationSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientBeginStartWebSiteNetworkTraceOperationSlotOptions) (resp azfake.PollerResponder[armappservice.WebAppsClientStartWebSiteNetworkTraceOperationSlotResponse], errResp azfake.ErrorResponder) + + // StartWebSiteNetworkTraceSlot is the fake for method WebAppsClient.StartWebSiteNetworkTraceSlot + // HTTP status codes to indicate success: http.StatusOK + StartWebSiteNetworkTraceSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientStartWebSiteNetworkTraceSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientStartWebSiteNetworkTraceSlotResponse], errResp azfake.ErrorResponder) + + // Stop is the fake for method WebAppsClient.Stop + // HTTP status codes to indicate success: http.StatusOK + Stop func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientStopOptions) (resp azfake.Responder[armappservice.WebAppsClientStopResponse], errResp azfake.ErrorResponder) + + // StopContinuousWebJob is the fake for method WebAppsClient.StopContinuousWebJob + // HTTP status codes to indicate success: http.StatusOK + StopContinuousWebJob func(ctx context.Context, resourceGroupName string, name string, webJobName string, options *armappservice.WebAppsClientStopContinuousWebJobOptions) (resp azfake.Responder[armappservice.WebAppsClientStopContinuousWebJobResponse], errResp azfake.ErrorResponder) + + // StopContinuousWebJobSlot is the fake for method WebAppsClient.StopContinuousWebJobSlot + // HTTP status codes to indicate success: http.StatusOK + StopContinuousWebJobSlot func(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *armappservice.WebAppsClientStopContinuousWebJobSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientStopContinuousWebJobSlotResponse], errResp azfake.ErrorResponder) + + // StopNetworkTrace is the fake for method WebAppsClient.StopNetworkTrace + // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent + StopNetworkTrace func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientStopNetworkTraceOptions) (resp azfake.Responder[armappservice.WebAppsClientStopNetworkTraceResponse], errResp azfake.ErrorResponder) + + // StopNetworkTraceSlot is the fake for method WebAppsClient.StopNetworkTraceSlot + // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent + StopNetworkTraceSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientStopNetworkTraceSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientStopNetworkTraceSlotResponse], errResp azfake.ErrorResponder) + + // StopSlot is the fake for method WebAppsClient.StopSlot + // HTTP status codes to indicate success: http.StatusOK + StopSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientStopSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientStopSlotResponse], errResp azfake.ErrorResponder) + + // StopWebSiteNetworkTrace is the fake for method WebAppsClient.StopWebSiteNetworkTrace + // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent + StopWebSiteNetworkTrace func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientStopWebSiteNetworkTraceOptions) (resp azfake.Responder[armappservice.WebAppsClientStopWebSiteNetworkTraceResponse], errResp azfake.ErrorResponder) + + // StopWebSiteNetworkTraceSlot is the fake for method WebAppsClient.StopWebSiteNetworkTraceSlot + // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent + StopWebSiteNetworkTraceSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientStopWebSiteNetworkTraceSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientStopWebSiteNetworkTraceSlotResponse], errResp azfake.ErrorResponder) + + // BeginSwapSlot is the fake for method WebAppsClient.BeginSwapSlot + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginSwapSlot func(ctx context.Context, resourceGroupName string, name string, slot string, slotSwapEntity armappservice.CsmSlotEntity, options *armappservice.WebAppsClientBeginSwapSlotOptions) (resp azfake.PollerResponder[armappservice.WebAppsClientSwapSlotResponse], errResp azfake.ErrorResponder) + + // BeginSwapSlotWithProduction is the fake for method WebAppsClient.BeginSwapSlotWithProduction + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginSwapSlotWithProduction func(ctx context.Context, resourceGroupName string, name string, slotSwapEntity armappservice.CsmSlotEntity, options *armappservice.WebAppsClientBeginSwapSlotWithProductionOptions) (resp azfake.PollerResponder[armappservice.WebAppsClientSwapSlotWithProductionResponse], errResp azfake.ErrorResponder) + + // SyncFunctionTriggers is the fake for method WebAppsClient.SyncFunctionTriggers + // HTTP status codes to indicate success: http.StatusNoContent + SyncFunctionTriggers func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientSyncFunctionTriggersOptions) (resp azfake.Responder[armappservice.WebAppsClientSyncFunctionTriggersResponse], errResp azfake.ErrorResponder) + + // SyncFunctionTriggersSlot is the fake for method WebAppsClient.SyncFunctionTriggersSlot + // HTTP status codes to indicate success: http.StatusNoContent + SyncFunctionTriggersSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientSyncFunctionTriggersSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientSyncFunctionTriggersSlotResponse], errResp azfake.ErrorResponder) + + // SyncFunctions is the fake for method WebAppsClient.SyncFunctions + // HTTP status codes to indicate success: http.StatusNoContent + SyncFunctions func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientSyncFunctionsOptions) (resp azfake.Responder[armappservice.WebAppsClientSyncFunctionsResponse], errResp azfake.ErrorResponder) + + // SyncFunctionsSlot is the fake for method WebAppsClient.SyncFunctionsSlot + // HTTP status codes to indicate success: http.StatusNoContent + SyncFunctionsSlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientSyncFunctionsSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientSyncFunctionsSlotResponse], errResp azfake.ErrorResponder) + + // SyncRepository is the fake for method WebAppsClient.SyncRepository + // HTTP status codes to indicate success: http.StatusOK + SyncRepository func(ctx context.Context, resourceGroupName string, name string, options *armappservice.WebAppsClientSyncRepositoryOptions) (resp azfake.Responder[armappservice.WebAppsClientSyncRepositoryResponse], errResp azfake.ErrorResponder) + + // SyncRepositorySlot is the fake for method WebAppsClient.SyncRepositorySlot + // HTTP status codes to indicate success: http.StatusOK + SyncRepositorySlot func(ctx context.Context, resourceGroupName string, name string, slot string, options *armappservice.WebAppsClientSyncRepositorySlotOptions) (resp azfake.Responder[armappservice.WebAppsClientSyncRepositorySlotResponse], errResp azfake.ErrorResponder) + + // Update is the fake for method WebAppsClient.Update + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + Update func(ctx context.Context, resourceGroupName string, name string, siteEnvelope armappservice.SitePatchResource, options *armappservice.WebAppsClientUpdateOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateResponse], errResp azfake.ErrorResponder) + + // UpdateApplicationSettings is the fake for method WebAppsClient.UpdateApplicationSettings + // HTTP status codes to indicate success: http.StatusOK + UpdateApplicationSettings func(ctx context.Context, resourceGroupName string, name string, appSettings armappservice.StringDictionary, options *armappservice.WebAppsClientUpdateApplicationSettingsOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateApplicationSettingsResponse], errResp azfake.ErrorResponder) + + // UpdateApplicationSettingsSlot is the fake for method WebAppsClient.UpdateApplicationSettingsSlot + // HTTP status codes to indicate success: http.StatusOK + UpdateApplicationSettingsSlot func(ctx context.Context, resourceGroupName string, name string, slot string, appSettings armappservice.StringDictionary, options *armappservice.WebAppsClientUpdateApplicationSettingsSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateApplicationSettingsSlotResponse], errResp azfake.ErrorResponder) + + // UpdateAuthSettings is the fake for method WebAppsClient.UpdateAuthSettings + // HTTP status codes to indicate success: http.StatusOK + UpdateAuthSettings func(ctx context.Context, resourceGroupName string, name string, siteAuthSettings armappservice.SiteAuthSettings, options *armappservice.WebAppsClientUpdateAuthSettingsOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateAuthSettingsResponse], errResp azfake.ErrorResponder) + + // UpdateAuthSettingsSlot is the fake for method WebAppsClient.UpdateAuthSettingsSlot + // HTTP status codes to indicate success: http.StatusOK + UpdateAuthSettingsSlot func(ctx context.Context, resourceGroupName string, name string, slot string, siteAuthSettings armappservice.SiteAuthSettings, options *armappservice.WebAppsClientUpdateAuthSettingsSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateAuthSettingsSlotResponse], errResp azfake.ErrorResponder) + + // UpdateAuthSettingsV2 is the fake for method WebAppsClient.UpdateAuthSettingsV2 + // HTTP status codes to indicate success: http.StatusOK + UpdateAuthSettingsV2 func(ctx context.Context, resourceGroupName string, name string, siteAuthSettingsV2 armappservice.SiteAuthSettingsV2, options *armappservice.WebAppsClientUpdateAuthSettingsV2Options) (resp azfake.Responder[armappservice.WebAppsClientUpdateAuthSettingsV2Response], errResp azfake.ErrorResponder) + + // UpdateAuthSettingsV2Slot is the fake for method WebAppsClient.UpdateAuthSettingsV2Slot + // HTTP status codes to indicate success: http.StatusOK + UpdateAuthSettingsV2Slot func(ctx context.Context, resourceGroupName string, name string, slot string, siteAuthSettingsV2 armappservice.SiteAuthSettingsV2, options *armappservice.WebAppsClientUpdateAuthSettingsV2SlotOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateAuthSettingsV2SlotResponse], errResp azfake.ErrorResponder) + + // UpdateAzureStorageAccounts is the fake for method WebAppsClient.UpdateAzureStorageAccounts + // HTTP status codes to indicate success: http.StatusOK + UpdateAzureStorageAccounts func(ctx context.Context, resourceGroupName string, name string, azureStorageAccounts armappservice.AzureStoragePropertyDictionaryResource, options *armappservice.WebAppsClientUpdateAzureStorageAccountsOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateAzureStorageAccountsResponse], errResp azfake.ErrorResponder) + + // UpdateAzureStorageAccountsSlot is the fake for method WebAppsClient.UpdateAzureStorageAccountsSlot + // HTTP status codes to indicate success: http.StatusOK + UpdateAzureStorageAccountsSlot func(ctx context.Context, resourceGroupName string, name string, slot string, azureStorageAccounts armappservice.AzureStoragePropertyDictionaryResource, options *armappservice.WebAppsClientUpdateAzureStorageAccountsSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateAzureStorageAccountsSlotResponse], errResp azfake.ErrorResponder) + + // UpdateBackupConfiguration is the fake for method WebAppsClient.UpdateBackupConfiguration + // HTTP status codes to indicate success: http.StatusOK + UpdateBackupConfiguration func(ctx context.Context, resourceGroupName string, name string, request armappservice.BackupRequest, options *armappservice.WebAppsClientUpdateBackupConfigurationOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateBackupConfigurationResponse], errResp azfake.ErrorResponder) + + // UpdateBackupConfigurationSlot is the fake for method WebAppsClient.UpdateBackupConfigurationSlot + // HTTP status codes to indicate success: http.StatusOK + UpdateBackupConfigurationSlot func(ctx context.Context, resourceGroupName string, name string, slot string, request armappservice.BackupRequest, options *armappservice.WebAppsClientUpdateBackupConfigurationSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateBackupConfigurationSlotResponse], errResp azfake.ErrorResponder) + + // UpdateConfiguration is the fake for method WebAppsClient.UpdateConfiguration + // HTTP status codes to indicate success: http.StatusOK + UpdateConfiguration func(ctx context.Context, resourceGroupName string, name string, siteConfig armappservice.SiteConfigResource, options *armappservice.WebAppsClientUpdateConfigurationOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateConfigurationResponse], errResp azfake.ErrorResponder) + + // UpdateConfigurationSlot is the fake for method WebAppsClient.UpdateConfigurationSlot + // HTTP status codes to indicate success: http.StatusOK + UpdateConfigurationSlot func(ctx context.Context, resourceGroupName string, name string, slot string, siteConfig armappservice.SiteConfigResource, options *armappservice.WebAppsClientUpdateConfigurationSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateConfigurationSlotResponse], errResp azfake.ErrorResponder) + + // UpdateConnectionStrings is the fake for method WebAppsClient.UpdateConnectionStrings + // HTTP status codes to indicate success: http.StatusOK + UpdateConnectionStrings func(ctx context.Context, resourceGroupName string, name string, connectionStrings armappservice.ConnectionStringDictionary, options *armappservice.WebAppsClientUpdateConnectionStringsOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateConnectionStringsResponse], errResp azfake.ErrorResponder) + + // UpdateConnectionStringsSlot is the fake for method WebAppsClient.UpdateConnectionStringsSlot + // HTTP status codes to indicate success: http.StatusOK + UpdateConnectionStringsSlot func(ctx context.Context, resourceGroupName string, name string, slot string, connectionStrings armappservice.ConnectionStringDictionary, options *armappservice.WebAppsClientUpdateConnectionStringsSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateConnectionStringsSlotResponse], errResp azfake.ErrorResponder) + + // UpdateDiagnosticLogsConfig is the fake for method WebAppsClient.UpdateDiagnosticLogsConfig + // HTTP status codes to indicate success: http.StatusOK + UpdateDiagnosticLogsConfig func(ctx context.Context, resourceGroupName string, name string, siteLogsConfig armappservice.SiteLogsConfig, options *armappservice.WebAppsClientUpdateDiagnosticLogsConfigOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateDiagnosticLogsConfigResponse], errResp azfake.ErrorResponder) + + // UpdateDiagnosticLogsConfigSlot is the fake for method WebAppsClient.UpdateDiagnosticLogsConfigSlot + // HTTP status codes to indicate success: http.StatusOK + UpdateDiagnosticLogsConfigSlot func(ctx context.Context, resourceGroupName string, name string, slot string, siteLogsConfig armappservice.SiteLogsConfig, options *armappservice.WebAppsClientUpdateDiagnosticLogsConfigSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateDiagnosticLogsConfigSlotResponse], errResp azfake.ErrorResponder) + + // UpdateDomainOwnershipIdentifier is the fake for method WebAppsClient.UpdateDomainOwnershipIdentifier + // HTTP status codes to indicate success: http.StatusOK + UpdateDomainOwnershipIdentifier func(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier armappservice.Identifier, options *armappservice.WebAppsClientUpdateDomainOwnershipIdentifierOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateDomainOwnershipIdentifierResponse], errResp azfake.ErrorResponder) + + // UpdateDomainOwnershipIdentifierSlot is the fake for method WebAppsClient.UpdateDomainOwnershipIdentifierSlot + // HTTP status codes to indicate success: http.StatusOK + UpdateDomainOwnershipIdentifierSlot func(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string, domainOwnershipIdentifier armappservice.Identifier, options *armappservice.WebAppsClientUpdateDomainOwnershipIdentifierSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateDomainOwnershipIdentifierSlotResponse], errResp azfake.ErrorResponder) + + // UpdateFtpAllowed is the fake for method WebAppsClient.UpdateFtpAllowed + // HTTP status codes to indicate success: http.StatusOK + UpdateFtpAllowed func(ctx context.Context, resourceGroupName string, name string, csmPublishingAccessPoliciesEntity armappservice.CsmPublishingCredentialsPoliciesEntity, options *armappservice.WebAppsClientUpdateFtpAllowedOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateFtpAllowedResponse], errResp azfake.ErrorResponder) + + // UpdateFtpAllowedSlot is the fake for method WebAppsClient.UpdateFtpAllowedSlot + // HTTP status codes to indicate success: http.StatusOK + UpdateFtpAllowedSlot func(ctx context.Context, resourceGroupName string, name string, slot string, csmPublishingAccessPoliciesEntity armappservice.CsmPublishingCredentialsPoliciesEntity, options *armappservice.WebAppsClientUpdateFtpAllowedSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateFtpAllowedSlotResponse], errResp azfake.ErrorResponder) + + // UpdateHybridConnection is the fake for method WebAppsClient.UpdateHybridConnection + // HTTP status codes to indicate success: http.StatusOK + UpdateHybridConnection func(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope armappservice.HybridConnection, options *armappservice.WebAppsClientUpdateHybridConnectionOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateHybridConnectionResponse], errResp azfake.ErrorResponder) + + // UpdateHybridConnectionSlot is the fake for method WebAppsClient.UpdateHybridConnectionSlot + // HTTP status codes to indicate success: http.StatusOK + UpdateHybridConnectionSlot func(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string, connectionEnvelope armappservice.HybridConnection, options *armappservice.WebAppsClientUpdateHybridConnectionSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateHybridConnectionSlotResponse], errResp azfake.ErrorResponder) + + // UpdateMetadata is the fake for method WebAppsClient.UpdateMetadata + // HTTP status codes to indicate success: http.StatusOK + UpdateMetadata func(ctx context.Context, resourceGroupName string, name string, metadata armappservice.StringDictionary, options *armappservice.WebAppsClientUpdateMetadataOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateMetadataResponse], errResp azfake.ErrorResponder) + + // UpdateMetadataSlot is the fake for method WebAppsClient.UpdateMetadataSlot + // HTTP status codes to indicate success: http.StatusOK + UpdateMetadataSlot func(ctx context.Context, resourceGroupName string, name string, slot string, metadata armappservice.StringDictionary, options *armappservice.WebAppsClientUpdateMetadataSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateMetadataSlotResponse], errResp azfake.ErrorResponder) + + // UpdatePremierAddOn is the fake for method WebAppsClient.UpdatePremierAddOn + // HTTP status codes to indicate success: http.StatusOK + UpdatePremierAddOn func(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, premierAddOn armappservice.PremierAddOnPatchResource, options *armappservice.WebAppsClientUpdatePremierAddOnOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdatePremierAddOnResponse], errResp azfake.ErrorResponder) + + // UpdatePremierAddOnSlot is the fake for method WebAppsClient.UpdatePremierAddOnSlot + // HTTP status codes to indicate success: http.StatusOK + UpdatePremierAddOnSlot func(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string, premierAddOn armappservice.PremierAddOnPatchResource, options *armappservice.WebAppsClientUpdatePremierAddOnSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdatePremierAddOnSlotResponse], errResp azfake.ErrorResponder) + + // UpdateRelayServiceConnection is the fake for method WebAppsClient.UpdateRelayServiceConnection + // HTTP status codes to indicate success: http.StatusOK + UpdateRelayServiceConnection func(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope armappservice.RelayServiceConnectionEntity, options *armappservice.WebAppsClientUpdateRelayServiceConnectionOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateRelayServiceConnectionResponse], errResp azfake.ErrorResponder) + + // UpdateRelayServiceConnectionSlot is the fake for method WebAppsClient.UpdateRelayServiceConnectionSlot + // HTTP status codes to indicate success: http.StatusOK + UpdateRelayServiceConnectionSlot func(ctx context.Context, resourceGroupName string, name string, entityName string, slot string, connectionEnvelope armappservice.RelayServiceConnectionEntity, options *armappservice.WebAppsClientUpdateRelayServiceConnectionSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateRelayServiceConnectionSlotResponse], errResp azfake.ErrorResponder) + + // UpdateScmAllowed is the fake for method WebAppsClient.UpdateScmAllowed + // HTTP status codes to indicate success: http.StatusOK + UpdateScmAllowed func(ctx context.Context, resourceGroupName string, name string, csmPublishingAccessPoliciesEntity armappservice.CsmPublishingCredentialsPoliciesEntity, options *armappservice.WebAppsClientUpdateScmAllowedOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateScmAllowedResponse], errResp azfake.ErrorResponder) + + // UpdateScmAllowedSlot is the fake for method WebAppsClient.UpdateScmAllowedSlot + // HTTP status codes to indicate success: http.StatusOK + UpdateScmAllowedSlot func(ctx context.Context, resourceGroupName string, name string, slot string, csmPublishingAccessPoliciesEntity armappservice.CsmPublishingCredentialsPoliciesEntity, options *armappservice.WebAppsClientUpdateScmAllowedSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateScmAllowedSlotResponse], errResp azfake.ErrorResponder) + + // UpdateSitePushSettings is the fake for method WebAppsClient.UpdateSitePushSettings + // HTTP status codes to indicate success: http.StatusOK + UpdateSitePushSettings func(ctx context.Context, resourceGroupName string, name string, pushSettings armappservice.PushSettings, options *armappservice.WebAppsClientUpdateSitePushSettingsOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateSitePushSettingsResponse], errResp azfake.ErrorResponder) + + // UpdateSitePushSettingsSlot is the fake for method WebAppsClient.UpdateSitePushSettingsSlot + // HTTP status codes to indicate success: http.StatusOK + UpdateSitePushSettingsSlot func(ctx context.Context, resourceGroupName string, name string, slot string, pushSettings armappservice.PushSettings, options *armappservice.WebAppsClientUpdateSitePushSettingsSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateSitePushSettingsSlotResponse], errResp azfake.ErrorResponder) + + // UpdateSlot is the fake for method WebAppsClient.UpdateSlot + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + UpdateSlot func(ctx context.Context, resourceGroupName string, name string, slot string, siteEnvelope armappservice.SitePatchResource, options *armappservice.WebAppsClientUpdateSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateSlotResponse], errResp azfake.ErrorResponder) + + // UpdateSlotConfigurationNames is the fake for method WebAppsClient.UpdateSlotConfigurationNames + // HTTP status codes to indicate success: http.StatusOK + UpdateSlotConfigurationNames func(ctx context.Context, resourceGroupName string, name string, slotConfigNames armappservice.SlotConfigNamesResource, options *armappservice.WebAppsClientUpdateSlotConfigurationNamesOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateSlotConfigurationNamesResponse], errResp azfake.ErrorResponder) + + // UpdateSourceControl is the fake for method WebAppsClient.UpdateSourceControl + // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated, http.StatusAccepted + UpdateSourceControl func(ctx context.Context, resourceGroupName string, name string, siteSourceControl armappservice.SiteSourceControl, options *armappservice.WebAppsClientUpdateSourceControlOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateSourceControlResponse], errResp azfake.ErrorResponder) + + // UpdateSourceControlSlot is the fake for method WebAppsClient.UpdateSourceControlSlot + // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated, http.StatusAccepted + UpdateSourceControlSlot func(ctx context.Context, resourceGroupName string, name string, slot string, siteSourceControl armappservice.SiteSourceControl, options *armappservice.WebAppsClientUpdateSourceControlSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateSourceControlSlotResponse], errResp azfake.ErrorResponder) + + // UpdateSwiftVirtualNetworkConnectionWithCheck is the fake for method WebAppsClient.UpdateSwiftVirtualNetworkConnectionWithCheck + // HTTP status codes to indicate success: http.StatusOK + UpdateSwiftVirtualNetworkConnectionWithCheck func(ctx context.Context, resourceGroupName string, name string, connectionEnvelope armappservice.SwiftVirtualNetwork, options *armappservice.WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckResponse], errResp azfake.ErrorResponder) + + // UpdateSwiftVirtualNetworkConnectionWithCheckSlot is the fake for method WebAppsClient.UpdateSwiftVirtualNetworkConnectionWithCheckSlot + // HTTP status codes to indicate success: http.StatusOK + UpdateSwiftVirtualNetworkConnectionWithCheckSlot func(ctx context.Context, resourceGroupName string, name string, slot string, connectionEnvelope armappservice.SwiftVirtualNetwork, options *armappservice.WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse], errResp azfake.ErrorResponder) + + // UpdateVnetConnection is the fake for method WebAppsClient.UpdateVnetConnection + // HTTP status codes to indicate success: http.StatusOK + UpdateVnetConnection func(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope armappservice.VnetInfoResource, options *armappservice.WebAppsClientUpdateVnetConnectionOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateVnetConnectionResponse], errResp azfake.ErrorResponder) + + // UpdateVnetConnectionGateway is the fake for method WebAppsClient.UpdateVnetConnectionGateway + // HTTP status codes to indicate success: http.StatusOK + UpdateVnetConnectionGateway func(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope armappservice.VnetGateway, options *armappservice.WebAppsClientUpdateVnetConnectionGatewayOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateVnetConnectionGatewayResponse], errResp azfake.ErrorResponder) + + // UpdateVnetConnectionGatewaySlot is the fake for method WebAppsClient.UpdateVnetConnectionGatewaySlot + // HTTP status codes to indicate success: http.StatusOK + UpdateVnetConnectionGatewaySlot func(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, slot string, connectionEnvelope armappservice.VnetGateway, options *armappservice.WebAppsClientUpdateVnetConnectionGatewaySlotOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateVnetConnectionGatewaySlotResponse], errResp azfake.ErrorResponder) + + // UpdateVnetConnectionSlot is the fake for method WebAppsClient.UpdateVnetConnectionSlot + // HTTP status codes to indicate success: http.StatusOK + UpdateVnetConnectionSlot func(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string, connectionEnvelope armappservice.VnetInfoResource, options *armappservice.WebAppsClientUpdateVnetConnectionSlotOptions) (resp azfake.Responder[armappservice.WebAppsClientUpdateVnetConnectionSlotResponse], errResp azfake.ErrorResponder) +} + +// NewWebAppsServerTransport creates a new instance of WebAppsServerTransport with the provided implementation. +// The returned WebAppsServerTransport instance is connected to an instance of armappservice.WebAppsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewWebAppsServerTransport(srv *WebAppsServer) *WebAppsServerTransport { + return &WebAppsServerTransport{ + srv: srv, + beginApproveOrRejectPrivateEndpointConnection: newTracker[azfake.PollerResponder[armappservice.WebAppsClientApproveOrRejectPrivateEndpointConnectionResponse]](), + beginApproveOrRejectPrivateEndpointConnectionSlot: newTracker[azfake.PollerResponder[armappservice.WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotResponse]](), + beginCreateFunction: newTracker[azfake.PollerResponder[armappservice.WebAppsClientCreateFunctionResponse]](), + beginCreateInstanceFunctionSlot: newTracker[azfake.PollerResponder[armappservice.WebAppsClientCreateInstanceFunctionSlotResponse]](), + beginCreateInstanceMSDeployOperation: newTracker[azfake.PollerResponder[armappservice.WebAppsClientCreateInstanceMSDeployOperationResponse]](), + beginCreateInstanceMSDeployOperationSlot: newTracker[azfake.PollerResponder[armappservice.WebAppsClientCreateInstanceMSDeployOperationSlotResponse]](), + beginCreateMSDeployOperation: newTracker[azfake.PollerResponder[armappservice.WebAppsClientCreateMSDeployOperationResponse]](), + beginCreateMSDeployOperationSlot: newTracker[azfake.PollerResponder[armappservice.WebAppsClientCreateMSDeployOperationSlotResponse]](), + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armappservice.WebAppsClientCreateOrUpdateResponse]](), + beginCreateOrUpdateSlot: newTracker[azfake.PollerResponder[armappservice.WebAppsClientCreateOrUpdateSlotResponse]](), + beginCreateOrUpdateSourceControl: newTracker[azfake.PollerResponder[armappservice.WebAppsClientCreateOrUpdateSourceControlResponse]](), + beginCreateOrUpdateSourceControlSlot: newTracker[azfake.PollerResponder[armappservice.WebAppsClientCreateOrUpdateSourceControlSlotResponse]](), + beginDeletePrivateEndpointConnection: newTracker[azfake.PollerResponder[armappservice.WebAppsClientDeletePrivateEndpointConnectionResponse]](), + beginDeletePrivateEndpointConnectionSlot: newTracker[azfake.PollerResponder[armappservice.WebAppsClientDeletePrivateEndpointConnectionSlotResponse]](), + newGetAppSettingsKeyVaultReferencesPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientGetAppSettingsKeyVaultReferencesResponse]](), + newGetAppSettingsKeyVaultReferencesSlotPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse]](), + newGetPrivateEndpointConnectionListPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientGetPrivateEndpointConnectionListResponse]](), + newGetPrivateEndpointConnectionListSlotPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientGetPrivateEndpointConnectionListSlotResponse]](), + beginGetProductionSiteDeploymentStatus: newTracker[azfake.PollerResponder[armappservice.WebAppsClientGetProductionSiteDeploymentStatusResponse]](), + newGetSiteConnectionStringKeyVaultReferencesPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse]](), + newGetSiteConnectionStringKeyVaultReferencesSlotPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse]](), + beginGetSlotSiteDeploymentStatusSlot: newTracker[azfake.PollerResponder[armappservice.WebAppsClientGetSlotSiteDeploymentStatusSlotResponse]](), + beginInstallSiteExtension: newTracker[azfake.PollerResponder[armappservice.WebAppsClientInstallSiteExtensionResponse]](), + beginInstallSiteExtensionSlot: newTracker[azfake.PollerResponder[armappservice.WebAppsClientInstallSiteExtensionSlotResponse]](), + newListPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListResponse]](), + newListBackupsPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListBackupsResponse]](), + newListBackupsSlotPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListBackupsSlotResponse]](), + newListBasicPublishingCredentialsPoliciesPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListBasicPublishingCredentialsPoliciesResponse]](), + newListBasicPublishingCredentialsPoliciesSlotPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse]](), + newListByResourceGroupPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListByResourceGroupResponse]](), + newListConfigurationSnapshotInfoPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListConfigurationSnapshotInfoResponse]](), + newListConfigurationSnapshotInfoSlotPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListConfigurationSnapshotInfoSlotResponse]](), + newListConfigurationsPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListConfigurationsResponse]](), + newListConfigurationsSlotPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListConfigurationsSlotResponse]](), + newListContinuousWebJobsPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListContinuousWebJobsResponse]](), + newListContinuousWebJobsSlotPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListContinuousWebJobsSlotResponse]](), + newListDeploymentsPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListDeploymentsResponse]](), + newListDeploymentsSlotPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListDeploymentsSlotResponse]](), + newListDomainOwnershipIdentifiersPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListDomainOwnershipIdentifiersResponse]](), + newListDomainOwnershipIdentifiersSlotPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListDomainOwnershipIdentifiersSlotResponse]](), + newListFunctionsPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListFunctionsResponse]](), + newListHostNameBindingsPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListHostNameBindingsResponse]](), + newListHostNameBindingsSlotPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListHostNameBindingsSlotResponse]](), + newListInstanceFunctionsSlotPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListInstanceFunctionsSlotResponse]](), + newListInstanceIdentifiersPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListInstanceIdentifiersResponse]](), + newListInstanceIdentifiersSlotPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListInstanceIdentifiersSlotResponse]](), + newListInstanceProcessModulesPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListInstanceProcessModulesResponse]](), + newListInstanceProcessModulesSlotPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListInstanceProcessModulesSlotResponse]](), + newListInstanceProcessThreadsPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListInstanceProcessThreadsResponse]](), + newListInstanceProcessThreadsSlotPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListInstanceProcessThreadsSlotResponse]](), + newListInstanceProcessesPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListInstanceProcessesResponse]](), + newListInstanceProcessesSlotPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListInstanceProcessesSlotResponse]](), + newListInstanceWorkflowsSlotPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListInstanceWorkflowsSlotResponse]](), + newListPerfMonCountersPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListPerfMonCountersResponse]](), + newListPerfMonCountersSlotPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListPerfMonCountersSlotResponse]](), + newListProcessModulesPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListProcessModulesResponse]](), + newListProcessModulesSlotPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListProcessModulesSlotResponse]](), + newListProcessThreadsPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListProcessThreadsResponse]](), + newListProcessThreadsSlotPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListProcessThreadsSlotResponse]](), + newListProcessesPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListProcessesResponse]](), + newListProcessesSlotPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListProcessesSlotResponse]](), + newListProductionSiteDeploymentStatusesPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListProductionSiteDeploymentStatusesResponse]](), + newListPublicCertificatesPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListPublicCertificatesResponse]](), + newListPublicCertificatesSlotPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListPublicCertificatesSlotResponse]](), + beginListPublishingCredentials: newTracker[azfake.PollerResponder[armappservice.WebAppsClientListPublishingCredentialsResponse]](), + beginListPublishingCredentialsSlot: newTracker[azfake.PollerResponder[armappservice.WebAppsClientListPublishingCredentialsSlotResponse]](), + newListSiteBackupsPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListSiteBackupsResponse]](), + newListSiteBackupsSlotPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListSiteBackupsSlotResponse]](), + newListSiteExtensionsPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListSiteExtensionsResponse]](), + newListSiteExtensionsSlotPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListSiteExtensionsSlotResponse]](), + newListSlotDifferencesFromProductionPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListSlotDifferencesFromProductionResponse]](), + newListSlotDifferencesSlotPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListSlotDifferencesSlotResponse]](), + newListSlotSiteDeploymentStatusesSlotPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListSlotSiteDeploymentStatusesSlotResponse]](), + newListSlotsPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListSlotsResponse]](), + newListSnapshotsPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListSnapshotsResponse]](), + newListSnapshotsFromDRSecondaryPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListSnapshotsFromDRSecondaryResponse]](), + newListSnapshotsFromDRSecondarySlotPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListSnapshotsFromDRSecondarySlotResponse]](), + newListSnapshotsSlotPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListSnapshotsSlotResponse]](), + newListTriggeredWebJobHistoryPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListTriggeredWebJobHistoryResponse]](), + newListTriggeredWebJobHistorySlotPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListTriggeredWebJobHistorySlotResponse]](), + newListTriggeredWebJobsPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListTriggeredWebJobsResponse]](), + newListTriggeredWebJobsSlotPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListTriggeredWebJobsSlotResponse]](), + newListUsagesPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListUsagesResponse]](), + newListUsagesSlotPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListUsagesSlotResponse]](), + newListWebJobsPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListWebJobsResponse]](), + newListWebJobsSlotPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListWebJobsSlotResponse]](), + newListWorkflowsPager: newTracker[azfake.PagerResponder[armappservice.WebAppsClientListWorkflowsResponse]](), + beginMigrateMySQL: newTracker[azfake.PollerResponder[armappservice.WebAppsClientMigrateMySQLResponse]](), + beginMigrateStorage: newTracker[azfake.PollerResponder[armappservice.WebAppsClientMigrateStorageResponse]](), + beginRestore: newTracker[azfake.PollerResponder[armappservice.WebAppsClientRestoreResponse]](), + beginRestoreFromBackupBlob: newTracker[azfake.PollerResponder[armappservice.WebAppsClientRestoreFromBackupBlobResponse]](), + beginRestoreFromBackupBlobSlot: newTracker[azfake.PollerResponder[armappservice.WebAppsClientRestoreFromBackupBlobSlotResponse]](), + beginRestoreFromDeletedApp: newTracker[azfake.PollerResponder[armappservice.WebAppsClientRestoreFromDeletedAppResponse]](), + beginRestoreFromDeletedAppSlot: newTracker[azfake.PollerResponder[armappservice.WebAppsClientRestoreFromDeletedAppSlotResponse]](), + beginRestoreSlot: newTracker[azfake.PollerResponder[armappservice.WebAppsClientRestoreSlotResponse]](), + beginRestoreSnapshot: newTracker[azfake.PollerResponder[armappservice.WebAppsClientRestoreSnapshotResponse]](), + beginRestoreSnapshotSlot: newTracker[azfake.PollerResponder[armappservice.WebAppsClientRestoreSnapshotSlotResponse]](), + beginStartNetworkTrace: newTracker[azfake.PollerResponder[armappservice.WebAppsClientStartNetworkTraceResponse]](), + beginStartNetworkTraceSlot: newTracker[azfake.PollerResponder[armappservice.WebAppsClientStartNetworkTraceSlotResponse]](), + beginStartWebSiteNetworkTraceOperation: newTracker[azfake.PollerResponder[armappservice.WebAppsClientStartWebSiteNetworkTraceOperationResponse]](), + beginStartWebSiteNetworkTraceOperationSlot: newTracker[azfake.PollerResponder[armappservice.WebAppsClientStartWebSiteNetworkTraceOperationSlotResponse]](), + beginSwapSlot: newTracker[azfake.PollerResponder[armappservice.WebAppsClientSwapSlotResponse]](), + beginSwapSlotWithProduction: newTracker[azfake.PollerResponder[armappservice.WebAppsClientSwapSlotWithProductionResponse]](), + } +} + +// WebAppsServerTransport connects instances of armappservice.WebAppsClient to instances of WebAppsServer. +// Don't use this type directly, use NewWebAppsServerTransport instead. +type WebAppsServerTransport struct { + srv *WebAppsServer + beginApproveOrRejectPrivateEndpointConnection *tracker[azfake.PollerResponder[armappservice.WebAppsClientApproveOrRejectPrivateEndpointConnectionResponse]] + beginApproveOrRejectPrivateEndpointConnectionSlot *tracker[azfake.PollerResponder[armappservice.WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotResponse]] + beginCreateFunction *tracker[azfake.PollerResponder[armappservice.WebAppsClientCreateFunctionResponse]] + beginCreateInstanceFunctionSlot *tracker[azfake.PollerResponder[armappservice.WebAppsClientCreateInstanceFunctionSlotResponse]] + beginCreateInstanceMSDeployOperation *tracker[azfake.PollerResponder[armappservice.WebAppsClientCreateInstanceMSDeployOperationResponse]] + beginCreateInstanceMSDeployOperationSlot *tracker[azfake.PollerResponder[armappservice.WebAppsClientCreateInstanceMSDeployOperationSlotResponse]] + beginCreateMSDeployOperation *tracker[azfake.PollerResponder[armappservice.WebAppsClientCreateMSDeployOperationResponse]] + beginCreateMSDeployOperationSlot *tracker[azfake.PollerResponder[armappservice.WebAppsClientCreateMSDeployOperationSlotResponse]] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armappservice.WebAppsClientCreateOrUpdateResponse]] + beginCreateOrUpdateSlot *tracker[azfake.PollerResponder[armappservice.WebAppsClientCreateOrUpdateSlotResponse]] + beginCreateOrUpdateSourceControl *tracker[azfake.PollerResponder[armappservice.WebAppsClientCreateOrUpdateSourceControlResponse]] + beginCreateOrUpdateSourceControlSlot *tracker[azfake.PollerResponder[armappservice.WebAppsClientCreateOrUpdateSourceControlSlotResponse]] + beginDeletePrivateEndpointConnection *tracker[azfake.PollerResponder[armappservice.WebAppsClientDeletePrivateEndpointConnectionResponse]] + beginDeletePrivateEndpointConnectionSlot *tracker[azfake.PollerResponder[armappservice.WebAppsClientDeletePrivateEndpointConnectionSlotResponse]] + newGetAppSettingsKeyVaultReferencesPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientGetAppSettingsKeyVaultReferencesResponse]] + newGetAppSettingsKeyVaultReferencesSlotPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse]] + newGetPrivateEndpointConnectionListPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientGetPrivateEndpointConnectionListResponse]] + newGetPrivateEndpointConnectionListSlotPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientGetPrivateEndpointConnectionListSlotResponse]] + beginGetProductionSiteDeploymentStatus *tracker[azfake.PollerResponder[armappservice.WebAppsClientGetProductionSiteDeploymentStatusResponse]] + newGetSiteConnectionStringKeyVaultReferencesPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse]] + newGetSiteConnectionStringKeyVaultReferencesSlotPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse]] + beginGetSlotSiteDeploymentStatusSlot *tracker[azfake.PollerResponder[armappservice.WebAppsClientGetSlotSiteDeploymentStatusSlotResponse]] + beginInstallSiteExtension *tracker[azfake.PollerResponder[armappservice.WebAppsClientInstallSiteExtensionResponse]] + beginInstallSiteExtensionSlot *tracker[azfake.PollerResponder[armappservice.WebAppsClientInstallSiteExtensionSlotResponse]] + newListPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListResponse]] + newListBackupsPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListBackupsResponse]] + newListBackupsSlotPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListBackupsSlotResponse]] + newListBasicPublishingCredentialsPoliciesPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListBasicPublishingCredentialsPoliciesResponse]] + newListBasicPublishingCredentialsPoliciesSlotPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse]] + newListByResourceGroupPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListByResourceGroupResponse]] + newListConfigurationSnapshotInfoPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListConfigurationSnapshotInfoResponse]] + newListConfigurationSnapshotInfoSlotPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListConfigurationSnapshotInfoSlotResponse]] + newListConfigurationsPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListConfigurationsResponse]] + newListConfigurationsSlotPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListConfigurationsSlotResponse]] + newListContinuousWebJobsPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListContinuousWebJobsResponse]] + newListContinuousWebJobsSlotPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListContinuousWebJobsSlotResponse]] + newListDeploymentsPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListDeploymentsResponse]] + newListDeploymentsSlotPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListDeploymentsSlotResponse]] + newListDomainOwnershipIdentifiersPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListDomainOwnershipIdentifiersResponse]] + newListDomainOwnershipIdentifiersSlotPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListDomainOwnershipIdentifiersSlotResponse]] + newListFunctionsPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListFunctionsResponse]] + newListHostNameBindingsPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListHostNameBindingsResponse]] + newListHostNameBindingsSlotPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListHostNameBindingsSlotResponse]] + newListInstanceFunctionsSlotPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListInstanceFunctionsSlotResponse]] + newListInstanceIdentifiersPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListInstanceIdentifiersResponse]] + newListInstanceIdentifiersSlotPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListInstanceIdentifiersSlotResponse]] + newListInstanceProcessModulesPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListInstanceProcessModulesResponse]] + newListInstanceProcessModulesSlotPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListInstanceProcessModulesSlotResponse]] + newListInstanceProcessThreadsPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListInstanceProcessThreadsResponse]] + newListInstanceProcessThreadsSlotPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListInstanceProcessThreadsSlotResponse]] + newListInstanceProcessesPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListInstanceProcessesResponse]] + newListInstanceProcessesSlotPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListInstanceProcessesSlotResponse]] + newListInstanceWorkflowsSlotPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListInstanceWorkflowsSlotResponse]] + newListPerfMonCountersPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListPerfMonCountersResponse]] + newListPerfMonCountersSlotPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListPerfMonCountersSlotResponse]] + newListProcessModulesPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListProcessModulesResponse]] + newListProcessModulesSlotPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListProcessModulesSlotResponse]] + newListProcessThreadsPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListProcessThreadsResponse]] + newListProcessThreadsSlotPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListProcessThreadsSlotResponse]] + newListProcessesPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListProcessesResponse]] + newListProcessesSlotPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListProcessesSlotResponse]] + newListProductionSiteDeploymentStatusesPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListProductionSiteDeploymentStatusesResponse]] + newListPublicCertificatesPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListPublicCertificatesResponse]] + newListPublicCertificatesSlotPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListPublicCertificatesSlotResponse]] + beginListPublishingCredentials *tracker[azfake.PollerResponder[armappservice.WebAppsClientListPublishingCredentialsResponse]] + beginListPublishingCredentialsSlot *tracker[azfake.PollerResponder[armappservice.WebAppsClientListPublishingCredentialsSlotResponse]] + newListSiteBackupsPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListSiteBackupsResponse]] + newListSiteBackupsSlotPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListSiteBackupsSlotResponse]] + newListSiteExtensionsPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListSiteExtensionsResponse]] + newListSiteExtensionsSlotPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListSiteExtensionsSlotResponse]] + newListSlotDifferencesFromProductionPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListSlotDifferencesFromProductionResponse]] + newListSlotDifferencesSlotPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListSlotDifferencesSlotResponse]] + newListSlotSiteDeploymentStatusesSlotPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListSlotSiteDeploymentStatusesSlotResponse]] + newListSlotsPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListSlotsResponse]] + newListSnapshotsPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListSnapshotsResponse]] + newListSnapshotsFromDRSecondaryPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListSnapshotsFromDRSecondaryResponse]] + newListSnapshotsFromDRSecondarySlotPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListSnapshotsFromDRSecondarySlotResponse]] + newListSnapshotsSlotPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListSnapshotsSlotResponse]] + newListTriggeredWebJobHistoryPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListTriggeredWebJobHistoryResponse]] + newListTriggeredWebJobHistorySlotPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListTriggeredWebJobHistorySlotResponse]] + newListTriggeredWebJobsPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListTriggeredWebJobsResponse]] + newListTriggeredWebJobsSlotPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListTriggeredWebJobsSlotResponse]] + newListUsagesPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListUsagesResponse]] + newListUsagesSlotPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListUsagesSlotResponse]] + newListWebJobsPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListWebJobsResponse]] + newListWebJobsSlotPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListWebJobsSlotResponse]] + newListWorkflowsPager *tracker[azfake.PagerResponder[armappservice.WebAppsClientListWorkflowsResponse]] + beginMigrateMySQL *tracker[azfake.PollerResponder[armappservice.WebAppsClientMigrateMySQLResponse]] + beginMigrateStorage *tracker[azfake.PollerResponder[armappservice.WebAppsClientMigrateStorageResponse]] + beginRestore *tracker[azfake.PollerResponder[armappservice.WebAppsClientRestoreResponse]] + beginRestoreFromBackupBlob *tracker[azfake.PollerResponder[armappservice.WebAppsClientRestoreFromBackupBlobResponse]] + beginRestoreFromBackupBlobSlot *tracker[azfake.PollerResponder[armappservice.WebAppsClientRestoreFromBackupBlobSlotResponse]] + beginRestoreFromDeletedApp *tracker[azfake.PollerResponder[armappservice.WebAppsClientRestoreFromDeletedAppResponse]] + beginRestoreFromDeletedAppSlot *tracker[azfake.PollerResponder[armappservice.WebAppsClientRestoreFromDeletedAppSlotResponse]] + beginRestoreSlot *tracker[azfake.PollerResponder[armappservice.WebAppsClientRestoreSlotResponse]] + beginRestoreSnapshot *tracker[azfake.PollerResponder[armappservice.WebAppsClientRestoreSnapshotResponse]] + beginRestoreSnapshotSlot *tracker[azfake.PollerResponder[armappservice.WebAppsClientRestoreSnapshotSlotResponse]] + beginStartNetworkTrace *tracker[azfake.PollerResponder[armappservice.WebAppsClientStartNetworkTraceResponse]] + beginStartNetworkTraceSlot *tracker[azfake.PollerResponder[armappservice.WebAppsClientStartNetworkTraceSlotResponse]] + beginStartWebSiteNetworkTraceOperation *tracker[azfake.PollerResponder[armappservice.WebAppsClientStartWebSiteNetworkTraceOperationResponse]] + beginStartWebSiteNetworkTraceOperationSlot *tracker[azfake.PollerResponder[armappservice.WebAppsClientStartWebSiteNetworkTraceOperationSlotResponse]] + beginSwapSlot *tracker[azfake.PollerResponder[armappservice.WebAppsClientSwapSlotResponse]] + beginSwapSlotWithProduction *tracker[azfake.PollerResponder[armappservice.WebAppsClientSwapSlotWithProductionResponse]] +} + +// Do implements the policy.Transporter interface for WebAppsServerTransport. +func (w *WebAppsServerTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + var resp *http.Response + var err error + + switch method { + case "WebAppsClient.AddPremierAddOn": + resp, err = w.dispatchAddPremierAddOn(req) + case "WebAppsClient.AddPremierAddOnSlot": + resp, err = w.dispatchAddPremierAddOnSlot(req) + case "WebAppsClient.AnalyzeCustomHostname": + resp, err = w.dispatchAnalyzeCustomHostname(req) + case "WebAppsClient.AnalyzeCustomHostnameSlot": + resp, err = w.dispatchAnalyzeCustomHostnameSlot(req) + case "WebAppsClient.ApplySlotConfigToProduction": + resp, err = w.dispatchApplySlotConfigToProduction(req) + case "WebAppsClient.ApplySlotConfigurationSlot": + resp, err = w.dispatchApplySlotConfigurationSlot(req) + case "WebAppsClient.BeginApproveOrRejectPrivateEndpointConnection": + resp, err = w.dispatchBeginApproveOrRejectPrivateEndpointConnection(req) + case "WebAppsClient.BeginApproveOrRejectPrivateEndpointConnectionSlot": + resp, err = w.dispatchBeginApproveOrRejectPrivateEndpointConnectionSlot(req) + case "WebAppsClient.Backup": + resp, err = w.dispatchBackup(req) + case "WebAppsClient.BackupSlot": + resp, err = w.dispatchBackupSlot(req) + case "WebAppsClient.CreateDeployment": + resp, err = w.dispatchCreateDeployment(req) + case "WebAppsClient.CreateDeploymentSlot": + resp, err = w.dispatchCreateDeploymentSlot(req) + case "WebAppsClient.BeginCreateFunction": + resp, err = w.dispatchBeginCreateFunction(req) + case "WebAppsClient.BeginCreateInstanceFunctionSlot": + resp, err = w.dispatchBeginCreateInstanceFunctionSlot(req) + case "WebAppsClient.BeginCreateInstanceMSDeployOperation": + resp, err = w.dispatchBeginCreateInstanceMSDeployOperation(req) + case "WebAppsClient.BeginCreateInstanceMSDeployOperationSlot": + resp, err = w.dispatchBeginCreateInstanceMSDeployOperationSlot(req) + case "WebAppsClient.BeginCreateMSDeployOperation": + resp, err = w.dispatchBeginCreateMSDeployOperation(req) + case "WebAppsClient.BeginCreateMSDeployOperationSlot": + resp, err = w.dispatchBeginCreateMSDeployOperationSlot(req) + case "WebAppsClient.CreateOneDeployOperation": + resp, err = w.dispatchCreateOneDeployOperation(req) + case "WebAppsClient.BeginCreateOrUpdate": + resp, err = w.dispatchBeginCreateOrUpdate(req) + case "WebAppsClient.CreateOrUpdateConfiguration": + resp, err = w.dispatchCreateOrUpdateConfiguration(req) + case "WebAppsClient.CreateOrUpdateConfigurationSlot": + resp, err = w.dispatchCreateOrUpdateConfigurationSlot(req) + case "WebAppsClient.CreateOrUpdateDomainOwnershipIdentifier": + resp, err = w.dispatchCreateOrUpdateDomainOwnershipIdentifier(req) + case "WebAppsClient.CreateOrUpdateDomainOwnershipIdentifierSlot": + resp, err = w.dispatchCreateOrUpdateDomainOwnershipIdentifierSlot(req) + case "WebAppsClient.CreateOrUpdateFunctionSecret": + resp, err = w.dispatchCreateOrUpdateFunctionSecret(req) + case "WebAppsClient.CreateOrUpdateFunctionSecretSlot": + resp, err = w.dispatchCreateOrUpdateFunctionSecretSlot(req) + case "WebAppsClient.CreateOrUpdateHostNameBinding": + resp, err = w.dispatchCreateOrUpdateHostNameBinding(req) + case "WebAppsClient.CreateOrUpdateHostNameBindingSlot": + resp, err = w.dispatchCreateOrUpdateHostNameBindingSlot(req) + case "WebAppsClient.CreateOrUpdateHostSecret": + resp, err = w.dispatchCreateOrUpdateHostSecret(req) + case "WebAppsClient.CreateOrUpdateHostSecretSlot": + resp, err = w.dispatchCreateOrUpdateHostSecretSlot(req) + case "WebAppsClient.CreateOrUpdateHybridConnection": + resp, err = w.dispatchCreateOrUpdateHybridConnection(req) + case "WebAppsClient.CreateOrUpdateHybridConnectionSlot": + resp, err = w.dispatchCreateOrUpdateHybridConnectionSlot(req) + case "WebAppsClient.CreateOrUpdatePublicCertificate": + resp, err = w.dispatchCreateOrUpdatePublicCertificate(req) + case "WebAppsClient.CreateOrUpdatePublicCertificateSlot": + resp, err = w.dispatchCreateOrUpdatePublicCertificateSlot(req) + case "WebAppsClient.CreateOrUpdateRelayServiceConnection": + resp, err = w.dispatchCreateOrUpdateRelayServiceConnection(req) + case "WebAppsClient.CreateOrUpdateRelayServiceConnectionSlot": + resp, err = w.dispatchCreateOrUpdateRelayServiceConnectionSlot(req) + case "WebAppsClient.BeginCreateOrUpdateSlot": + resp, err = w.dispatchBeginCreateOrUpdateSlot(req) + case "WebAppsClient.BeginCreateOrUpdateSourceControl": + resp, err = w.dispatchBeginCreateOrUpdateSourceControl(req) + case "WebAppsClient.BeginCreateOrUpdateSourceControlSlot": + resp, err = w.dispatchBeginCreateOrUpdateSourceControlSlot(req) + case "WebAppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck": + resp, err = w.dispatchCreateOrUpdateSwiftVirtualNetworkConnectionWithCheck(req) + case "WebAppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot": + resp, err = w.dispatchCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot(req) + case "WebAppsClient.CreateOrUpdateVnetConnection": + resp, err = w.dispatchCreateOrUpdateVnetConnection(req) + case "WebAppsClient.CreateOrUpdateVnetConnectionGateway": + resp, err = w.dispatchCreateOrUpdateVnetConnectionGateway(req) + case "WebAppsClient.CreateOrUpdateVnetConnectionGatewaySlot": + resp, err = w.dispatchCreateOrUpdateVnetConnectionGatewaySlot(req) + case "WebAppsClient.CreateOrUpdateVnetConnectionSlot": + resp, err = w.dispatchCreateOrUpdateVnetConnectionSlot(req) + case "WebAppsClient.Delete": + resp, err = w.dispatchDelete(req) + case "WebAppsClient.DeleteBackup": + resp, err = w.dispatchDeleteBackup(req) + case "WebAppsClient.DeleteBackupConfiguration": + resp, err = w.dispatchDeleteBackupConfiguration(req) + case "WebAppsClient.DeleteBackupConfigurationSlot": + resp, err = w.dispatchDeleteBackupConfigurationSlot(req) + case "WebAppsClient.DeleteBackupSlot": + resp, err = w.dispatchDeleteBackupSlot(req) + case "WebAppsClient.DeleteContinuousWebJob": + resp, err = w.dispatchDeleteContinuousWebJob(req) + case "WebAppsClient.DeleteContinuousWebJobSlot": + resp, err = w.dispatchDeleteContinuousWebJobSlot(req) + case "WebAppsClient.DeleteDeployment": + resp, err = w.dispatchDeleteDeployment(req) + case "WebAppsClient.DeleteDeploymentSlot": + resp, err = w.dispatchDeleteDeploymentSlot(req) + case "WebAppsClient.DeleteDomainOwnershipIdentifier": + resp, err = w.dispatchDeleteDomainOwnershipIdentifier(req) + case "WebAppsClient.DeleteDomainOwnershipIdentifierSlot": + resp, err = w.dispatchDeleteDomainOwnershipIdentifierSlot(req) + case "WebAppsClient.DeleteFunction": + resp, err = w.dispatchDeleteFunction(req) + case "WebAppsClient.DeleteFunctionSecret": + resp, err = w.dispatchDeleteFunctionSecret(req) + case "WebAppsClient.DeleteFunctionSecretSlot": + resp, err = w.dispatchDeleteFunctionSecretSlot(req) + case "WebAppsClient.DeleteHostNameBinding": + resp, err = w.dispatchDeleteHostNameBinding(req) + case "WebAppsClient.DeleteHostNameBindingSlot": + resp, err = w.dispatchDeleteHostNameBindingSlot(req) + case "WebAppsClient.DeleteHostSecret": + resp, err = w.dispatchDeleteHostSecret(req) + case "WebAppsClient.DeleteHostSecretSlot": + resp, err = w.dispatchDeleteHostSecretSlot(req) + case "WebAppsClient.DeleteHybridConnection": + resp, err = w.dispatchDeleteHybridConnection(req) + case "WebAppsClient.DeleteHybridConnectionSlot": + resp, err = w.dispatchDeleteHybridConnectionSlot(req) + case "WebAppsClient.DeleteInstanceFunctionSlot": + resp, err = w.dispatchDeleteInstanceFunctionSlot(req) + case "WebAppsClient.DeleteInstanceProcess": + resp, err = w.dispatchDeleteInstanceProcess(req) + case "WebAppsClient.DeleteInstanceProcessSlot": + resp, err = w.dispatchDeleteInstanceProcessSlot(req) + case "WebAppsClient.DeletePremierAddOn": + resp, err = w.dispatchDeletePremierAddOn(req) + case "WebAppsClient.DeletePremierAddOnSlot": + resp, err = w.dispatchDeletePremierAddOnSlot(req) + case "WebAppsClient.BeginDeletePrivateEndpointConnection": + resp, err = w.dispatchBeginDeletePrivateEndpointConnection(req) + case "WebAppsClient.BeginDeletePrivateEndpointConnectionSlot": + resp, err = w.dispatchBeginDeletePrivateEndpointConnectionSlot(req) + case "WebAppsClient.DeleteProcess": + resp, err = w.dispatchDeleteProcess(req) + case "WebAppsClient.DeleteProcessSlot": + resp, err = w.dispatchDeleteProcessSlot(req) + case "WebAppsClient.DeletePublicCertificate": + resp, err = w.dispatchDeletePublicCertificate(req) + case "WebAppsClient.DeletePublicCertificateSlot": + resp, err = w.dispatchDeletePublicCertificateSlot(req) + case "WebAppsClient.DeleteRelayServiceConnection": + resp, err = w.dispatchDeleteRelayServiceConnection(req) + case "WebAppsClient.DeleteRelayServiceConnectionSlot": + resp, err = w.dispatchDeleteRelayServiceConnectionSlot(req) + case "WebAppsClient.DeleteSiteExtension": + resp, err = w.dispatchDeleteSiteExtension(req) + case "WebAppsClient.DeleteSiteExtensionSlot": + resp, err = w.dispatchDeleteSiteExtensionSlot(req) + case "WebAppsClient.DeleteSlot": + resp, err = w.dispatchDeleteSlot(req) + case "WebAppsClient.DeleteSourceControl": + resp, err = w.dispatchDeleteSourceControl(req) + case "WebAppsClient.DeleteSourceControlSlot": + resp, err = w.dispatchDeleteSourceControlSlot(req) + case "WebAppsClient.DeleteSwiftVirtualNetwork": + resp, err = w.dispatchDeleteSwiftVirtualNetwork(req) + case "WebAppsClient.DeleteSwiftVirtualNetworkSlot": + resp, err = w.dispatchDeleteSwiftVirtualNetworkSlot(req) + case "WebAppsClient.DeleteTriggeredWebJob": + resp, err = w.dispatchDeleteTriggeredWebJob(req) + case "WebAppsClient.DeleteTriggeredWebJobSlot": + resp, err = w.dispatchDeleteTriggeredWebJobSlot(req) + case "WebAppsClient.DeleteVnetConnection": + resp, err = w.dispatchDeleteVnetConnection(req) + case "WebAppsClient.DeleteVnetConnectionSlot": + resp, err = w.dispatchDeleteVnetConnectionSlot(req) + case "WebAppsClient.DeployWorkflowArtifacts": + resp, err = w.dispatchDeployWorkflowArtifacts(req) + case "WebAppsClient.DeployWorkflowArtifactsSlot": + resp, err = w.dispatchDeployWorkflowArtifactsSlot(req) + case "WebAppsClient.DiscoverBackup": + resp, err = w.dispatchDiscoverBackup(req) + case "WebAppsClient.DiscoverBackupSlot": + resp, err = w.dispatchDiscoverBackupSlot(req) + case "WebAppsClient.GenerateNewSitePublishingPassword": + resp, err = w.dispatchGenerateNewSitePublishingPassword(req) + case "WebAppsClient.GenerateNewSitePublishingPasswordSlot": + resp, err = w.dispatchGenerateNewSitePublishingPasswordSlot(req) + case "WebAppsClient.Get": + resp, err = w.dispatchGet(req) + case "WebAppsClient.GetAppSettingKeyVaultReference": + resp, err = w.dispatchGetAppSettingKeyVaultReference(req) + case "WebAppsClient.GetAppSettingKeyVaultReferenceSlot": + resp, err = w.dispatchGetAppSettingKeyVaultReferenceSlot(req) + case "WebAppsClient.NewGetAppSettingsKeyVaultReferencesPager": + resp, err = w.dispatchNewGetAppSettingsKeyVaultReferencesPager(req) + case "WebAppsClient.NewGetAppSettingsKeyVaultReferencesSlotPager": + resp, err = w.dispatchNewGetAppSettingsKeyVaultReferencesSlotPager(req) + case "WebAppsClient.GetAuthSettings": + resp, err = w.dispatchGetAuthSettings(req) + case "WebAppsClient.GetAuthSettingsSlot": + resp, err = w.dispatchGetAuthSettingsSlot(req) + case "WebAppsClient.GetAuthSettingsV2": + resp, err = w.dispatchGetAuthSettingsV2(req) + case "WebAppsClient.GetAuthSettingsV2Slot": + resp, err = w.dispatchGetAuthSettingsV2Slot(req) + case "WebAppsClient.GetAuthSettingsV2WithoutSecrets": + resp, err = w.dispatchGetAuthSettingsV2WithoutSecrets(req) + case "WebAppsClient.GetAuthSettingsV2WithoutSecretsSlot": + resp, err = w.dispatchGetAuthSettingsV2WithoutSecretsSlot(req) + case "WebAppsClient.GetBackupConfiguration": + resp, err = w.dispatchGetBackupConfiguration(req) + case "WebAppsClient.GetBackupConfigurationSlot": + resp, err = w.dispatchGetBackupConfigurationSlot(req) + case "WebAppsClient.GetBackupStatus": + resp, err = w.dispatchGetBackupStatus(req) + case "WebAppsClient.GetBackupStatusSlot": + resp, err = w.dispatchGetBackupStatusSlot(req) + case "WebAppsClient.GetConfiguration": + resp, err = w.dispatchGetConfiguration(req) + case "WebAppsClient.GetConfigurationSlot": + resp, err = w.dispatchGetConfigurationSlot(req) + case "WebAppsClient.GetConfigurationSnapshot": + resp, err = w.dispatchGetConfigurationSnapshot(req) + case "WebAppsClient.GetConfigurationSnapshotSlot": + resp, err = w.dispatchGetConfigurationSnapshotSlot(req) + case "WebAppsClient.GetContainerLogsZip": + resp, err = w.dispatchGetContainerLogsZip(req) + case "WebAppsClient.GetContainerLogsZipSlot": + resp, err = w.dispatchGetContainerLogsZipSlot(req) + case "WebAppsClient.GetContinuousWebJob": + resp, err = w.dispatchGetContinuousWebJob(req) + case "WebAppsClient.GetContinuousWebJobSlot": + resp, err = w.dispatchGetContinuousWebJobSlot(req) + case "WebAppsClient.GetDeployment": + resp, err = w.dispatchGetDeployment(req) + case "WebAppsClient.GetDeploymentSlot": + resp, err = w.dispatchGetDeploymentSlot(req) + case "WebAppsClient.GetDiagnosticLogsConfiguration": + resp, err = w.dispatchGetDiagnosticLogsConfiguration(req) + case "WebAppsClient.GetDiagnosticLogsConfigurationSlot": + resp, err = w.dispatchGetDiagnosticLogsConfigurationSlot(req) + case "WebAppsClient.GetDomainOwnershipIdentifier": + resp, err = w.dispatchGetDomainOwnershipIdentifier(req) + case "WebAppsClient.GetDomainOwnershipIdentifierSlot": + resp, err = w.dispatchGetDomainOwnershipIdentifierSlot(req) + case "WebAppsClient.GetFtpAllowed": + resp, err = w.dispatchGetFtpAllowed(req) + case "WebAppsClient.GetFtpAllowedSlot": + resp, err = w.dispatchGetFtpAllowedSlot(req) + case "WebAppsClient.GetFunction": + resp, err = w.dispatchGetFunction(req) + case "WebAppsClient.GetFunctionsAdminToken": + resp, err = w.dispatchGetFunctionsAdminToken(req) + case "WebAppsClient.GetFunctionsAdminTokenSlot": + resp, err = w.dispatchGetFunctionsAdminTokenSlot(req) + case "WebAppsClient.GetHostNameBinding": + resp, err = w.dispatchGetHostNameBinding(req) + case "WebAppsClient.GetHostNameBindingSlot": + resp, err = w.dispatchGetHostNameBindingSlot(req) + case "WebAppsClient.GetHybridConnection": + resp, err = w.dispatchGetHybridConnection(req) + case "WebAppsClient.GetHybridConnectionSlot": + resp, err = w.dispatchGetHybridConnectionSlot(req) + case "WebAppsClient.GetInstanceFunctionSlot": + resp, err = w.dispatchGetInstanceFunctionSlot(req) + case "WebAppsClient.GetInstanceInfo": + resp, err = w.dispatchGetInstanceInfo(req) + case "WebAppsClient.GetInstanceInfoSlot": + resp, err = w.dispatchGetInstanceInfoSlot(req) + case "WebAppsClient.GetInstanceMSDeployLog": + resp, err = w.dispatchGetInstanceMSDeployLog(req) + case "WebAppsClient.GetInstanceMSDeployLogSlot": + resp, err = w.dispatchGetInstanceMSDeployLogSlot(req) + case "WebAppsClient.GetInstanceMsDeployStatus": + resp, err = w.dispatchGetInstanceMsDeployStatus(req) + case "WebAppsClient.GetInstanceMsDeployStatusSlot": + resp, err = w.dispatchGetInstanceMsDeployStatusSlot(req) + case "WebAppsClient.GetInstanceProcess": + resp, err = w.dispatchGetInstanceProcess(req) + case "WebAppsClient.GetInstanceProcessDump": + resp, err = w.dispatchGetInstanceProcessDump(req) + case "WebAppsClient.GetInstanceProcessDumpSlot": + resp, err = w.dispatchGetInstanceProcessDumpSlot(req) + case "WebAppsClient.GetInstanceProcessModule": + resp, err = w.dispatchGetInstanceProcessModule(req) + case "WebAppsClient.GetInstanceProcessModuleSlot": + resp, err = w.dispatchGetInstanceProcessModuleSlot(req) + case "WebAppsClient.GetInstanceProcessSlot": + resp, err = w.dispatchGetInstanceProcessSlot(req) + case "WebAppsClient.GetInstanceWorkflowSlot": + resp, err = w.dispatchGetInstanceWorkflowSlot(req) + case "WebAppsClient.GetMSDeployLog": + resp, err = w.dispatchGetMSDeployLog(req) + case "WebAppsClient.GetMSDeployLogSlot": + resp, err = w.dispatchGetMSDeployLogSlot(req) + case "WebAppsClient.GetMSDeployStatus": + resp, err = w.dispatchGetMSDeployStatus(req) + case "WebAppsClient.GetMSDeployStatusSlot": + resp, err = w.dispatchGetMSDeployStatusSlot(req) + case "WebAppsClient.GetMigrateMySQLStatus": + resp, err = w.dispatchGetMigrateMySQLStatus(req) + case "WebAppsClient.GetMigrateMySQLStatusSlot": + resp, err = w.dispatchGetMigrateMySQLStatusSlot(req) + case "WebAppsClient.GetNetworkTraceOperation": + resp, err = w.dispatchGetNetworkTraceOperation(req) + case "WebAppsClient.GetNetworkTraceOperationSlot": + resp, err = w.dispatchGetNetworkTraceOperationSlot(req) + case "WebAppsClient.GetNetworkTraceOperationSlotV2": + resp, err = w.dispatchGetNetworkTraceOperationSlotV2(req) + case "WebAppsClient.GetNetworkTraceOperationV2": + resp, err = w.dispatchGetNetworkTraceOperationV2(req) + case "WebAppsClient.GetNetworkTraces": + resp, err = w.dispatchGetNetworkTraces(req) + case "WebAppsClient.GetNetworkTracesSlot": + resp, err = w.dispatchGetNetworkTracesSlot(req) + case "WebAppsClient.GetNetworkTracesSlotV2": + resp, err = w.dispatchGetNetworkTracesSlotV2(req) + case "WebAppsClient.GetNetworkTracesV2": + resp, err = w.dispatchGetNetworkTracesV2(req) + case "WebAppsClient.GetOneDeployStatus": + resp, err = w.dispatchGetOneDeployStatus(req) + case "WebAppsClient.GetPremierAddOn": + resp, err = w.dispatchGetPremierAddOn(req) + case "WebAppsClient.GetPremierAddOnSlot": + resp, err = w.dispatchGetPremierAddOnSlot(req) + case "WebAppsClient.GetPrivateAccess": + resp, err = w.dispatchGetPrivateAccess(req) + case "WebAppsClient.GetPrivateAccessSlot": + resp, err = w.dispatchGetPrivateAccessSlot(req) + case "WebAppsClient.GetPrivateEndpointConnection": + resp, err = w.dispatchGetPrivateEndpointConnection(req) + case "WebAppsClient.NewGetPrivateEndpointConnectionListPager": + resp, err = w.dispatchNewGetPrivateEndpointConnectionListPager(req) + case "WebAppsClient.NewGetPrivateEndpointConnectionListSlotPager": + resp, err = w.dispatchNewGetPrivateEndpointConnectionListSlotPager(req) + case "WebAppsClient.GetPrivateEndpointConnectionSlot": + resp, err = w.dispatchGetPrivateEndpointConnectionSlot(req) + case "WebAppsClient.GetPrivateLinkResources": + resp, err = w.dispatchGetPrivateLinkResources(req) + case "WebAppsClient.GetPrivateLinkResourcesSlot": + resp, err = w.dispatchGetPrivateLinkResourcesSlot(req) + case "WebAppsClient.GetProcess": + resp, err = w.dispatchGetProcess(req) + case "WebAppsClient.GetProcessDump": + resp, err = w.dispatchGetProcessDump(req) + case "WebAppsClient.GetProcessDumpSlot": + resp, err = w.dispatchGetProcessDumpSlot(req) + case "WebAppsClient.GetProcessModule": + resp, err = w.dispatchGetProcessModule(req) + case "WebAppsClient.GetProcessModuleSlot": + resp, err = w.dispatchGetProcessModuleSlot(req) + case "WebAppsClient.GetProcessSlot": + resp, err = w.dispatchGetProcessSlot(req) + case "WebAppsClient.BeginGetProductionSiteDeploymentStatus": + resp, err = w.dispatchBeginGetProductionSiteDeploymentStatus(req) + case "WebAppsClient.GetPublicCertificate": + resp, err = w.dispatchGetPublicCertificate(req) + case "WebAppsClient.GetPublicCertificateSlot": + resp, err = w.dispatchGetPublicCertificateSlot(req) + case "WebAppsClient.GetRelayServiceConnection": + resp, err = w.dispatchGetRelayServiceConnection(req) + case "WebAppsClient.GetRelayServiceConnectionSlot": + resp, err = w.dispatchGetRelayServiceConnectionSlot(req) + case "WebAppsClient.GetScmAllowed": + resp, err = w.dispatchGetScmAllowed(req) + case "WebAppsClient.GetScmAllowedSlot": + resp, err = w.dispatchGetScmAllowedSlot(req) + case "WebAppsClient.GetSiteConnectionStringKeyVaultReference": + resp, err = w.dispatchGetSiteConnectionStringKeyVaultReference(req) + case "WebAppsClient.GetSiteConnectionStringKeyVaultReferenceSlot": + resp, err = w.dispatchGetSiteConnectionStringKeyVaultReferenceSlot(req) + case "WebAppsClient.NewGetSiteConnectionStringKeyVaultReferencesPager": + resp, err = w.dispatchNewGetSiteConnectionStringKeyVaultReferencesPager(req) + case "WebAppsClient.NewGetSiteConnectionStringKeyVaultReferencesSlotPager": + resp, err = w.dispatchNewGetSiteConnectionStringKeyVaultReferencesSlotPager(req) + case "WebAppsClient.GetSiteExtension": + resp, err = w.dispatchGetSiteExtension(req) + case "WebAppsClient.GetSiteExtensionSlot": + resp, err = w.dispatchGetSiteExtensionSlot(req) + case "WebAppsClient.GetSitePhpErrorLogFlag": + resp, err = w.dispatchGetSitePhpErrorLogFlag(req) + case "WebAppsClient.GetSitePhpErrorLogFlagSlot": + resp, err = w.dispatchGetSitePhpErrorLogFlagSlot(req) + case "WebAppsClient.GetSlot": + resp, err = w.dispatchGetSlot(req) + case "WebAppsClient.BeginGetSlotSiteDeploymentStatusSlot": + resp, err = w.dispatchBeginGetSlotSiteDeploymentStatusSlot(req) + case "WebAppsClient.GetSourceControl": + resp, err = w.dispatchGetSourceControl(req) + case "WebAppsClient.GetSourceControlSlot": + resp, err = w.dispatchGetSourceControlSlot(req) + case "WebAppsClient.GetSwiftVirtualNetworkConnection": + resp, err = w.dispatchGetSwiftVirtualNetworkConnection(req) + case "WebAppsClient.GetSwiftVirtualNetworkConnectionSlot": + resp, err = w.dispatchGetSwiftVirtualNetworkConnectionSlot(req) + case "WebAppsClient.GetTriggeredWebJob": + resp, err = w.dispatchGetTriggeredWebJob(req) + case "WebAppsClient.GetTriggeredWebJobHistory": + resp, err = w.dispatchGetTriggeredWebJobHistory(req) + case "WebAppsClient.GetTriggeredWebJobHistorySlot": + resp, err = w.dispatchGetTriggeredWebJobHistorySlot(req) + case "WebAppsClient.GetTriggeredWebJobSlot": + resp, err = w.dispatchGetTriggeredWebJobSlot(req) + case "WebAppsClient.GetVnetConnection": + resp, err = w.dispatchGetVnetConnection(req) + case "WebAppsClient.GetVnetConnectionGateway": + resp, err = w.dispatchGetVnetConnectionGateway(req) + case "WebAppsClient.GetVnetConnectionGatewaySlot": + resp, err = w.dispatchGetVnetConnectionGatewaySlot(req) + case "WebAppsClient.GetVnetConnectionSlot": + resp, err = w.dispatchGetVnetConnectionSlot(req) + case "WebAppsClient.GetWebJob": + resp, err = w.dispatchGetWebJob(req) + case "WebAppsClient.GetWebJobSlot": + resp, err = w.dispatchGetWebJobSlot(req) + case "WebAppsClient.GetWebSiteContainerLogs": + resp, err = w.dispatchGetWebSiteContainerLogs(req) + case "WebAppsClient.GetWebSiteContainerLogsSlot": + resp, err = w.dispatchGetWebSiteContainerLogsSlot(req) + case "WebAppsClient.GetWorkflow": + resp, err = w.dispatchGetWorkflow(req) + case "WebAppsClient.BeginInstallSiteExtension": + resp, err = w.dispatchBeginInstallSiteExtension(req) + case "WebAppsClient.BeginInstallSiteExtensionSlot": + resp, err = w.dispatchBeginInstallSiteExtensionSlot(req) + case "WebAppsClient.IsCloneable": + resp, err = w.dispatchIsCloneable(req) + case "WebAppsClient.IsCloneableSlot": + resp, err = w.dispatchIsCloneableSlot(req) + case "WebAppsClient.NewListPager": + resp, err = w.dispatchNewListPager(req) + case "WebAppsClient.ListApplicationSettings": + resp, err = w.dispatchListApplicationSettings(req) + case "WebAppsClient.ListApplicationSettingsSlot": + resp, err = w.dispatchListApplicationSettingsSlot(req) + case "WebAppsClient.ListAzureStorageAccounts": + resp, err = w.dispatchListAzureStorageAccounts(req) + case "WebAppsClient.ListAzureStorageAccountsSlot": + resp, err = w.dispatchListAzureStorageAccountsSlot(req) + case "WebAppsClient.ListBackupStatusSecrets": + resp, err = w.dispatchListBackupStatusSecrets(req) + case "WebAppsClient.ListBackupStatusSecretsSlot": + resp, err = w.dispatchListBackupStatusSecretsSlot(req) + case "WebAppsClient.NewListBackupsPager": + resp, err = w.dispatchNewListBackupsPager(req) + case "WebAppsClient.NewListBackupsSlotPager": + resp, err = w.dispatchNewListBackupsSlotPager(req) + case "WebAppsClient.NewListBasicPublishingCredentialsPoliciesPager": + resp, err = w.dispatchNewListBasicPublishingCredentialsPoliciesPager(req) + case "WebAppsClient.NewListBasicPublishingCredentialsPoliciesSlotPager": + resp, err = w.dispatchNewListBasicPublishingCredentialsPoliciesSlotPager(req) + case "WebAppsClient.NewListByResourceGroupPager": + resp, err = w.dispatchNewListByResourceGroupPager(req) + case "WebAppsClient.NewListConfigurationSnapshotInfoPager": + resp, err = w.dispatchNewListConfigurationSnapshotInfoPager(req) + case "WebAppsClient.NewListConfigurationSnapshotInfoSlotPager": + resp, err = w.dispatchNewListConfigurationSnapshotInfoSlotPager(req) + case "WebAppsClient.NewListConfigurationsPager": + resp, err = w.dispatchNewListConfigurationsPager(req) + case "WebAppsClient.NewListConfigurationsSlotPager": + resp, err = w.dispatchNewListConfigurationsSlotPager(req) + case "WebAppsClient.ListConnectionStrings": + resp, err = w.dispatchListConnectionStrings(req) + case "WebAppsClient.ListConnectionStringsSlot": + resp, err = w.dispatchListConnectionStringsSlot(req) + case "WebAppsClient.NewListContinuousWebJobsPager": + resp, err = w.dispatchNewListContinuousWebJobsPager(req) + case "WebAppsClient.NewListContinuousWebJobsSlotPager": + resp, err = w.dispatchNewListContinuousWebJobsSlotPager(req) + case "WebAppsClient.ListDeploymentLog": + resp, err = w.dispatchListDeploymentLog(req) + case "WebAppsClient.ListDeploymentLogSlot": + resp, err = w.dispatchListDeploymentLogSlot(req) + case "WebAppsClient.NewListDeploymentsPager": + resp, err = w.dispatchNewListDeploymentsPager(req) + case "WebAppsClient.NewListDeploymentsSlotPager": + resp, err = w.dispatchNewListDeploymentsSlotPager(req) + case "WebAppsClient.NewListDomainOwnershipIdentifiersPager": + resp, err = w.dispatchNewListDomainOwnershipIdentifiersPager(req) + case "WebAppsClient.NewListDomainOwnershipIdentifiersSlotPager": + resp, err = w.dispatchNewListDomainOwnershipIdentifiersSlotPager(req) + case "WebAppsClient.ListFunctionKeys": + resp, err = w.dispatchListFunctionKeys(req) + case "WebAppsClient.ListFunctionKeysSlot": + resp, err = w.dispatchListFunctionKeysSlot(req) + case "WebAppsClient.ListFunctionSecrets": + resp, err = w.dispatchListFunctionSecrets(req) + case "WebAppsClient.ListFunctionSecretsSlot": + resp, err = w.dispatchListFunctionSecretsSlot(req) + case "WebAppsClient.NewListFunctionsPager": + resp, err = w.dispatchNewListFunctionsPager(req) + case "WebAppsClient.ListHostKeys": + resp, err = w.dispatchListHostKeys(req) + case "WebAppsClient.ListHostKeysSlot": + resp, err = w.dispatchListHostKeysSlot(req) + case "WebAppsClient.NewListHostNameBindingsPager": + resp, err = w.dispatchNewListHostNameBindingsPager(req) + case "WebAppsClient.NewListHostNameBindingsSlotPager": + resp, err = w.dispatchNewListHostNameBindingsSlotPager(req) + case "WebAppsClient.ListHybridConnections": + resp, err = w.dispatchListHybridConnections(req) + case "WebAppsClient.ListHybridConnectionsSlot": + resp, err = w.dispatchListHybridConnectionsSlot(req) + case "WebAppsClient.NewListInstanceFunctionsSlotPager": + resp, err = w.dispatchNewListInstanceFunctionsSlotPager(req) + case "WebAppsClient.NewListInstanceIdentifiersPager": + resp, err = w.dispatchNewListInstanceIdentifiersPager(req) + case "WebAppsClient.NewListInstanceIdentifiersSlotPager": + resp, err = w.dispatchNewListInstanceIdentifiersSlotPager(req) + case "WebAppsClient.NewListInstanceProcessModulesPager": + resp, err = w.dispatchNewListInstanceProcessModulesPager(req) + case "WebAppsClient.NewListInstanceProcessModulesSlotPager": + resp, err = w.dispatchNewListInstanceProcessModulesSlotPager(req) + case "WebAppsClient.NewListInstanceProcessThreadsPager": + resp, err = w.dispatchNewListInstanceProcessThreadsPager(req) + case "WebAppsClient.NewListInstanceProcessThreadsSlotPager": + resp, err = w.dispatchNewListInstanceProcessThreadsSlotPager(req) + case "WebAppsClient.NewListInstanceProcessesPager": + resp, err = w.dispatchNewListInstanceProcessesPager(req) + case "WebAppsClient.NewListInstanceProcessesSlotPager": + resp, err = w.dispatchNewListInstanceProcessesSlotPager(req) + case "WebAppsClient.NewListInstanceWorkflowsSlotPager": + resp, err = w.dispatchNewListInstanceWorkflowsSlotPager(req) + case "WebAppsClient.ListMetadata": + resp, err = w.dispatchListMetadata(req) + case "WebAppsClient.ListMetadataSlot": + resp, err = w.dispatchListMetadataSlot(req) + case "WebAppsClient.ListNetworkFeatures": + resp, err = w.dispatchListNetworkFeatures(req) + case "WebAppsClient.ListNetworkFeaturesSlot": + resp, err = w.dispatchListNetworkFeaturesSlot(req) + case "WebAppsClient.NewListPerfMonCountersPager": + resp, err = w.dispatchNewListPerfMonCountersPager(req) + case "WebAppsClient.NewListPerfMonCountersSlotPager": + resp, err = w.dispatchNewListPerfMonCountersSlotPager(req) + case "WebAppsClient.ListPremierAddOns": + resp, err = w.dispatchListPremierAddOns(req) + case "WebAppsClient.ListPremierAddOnsSlot": + resp, err = w.dispatchListPremierAddOnsSlot(req) + case "WebAppsClient.NewListProcessModulesPager": + resp, err = w.dispatchNewListProcessModulesPager(req) + case "WebAppsClient.NewListProcessModulesSlotPager": + resp, err = w.dispatchNewListProcessModulesSlotPager(req) + case "WebAppsClient.NewListProcessThreadsPager": + resp, err = w.dispatchNewListProcessThreadsPager(req) + case "WebAppsClient.NewListProcessThreadsSlotPager": + resp, err = w.dispatchNewListProcessThreadsSlotPager(req) + case "WebAppsClient.NewListProcessesPager": + resp, err = w.dispatchNewListProcessesPager(req) + case "WebAppsClient.NewListProcessesSlotPager": + resp, err = w.dispatchNewListProcessesSlotPager(req) + case "WebAppsClient.NewListProductionSiteDeploymentStatusesPager": + resp, err = w.dispatchNewListProductionSiteDeploymentStatusesPager(req) + case "WebAppsClient.NewListPublicCertificatesPager": + resp, err = w.dispatchNewListPublicCertificatesPager(req) + case "WebAppsClient.NewListPublicCertificatesSlotPager": + resp, err = w.dispatchNewListPublicCertificatesSlotPager(req) + case "WebAppsClient.BeginListPublishingCredentials": + resp, err = w.dispatchBeginListPublishingCredentials(req) + case "WebAppsClient.BeginListPublishingCredentialsSlot": + resp, err = w.dispatchBeginListPublishingCredentialsSlot(req) + case "WebAppsClient.ListPublishingProfileXMLWithSecrets": + resp, err = w.dispatchListPublishingProfileXMLWithSecrets(req) + case "WebAppsClient.ListPublishingProfileXMLWithSecretsSlot": + resp, err = w.dispatchListPublishingProfileXMLWithSecretsSlot(req) + case "WebAppsClient.ListRelayServiceConnections": + resp, err = w.dispatchListRelayServiceConnections(req) + case "WebAppsClient.ListRelayServiceConnectionsSlot": + resp, err = w.dispatchListRelayServiceConnectionsSlot(req) + case "WebAppsClient.NewListSiteBackupsPager": + resp, err = w.dispatchNewListSiteBackupsPager(req) + case "WebAppsClient.NewListSiteBackupsSlotPager": + resp, err = w.dispatchNewListSiteBackupsSlotPager(req) + case "WebAppsClient.NewListSiteExtensionsPager": + resp, err = w.dispatchNewListSiteExtensionsPager(req) + case "WebAppsClient.NewListSiteExtensionsSlotPager": + resp, err = w.dispatchNewListSiteExtensionsSlotPager(req) + case "WebAppsClient.ListSitePushSettings": + resp, err = w.dispatchListSitePushSettings(req) + case "WebAppsClient.ListSitePushSettingsSlot": + resp, err = w.dispatchListSitePushSettingsSlot(req) + case "WebAppsClient.ListSlotConfigurationNames": + resp, err = w.dispatchListSlotConfigurationNames(req) + case "WebAppsClient.NewListSlotDifferencesFromProductionPager": + resp, err = w.dispatchNewListSlotDifferencesFromProductionPager(req) + case "WebAppsClient.NewListSlotDifferencesSlotPager": + resp, err = w.dispatchNewListSlotDifferencesSlotPager(req) + case "WebAppsClient.NewListSlotSiteDeploymentStatusesSlotPager": + resp, err = w.dispatchNewListSlotSiteDeploymentStatusesSlotPager(req) + case "WebAppsClient.NewListSlotsPager": + resp, err = w.dispatchNewListSlotsPager(req) + case "WebAppsClient.NewListSnapshotsPager": + resp, err = w.dispatchNewListSnapshotsPager(req) + case "WebAppsClient.NewListSnapshotsFromDRSecondaryPager": + resp, err = w.dispatchNewListSnapshotsFromDRSecondaryPager(req) + case "WebAppsClient.NewListSnapshotsFromDRSecondarySlotPager": + resp, err = w.dispatchNewListSnapshotsFromDRSecondarySlotPager(req) + case "WebAppsClient.NewListSnapshotsSlotPager": + resp, err = w.dispatchNewListSnapshotsSlotPager(req) + case "WebAppsClient.ListSyncFunctionTriggers": + resp, err = w.dispatchListSyncFunctionTriggers(req) + case "WebAppsClient.ListSyncFunctionTriggersSlot": + resp, err = w.dispatchListSyncFunctionTriggersSlot(req) + case "WebAppsClient.ListSyncStatus": + resp, err = w.dispatchListSyncStatus(req) + case "WebAppsClient.ListSyncStatusSlot": + resp, err = w.dispatchListSyncStatusSlot(req) + case "WebAppsClient.NewListTriggeredWebJobHistoryPager": + resp, err = w.dispatchNewListTriggeredWebJobHistoryPager(req) + case "WebAppsClient.NewListTriggeredWebJobHistorySlotPager": + resp, err = w.dispatchNewListTriggeredWebJobHistorySlotPager(req) + case "WebAppsClient.NewListTriggeredWebJobsPager": + resp, err = w.dispatchNewListTriggeredWebJobsPager(req) + case "WebAppsClient.NewListTriggeredWebJobsSlotPager": + resp, err = w.dispatchNewListTriggeredWebJobsSlotPager(req) + case "WebAppsClient.NewListUsagesPager": + resp, err = w.dispatchNewListUsagesPager(req) + case "WebAppsClient.NewListUsagesSlotPager": + resp, err = w.dispatchNewListUsagesSlotPager(req) + case "WebAppsClient.ListVnetConnections": + resp, err = w.dispatchListVnetConnections(req) + case "WebAppsClient.ListVnetConnectionsSlot": + resp, err = w.dispatchListVnetConnectionsSlot(req) + case "WebAppsClient.NewListWebJobsPager": + resp, err = w.dispatchNewListWebJobsPager(req) + case "WebAppsClient.NewListWebJobsSlotPager": + resp, err = w.dispatchNewListWebJobsSlotPager(req) + case "WebAppsClient.NewListWorkflowsPager": + resp, err = w.dispatchNewListWorkflowsPager(req) + case "WebAppsClient.ListWorkflowsConnections": + resp, err = w.dispatchListWorkflowsConnections(req) + case "WebAppsClient.ListWorkflowsConnectionsSlot": + resp, err = w.dispatchListWorkflowsConnectionsSlot(req) + case "WebAppsClient.BeginMigrateMySQL": + resp, err = w.dispatchBeginMigrateMySQL(req) + case "WebAppsClient.BeginMigrateStorage": + resp, err = w.dispatchBeginMigrateStorage(req) + case "WebAppsClient.PutPrivateAccessVnet": + resp, err = w.dispatchPutPrivateAccessVnet(req) + case "WebAppsClient.PutPrivateAccessVnetSlot": + resp, err = w.dispatchPutPrivateAccessVnetSlot(req) + case "WebAppsClient.RecoverSiteConfigurationSnapshot": + resp, err = w.dispatchRecoverSiteConfigurationSnapshot(req) + case "WebAppsClient.RecoverSiteConfigurationSnapshotSlot": + resp, err = w.dispatchRecoverSiteConfigurationSnapshotSlot(req) + case "WebAppsClient.ResetProductionSlotConfig": + resp, err = w.dispatchResetProductionSlotConfig(req) + case "WebAppsClient.ResetSlotConfigurationSlot": + resp, err = w.dispatchResetSlotConfigurationSlot(req) + case "WebAppsClient.Restart": + resp, err = w.dispatchRestart(req) + case "WebAppsClient.RestartSlot": + resp, err = w.dispatchRestartSlot(req) + case "WebAppsClient.BeginRestore": + resp, err = w.dispatchBeginRestore(req) + case "WebAppsClient.BeginRestoreFromBackupBlob": + resp, err = w.dispatchBeginRestoreFromBackupBlob(req) + case "WebAppsClient.BeginRestoreFromBackupBlobSlot": + resp, err = w.dispatchBeginRestoreFromBackupBlobSlot(req) + case "WebAppsClient.BeginRestoreFromDeletedApp": + resp, err = w.dispatchBeginRestoreFromDeletedApp(req) + case "WebAppsClient.BeginRestoreFromDeletedAppSlot": + resp, err = w.dispatchBeginRestoreFromDeletedAppSlot(req) + case "WebAppsClient.BeginRestoreSlot": + resp, err = w.dispatchBeginRestoreSlot(req) + case "WebAppsClient.BeginRestoreSnapshot": + resp, err = w.dispatchBeginRestoreSnapshot(req) + case "WebAppsClient.BeginRestoreSnapshotSlot": + resp, err = w.dispatchBeginRestoreSnapshotSlot(req) + case "WebAppsClient.RunTriggeredWebJob": + resp, err = w.dispatchRunTriggeredWebJob(req) + case "WebAppsClient.RunTriggeredWebJobSlot": + resp, err = w.dispatchRunTriggeredWebJobSlot(req) + case "WebAppsClient.Start": + resp, err = w.dispatchStart(req) + case "WebAppsClient.StartContinuousWebJob": + resp, err = w.dispatchStartContinuousWebJob(req) + case "WebAppsClient.StartContinuousWebJobSlot": + resp, err = w.dispatchStartContinuousWebJobSlot(req) + case "WebAppsClient.BeginStartNetworkTrace": + resp, err = w.dispatchBeginStartNetworkTrace(req) + case "WebAppsClient.BeginStartNetworkTraceSlot": + resp, err = w.dispatchBeginStartNetworkTraceSlot(req) + case "WebAppsClient.StartSlot": + resp, err = w.dispatchStartSlot(req) + case "WebAppsClient.StartWebSiteNetworkTrace": + resp, err = w.dispatchStartWebSiteNetworkTrace(req) + case "WebAppsClient.BeginStartWebSiteNetworkTraceOperation": + resp, err = w.dispatchBeginStartWebSiteNetworkTraceOperation(req) + case "WebAppsClient.BeginStartWebSiteNetworkTraceOperationSlot": + resp, err = w.dispatchBeginStartWebSiteNetworkTraceOperationSlot(req) + case "WebAppsClient.StartWebSiteNetworkTraceSlot": + resp, err = w.dispatchStartWebSiteNetworkTraceSlot(req) + case "WebAppsClient.Stop": + resp, err = w.dispatchStop(req) + case "WebAppsClient.StopContinuousWebJob": + resp, err = w.dispatchStopContinuousWebJob(req) + case "WebAppsClient.StopContinuousWebJobSlot": + resp, err = w.dispatchStopContinuousWebJobSlot(req) + case "WebAppsClient.StopNetworkTrace": + resp, err = w.dispatchStopNetworkTrace(req) + case "WebAppsClient.StopNetworkTraceSlot": + resp, err = w.dispatchStopNetworkTraceSlot(req) + case "WebAppsClient.StopSlot": + resp, err = w.dispatchStopSlot(req) + case "WebAppsClient.StopWebSiteNetworkTrace": + resp, err = w.dispatchStopWebSiteNetworkTrace(req) + case "WebAppsClient.StopWebSiteNetworkTraceSlot": + resp, err = w.dispatchStopWebSiteNetworkTraceSlot(req) + case "WebAppsClient.BeginSwapSlot": + resp, err = w.dispatchBeginSwapSlot(req) + case "WebAppsClient.BeginSwapSlotWithProduction": + resp, err = w.dispatchBeginSwapSlotWithProduction(req) + case "WebAppsClient.SyncFunctionTriggers": + resp, err = w.dispatchSyncFunctionTriggers(req) + case "WebAppsClient.SyncFunctionTriggersSlot": + resp, err = w.dispatchSyncFunctionTriggersSlot(req) + case "WebAppsClient.SyncFunctions": + resp, err = w.dispatchSyncFunctions(req) + case "WebAppsClient.SyncFunctionsSlot": + resp, err = w.dispatchSyncFunctionsSlot(req) + case "WebAppsClient.SyncRepository": + resp, err = w.dispatchSyncRepository(req) + case "WebAppsClient.SyncRepositorySlot": + resp, err = w.dispatchSyncRepositorySlot(req) + case "WebAppsClient.Update": + resp, err = w.dispatchUpdate(req) + case "WebAppsClient.UpdateApplicationSettings": + resp, err = w.dispatchUpdateApplicationSettings(req) + case "WebAppsClient.UpdateApplicationSettingsSlot": + resp, err = w.dispatchUpdateApplicationSettingsSlot(req) + case "WebAppsClient.UpdateAuthSettings": + resp, err = w.dispatchUpdateAuthSettings(req) + case "WebAppsClient.UpdateAuthSettingsSlot": + resp, err = w.dispatchUpdateAuthSettingsSlot(req) + case "WebAppsClient.UpdateAuthSettingsV2": + resp, err = w.dispatchUpdateAuthSettingsV2(req) + case "WebAppsClient.UpdateAuthSettingsV2Slot": + resp, err = w.dispatchUpdateAuthSettingsV2Slot(req) + case "WebAppsClient.UpdateAzureStorageAccounts": + resp, err = w.dispatchUpdateAzureStorageAccounts(req) + case "WebAppsClient.UpdateAzureStorageAccountsSlot": + resp, err = w.dispatchUpdateAzureStorageAccountsSlot(req) + case "WebAppsClient.UpdateBackupConfiguration": + resp, err = w.dispatchUpdateBackupConfiguration(req) + case "WebAppsClient.UpdateBackupConfigurationSlot": + resp, err = w.dispatchUpdateBackupConfigurationSlot(req) + case "WebAppsClient.UpdateConfiguration": + resp, err = w.dispatchUpdateConfiguration(req) + case "WebAppsClient.UpdateConfigurationSlot": + resp, err = w.dispatchUpdateConfigurationSlot(req) + case "WebAppsClient.UpdateConnectionStrings": + resp, err = w.dispatchUpdateConnectionStrings(req) + case "WebAppsClient.UpdateConnectionStringsSlot": + resp, err = w.dispatchUpdateConnectionStringsSlot(req) + case "WebAppsClient.UpdateDiagnosticLogsConfig": + resp, err = w.dispatchUpdateDiagnosticLogsConfig(req) + case "WebAppsClient.UpdateDiagnosticLogsConfigSlot": + resp, err = w.dispatchUpdateDiagnosticLogsConfigSlot(req) + case "WebAppsClient.UpdateDomainOwnershipIdentifier": + resp, err = w.dispatchUpdateDomainOwnershipIdentifier(req) + case "WebAppsClient.UpdateDomainOwnershipIdentifierSlot": + resp, err = w.dispatchUpdateDomainOwnershipIdentifierSlot(req) + case "WebAppsClient.UpdateFtpAllowed": + resp, err = w.dispatchUpdateFtpAllowed(req) + case "WebAppsClient.UpdateFtpAllowedSlot": + resp, err = w.dispatchUpdateFtpAllowedSlot(req) + case "WebAppsClient.UpdateHybridConnection": + resp, err = w.dispatchUpdateHybridConnection(req) + case "WebAppsClient.UpdateHybridConnectionSlot": + resp, err = w.dispatchUpdateHybridConnectionSlot(req) + case "WebAppsClient.UpdateMetadata": + resp, err = w.dispatchUpdateMetadata(req) + case "WebAppsClient.UpdateMetadataSlot": + resp, err = w.dispatchUpdateMetadataSlot(req) + case "WebAppsClient.UpdatePremierAddOn": + resp, err = w.dispatchUpdatePremierAddOn(req) + case "WebAppsClient.UpdatePremierAddOnSlot": + resp, err = w.dispatchUpdatePremierAddOnSlot(req) + case "WebAppsClient.UpdateRelayServiceConnection": + resp, err = w.dispatchUpdateRelayServiceConnection(req) + case "WebAppsClient.UpdateRelayServiceConnectionSlot": + resp, err = w.dispatchUpdateRelayServiceConnectionSlot(req) + case "WebAppsClient.UpdateScmAllowed": + resp, err = w.dispatchUpdateScmAllowed(req) + case "WebAppsClient.UpdateScmAllowedSlot": + resp, err = w.dispatchUpdateScmAllowedSlot(req) + case "WebAppsClient.UpdateSitePushSettings": + resp, err = w.dispatchUpdateSitePushSettings(req) + case "WebAppsClient.UpdateSitePushSettingsSlot": + resp, err = w.dispatchUpdateSitePushSettingsSlot(req) + case "WebAppsClient.UpdateSlot": + resp, err = w.dispatchUpdateSlot(req) + case "WebAppsClient.UpdateSlotConfigurationNames": + resp, err = w.dispatchUpdateSlotConfigurationNames(req) + case "WebAppsClient.UpdateSourceControl": + resp, err = w.dispatchUpdateSourceControl(req) + case "WebAppsClient.UpdateSourceControlSlot": + resp, err = w.dispatchUpdateSourceControlSlot(req) + case "WebAppsClient.UpdateSwiftVirtualNetworkConnectionWithCheck": + resp, err = w.dispatchUpdateSwiftVirtualNetworkConnectionWithCheck(req) + case "WebAppsClient.UpdateSwiftVirtualNetworkConnectionWithCheckSlot": + resp, err = w.dispatchUpdateSwiftVirtualNetworkConnectionWithCheckSlot(req) + case "WebAppsClient.UpdateVnetConnection": + resp, err = w.dispatchUpdateVnetConnection(req) + case "WebAppsClient.UpdateVnetConnectionGateway": + resp, err = w.dispatchUpdateVnetConnectionGateway(req) + case "WebAppsClient.UpdateVnetConnectionGatewaySlot": + resp, err = w.dispatchUpdateVnetConnectionGatewaySlot(req) + case "WebAppsClient.UpdateVnetConnectionSlot": + resp, err = w.dispatchUpdateVnetConnectionSlot(req) + default: + err = fmt.Errorf("unhandled API %s", method) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchAddPremierAddOn(req *http.Request) (*http.Response, error) { + if w.srv.AddPremierAddOn == nil { + return nil, &nonRetriableError{errors.New("fake for method AddPremierAddOn not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/premieraddons/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.PremierAddOn](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + premierAddOnNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("premierAddOnName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.AddPremierAddOn(req.Context(), resourceGroupNameParam, nameParam, premierAddOnNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).PremierAddOn, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchAddPremierAddOnSlot(req *http.Request) (*http.Response, error) { + if w.srv.AddPremierAddOnSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method AddPremierAddOnSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/premieraddons/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.PremierAddOn](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + premierAddOnNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("premierAddOnName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.AddPremierAddOnSlot(req.Context(), resourceGroupNameParam, nameParam, premierAddOnNameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).PremierAddOn, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchAnalyzeCustomHostname(req *http.Request) (*http.Response, error) { + if w.srv.AnalyzeCustomHostname == nil { + return nil, &nonRetriableError{errors.New("fake for method AnalyzeCustomHostname not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/analyzeCustomHostname` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + hostNameUnescaped, err := url.QueryUnescape(qp.Get("hostName")) + if err != nil { + return nil, err + } + hostNameParam := getOptional(hostNameUnescaped) + var options *armappservice.WebAppsClientAnalyzeCustomHostnameOptions + if hostNameParam != nil { + options = &armappservice.WebAppsClientAnalyzeCustomHostnameOptions{ + HostName: hostNameParam, + } + } + respr, errRespr := w.srv.AnalyzeCustomHostname(req.Context(), resourceGroupNameParam, nameParam, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).CustomHostnameAnalysisResult, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchAnalyzeCustomHostnameSlot(req *http.Request) (*http.Response, error) { + if w.srv.AnalyzeCustomHostnameSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method AnalyzeCustomHostnameSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/analyzeCustomHostname` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + hostNameUnescaped, err := url.QueryUnescape(qp.Get("hostName")) + if err != nil { + return nil, err + } + hostNameParam := getOptional(hostNameUnescaped) + var options *armappservice.WebAppsClientAnalyzeCustomHostnameSlotOptions + if hostNameParam != nil { + options = &armappservice.WebAppsClientAnalyzeCustomHostnameSlotOptions{ + HostName: hostNameParam, + } + } + respr, errRespr := w.srv.AnalyzeCustomHostnameSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).CustomHostnameAnalysisResult, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchApplySlotConfigToProduction(req *http.Request) (*http.Response, error) { + if w.srv.ApplySlotConfigToProduction == nil { + return nil, &nonRetriableError{errors.New("fake for method ApplySlotConfigToProduction not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/applySlotConfig` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.CsmSlotEntity](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ApplySlotConfigToProduction(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchApplySlotConfigurationSlot(req *http.Request) (*http.Response, error) { + if w.srv.ApplySlotConfigurationSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method ApplySlotConfigurationSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/applySlotConfig` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.CsmSlotEntity](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ApplySlotConfigurationSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchBeginApproveOrRejectPrivateEndpointConnection(req *http.Request) (*http.Response, error) { + if w.srv.BeginApproveOrRejectPrivateEndpointConnection == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginApproveOrRejectPrivateEndpointConnection not implemented")} + } + beginApproveOrRejectPrivateEndpointConnection := w.beginApproveOrRejectPrivateEndpointConnection.get(req) + if beginApproveOrRejectPrivateEndpointConnection == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateEndpointConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.PrivateLinkConnectionApprovalRequestResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + privateEndpointConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("privateEndpointConnectionName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.BeginApproveOrRejectPrivateEndpointConnection(req.Context(), resourceGroupNameParam, nameParam, privateEndpointConnectionNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginApproveOrRejectPrivateEndpointConnection = &respr + w.beginApproveOrRejectPrivateEndpointConnection.add(req, beginApproveOrRejectPrivateEndpointConnection) + } + + resp, err := server.PollerResponderNext(beginApproveOrRejectPrivateEndpointConnection, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + w.beginApproveOrRejectPrivateEndpointConnection.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginApproveOrRejectPrivateEndpointConnection) { + w.beginApproveOrRejectPrivateEndpointConnection.remove(req) + } + + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchBeginApproveOrRejectPrivateEndpointConnectionSlot(req *http.Request) (*http.Response, error) { + if w.srv.BeginApproveOrRejectPrivateEndpointConnectionSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginApproveOrRejectPrivateEndpointConnectionSlot not implemented")} + } + beginApproveOrRejectPrivateEndpointConnectionSlot := w.beginApproveOrRejectPrivateEndpointConnectionSlot.get(req) + if beginApproveOrRejectPrivateEndpointConnectionSlot == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateEndpointConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.PrivateLinkConnectionApprovalRequestResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + privateEndpointConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("privateEndpointConnectionName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.BeginApproveOrRejectPrivateEndpointConnectionSlot(req.Context(), resourceGroupNameParam, nameParam, privateEndpointConnectionNameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginApproveOrRejectPrivateEndpointConnectionSlot = &respr + w.beginApproveOrRejectPrivateEndpointConnectionSlot.add(req, beginApproveOrRejectPrivateEndpointConnectionSlot) + } + + resp, err := server.PollerResponderNext(beginApproveOrRejectPrivateEndpointConnectionSlot, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + w.beginApproveOrRejectPrivateEndpointConnectionSlot.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginApproveOrRejectPrivateEndpointConnectionSlot) { + w.beginApproveOrRejectPrivateEndpointConnectionSlot.remove(req) + } + + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchBackup(req *http.Request) (*http.Response, error) { + if w.srv.Backup == nil { + return nil, &nonRetriableError{errors.New("fake for method Backup not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/backup` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.BackupRequest](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.Backup(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).BackupItem, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchBackupSlot(req *http.Request) (*http.Response, error) { + if w.srv.BackupSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method BackupSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/backup` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.BackupRequest](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.BackupSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).BackupItem, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchCreateDeployment(req *http.Request) (*http.Response, error) { + if w.srv.CreateDeployment == nil { + return nil, &nonRetriableError{errors.New("fake for method CreateDeployment not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.Deployment](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + idParam, err := url.PathUnescape(matches[regex.SubexpIndex("id")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.CreateDeployment(req.Context(), resourceGroupNameParam, nameParam, idParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).Deployment, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchCreateDeploymentSlot(req *http.Request) (*http.Response, error) { + if w.srv.CreateDeploymentSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method CreateDeploymentSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.Deployment](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + idParam, err := url.PathUnescape(matches[regex.SubexpIndex("id")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.CreateDeploymentSlot(req.Context(), resourceGroupNameParam, nameParam, idParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).Deployment, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchBeginCreateFunction(req *http.Request) (*http.Response, error) { + if w.srv.BeginCreateFunction == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginCreateFunction not implemented")} + } + beginCreateFunction := w.beginCreateFunction.get(req) + if beginCreateFunction == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/functions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.FunctionEnvelope](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + functionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("functionName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.BeginCreateFunction(req.Context(), resourceGroupNameParam, nameParam, functionNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginCreateFunction = &respr + w.beginCreateFunction.add(req, beginCreateFunction) + } + + resp, err := server.PollerResponderNext(beginCreateFunction, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusCreated}, resp.StatusCode) { + w.beginCreateFunction.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusCreated", resp.StatusCode)} + } + if !server.PollerResponderMore(beginCreateFunction) { + w.beginCreateFunction.remove(req) + } + + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchBeginCreateInstanceFunctionSlot(req *http.Request) (*http.Response, error) { + if w.srv.BeginCreateInstanceFunctionSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginCreateInstanceFunctionSlot not implemented")} + } + beginCreateInstanceFunctionSlot := w.beginCreateInstanceFunctionSlot.get(req) + if beginCreateInstanceFunctionSlot == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/functions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.FunctionEnvelope](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + functionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("functionName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.BeginCreateInstanceFunctionSlot(req.Context(), resourceGroupNameParam, nameParam, functionNameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginCreateInstanceFunctionSlot = &respr + w.beginCreateInstanceFunctionSlot.add(req, beginCreateInstanceFunctionSlot) + } + + resp, err := server.PollerResponderNext(beginCreateInstanceFunctionSlot, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusCreated}, resp.StatusCode) { + w.beginCreateInstanceFunctionSlot.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusCreated", resp.StatusCode)} + } + if !server.PollerResponderMore(beginCreateInstanceFunctionSlot) { + w.beginCreateInstanceFunctionSlot.remove(req) + } + + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchBeginCreateInstanceMSDeployOperation(req *http.Request) (*http.Response, error) { + if w.srv.BeginCreateInstanceMSDeployOperation == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginCreateInstanceMSDeployOperation not implemented")} + } + beginCreateInstanceMSDeployOperation := w.beginCreateInstanceMSDeployOperation.get(req) + if beginCreateInstanceMSDeployOperation == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/instances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/extensions/MSDeploy` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.MSDeploy](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + instanceIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("instanceId")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.BeginCreateInstanceMSDeployOperation(req.Context(), resourceGroupNameParam, nameParam, instanceIDParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginCreateInstanceMSDeployOperation = &respr + w.beginCreateInstanceMSDeployOperation.add(req, beginCreateInstanceMSDeployOperation) + } + + resp, err := server.PollerResponderNext(beginCreateInstanceMSDeployOperation, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusCreated}, resp.StatusCode) { + w.beginCreateInstanceMSDeployOperation.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusCreated", resp.StatusCode)} + } + if !server.PollerResponderMore(beginCreateInstanceMSDeployOperation) { + w.beginCreateInstanceMSDeployOperation.remove(req) + } + + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchBeginCreateInstanceMSDeployOperationSlot(req *http.Request) (*http.Response, error) { + if w.srv.BeginCreateInstanceMSDeployOperationSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginCreateInstanceMSDeployOperationSlot not implemented")} + } + beginCreateInstanceMSDeployOperationSlot := w.beginCreateInstanceMSDeployOperationSlot.get(req) + if beginCreateInstanceMSDeployOperationSlot == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/instances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/extensions/MSDeploy` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.MSDeploy](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + instanceIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("instanceId")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.BeginCreateInstanceMSDeployOperationSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, instanceIDParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginCreateInstanceMSDeployOperationSlot = &respr + w.beginCreateInstanceMSDeployOperationSlot.add(req, beginCreateInstanceMSDeployOperationSlot) + } + + resp, err := server.PollerResponderNext(beginCreateInstanceMSDeployOperationSlot, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusCreated}, resp.StatusCode) { + w.beginCreateInstanceMSDeployOperationSlot.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusCreated", resp.StatusCode)} + } + if !server.PollerResponderMore(beginCreateInstanceMSDeployOperationSlot) { + w.beginCreateInstanceMSDeployOperationSlot.remove(req) + } + + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchBeginCreateMSDeployOperation(req *http.Request) (*http.Response, error) { + if w.srv.BeginCreateMSDeployOperation == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginCreateMSDeployOperation not implemented")} + } + beginCreateMSDeployOperation := w.beginCreateMSDeployOperation.get(req) + if beginCreateMSDeployOperation == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/extensions/MSDeploy` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.MSDeploy](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.BeginCreateMSDeployOperation(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginCreateMSDeployOperation = &respr + w.beginCreateMSDeployOperation.add(req, beginCreateMSDeployOperation) + } + + resp, err := server.PollerResponderNext(beginCreateMSDeployOperation, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusCreated}, resp.StatusCode) { + w.beginCreateMSDeployOperation.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusCreated", resp.StatusCode)} + } + if !server.PollerResponderMore(beginCreateMSDeployOperation) { + w.beginCreateMSDeployOperation.remove(req) + } + + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchBeginCreateMSDeployOperationSlot(req *http.Request) (*http.Response, error) { + if w.srv.BeginCreateMSDeployOperationSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginCreateMSDeployOperationSlot not implemented")} + } + beginCreateMSDeployOperationSlot := w.beginCreateMSDeployOperationSlot.get(req) + if beginCreateMSDeployOperationSlot == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/extensions/MSDeploy` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.MSDeploy](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.BeginCreateMSDeployOperationSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginCreateMSDeployOperationSlot = &respr + w.beginCreateMSDeployOperationSlot.add(req, beginCreateMSDeployOperationSlot) + } + + resp, err := server.PollerResponderNext(beginCreateMSDeployOperationSlot, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusCreated}, resp.StatusCode) { + w.beginCreateMSDeployOperationSlot.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusCreated", resp.StatusCode)} + } + if !server.PollerResponderMore(beginCreateMSDeployOperationSlot) { + w.beginCreateMSDeployOperationSlot.remove(req) + } + + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchCreateOneDeployOperation(req *http.Request) (*http.Response, error) { + if w.srv.CreateOneDeployOperation == nil { + return nil, &nonRetriableError{errors.New("fake for method CreateOneDeployOperation not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/extensions/onedeploy` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.CreateOneDeployOperation(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).Interface, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) (*http.Response, error) { + if w.srv.BeginCreateOrUpdate == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} + } + beginCreateOrUpdate := w.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.Site](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginCreateOrUpdate = &respr + w.beginCreateOrUpdate.add(req, beginCreateOrUpdate) + } + + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + w.beginCreateOrUpdate.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginCreateOrUpdate) { + w.beginCreateOrUpdate.remove(req) + } + + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchCreateOrUpdateConfiguration(req *http.Request) (*http.Response, error) { + if w.srv.CreateOrUpdateConfiguration == nil { + return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdateConfiguration not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/web` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.SiteConfigResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.CreateOrUpdateConfiguration(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SiteConfigResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchCreateOrUpdateConfigurationSlot(req *http.Request) (*http.Response, error) { + if w.srv.CreateOrUpdateConfigurationSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdateConfigurationSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/web` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.SiteConfigResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.CreateOrUpdateConfigurationSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SiteConfigResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchCreateOrUpdateDomainOwnershipIdentifier(req *http.Request) (*http.Response, error) { + if w.srv.CreateOrUpdateDomainOwnershipIdentifier == nil { + return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdateDomainOwnershipIdentifier not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/domainOwnershipIdentifiers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.Identifier](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + domainOwnershipIdentifierNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("domainOwnershipIdentifierName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.CreateOrUpdateDomainOwnershipIdentifier(req.Context(), resourceGroupNameParam, nameParam, domainOwnershipIdentifierNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).Identifier, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchCreateOrUpdateDomainOwnershipIdentifierSlot(req *http.Request) (*http.Response, error) { + if w.srv.CreateOrUpdateDomainOwnershipIdentifierSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdateDomainOwnershipIdentifierSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/domainOwnershipIdentifiers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.Identifier](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + domainOwnershipIdentifierNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("domainOwnershipIdentifierName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.CreateOrUpdateDomainOwnershipIdentifierSlot(req.Context(), resourceGroupNameParam, nameParam, domainOwnershipIdentifierNameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).Identifier, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchCreateOrUpdateFunctionSecret(req *http.Request) (*http.Response, error) { + if w.srv.CreateOrUpdateFunctionSecret == nil { + return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdateFunctionSecret not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/functions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/keys/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.KeyInfo](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + functionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("functionName")]) + if err != nil { + return nil, err + } + keyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("keyName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.CreateOrUpdateFunctionSecret(req.Context(), resourceGroupNameParam, nameParam, functionNameParam, keyNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusCreated}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).KeyInfo, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchCreateOrUpdateFunctionSecretSlot(req *http.Request) (*http.Response, error) { + if w.srv.CreateOrUpdateFunctionSecretSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdateFunctionSecretSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/functions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/keys/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 6 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.KeyInfo](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + functionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("functionName")]) + if err != nil { + return nil, err + } + keyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("keyName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.CreateOrUpdateFunctionSecretSlot(req.Context(), resourceGroupNameParam, nameParam, functionNameParam, keyNameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusCreated}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).KeyInfo, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchCreateOrUpdateHostNameBinding(req *http.Request) (*http.Response, error) { + if w.srv.CreateOrUpdateHostNameBinding == nil { + return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdateHostNameBinding not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hostNameBindings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.HostNameBinding](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + hostNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("hostName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.CreateOrUpdateHostNameBinding(req.Context(), resourceGroupNameParam, nameParam, hostNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).HostNameBinding, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchCreateOrUpdateHostNameBindingSlot(req *http.Request) (*http.Response, error) { + if w.srv.CreateOrUpdateHostNameBindingSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdateHostNameBindingSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hostNameBindings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.HostNameBinding](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + hostNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("hostName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.CreateOrUpdateHostNameBindingSlot(req.Context(), resourceGroupNameParam, nameParam, hostNameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).HostNameBinding, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchCreateOrUpdateHostSecret(req *http.Request) (*http.Response, error) { + if w.srv.CreateOrUpdateHostSecret == nil { + return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdateHostSecret not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/host/default/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.KeyInfo](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + keyTypeParam, err := url.PathUnescape(matches[regex.SubexpIndex("keyType")]) + if err != nil { + return nil, err + } + keyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("keyName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.CreateOrUpdateHostSecret(req.Context(), resourceGroupNameParam, nameParam, keyTypeParam, keyNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusCreated}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).KeyInfo, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchCreateOrUpdateHostSecretSlot(req *http.Request) (*http.Response, error) { + if w.srv.CreateOrUpdateHostSecretSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdateHostSecretSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/host/default/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 6 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.KeyInfo](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + keyTypeParam, err := url.PathUnescape(matches[regex.SubexpIndex("keyType")]) + if err != nil { + return nil, err + } + keyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("keyName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.CreateOrUpdateHostSecretSlot(req.Context(), resourceGroupNameParam, nameParam, keyTypeParam, keyNameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusCreated}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).KeyInfo, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchCreateOrUpdateHybridConnection(req *http.Request) (*http.Response, error) { + if w.srv.CreateOrUpdateHybridConnection == nil { + return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdateHybridConnection not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hybridConnectionNamespaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/relays/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.HybridConnection](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + namespaceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("namespaceName")]) + if err != nil { + return nil, err + } + relayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("relayName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.CreateOrUpdateHybridConnection(req.Context(), resourceGroupNameParam, nameParam, namespaceNameParam, relayNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).HybridConnection, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchCreateOrUpdateHybridConnectionSlot(req *http.Request) (*http.Response, error) { + if w.srv.CreateOrUpdateHybridConnectionSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdateHybridConnectionSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hybridConnectionNamespaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/relays/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 6 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.HybridConnection](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + namespaceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("namespaceName")]) + if err != nil { + return nil, err + } + relayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("relayName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.CreateOrUpdateHybridConnectionSlot(req.Context(), resourceGroupNameParam, nameParam, namespaceNameParam, relayNameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).HybridConnection, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchCreateOrUpdatePublicCertificate(req *http.Request) (*http.Response, error) { + if w.srv.CreateOrUpdatePublicCertificate == nil { + return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdatePublicCertificate not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/publicCertificates/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.PublicCertificate](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + publicCertificateNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("publicCertificateName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.CreateOrUpdatePublicCertificate(req.Context(), resourceGroupNameParam, nameParam, publicCertificateNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).PublicCertificate, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchCreateOrUpdatePublicCertificateSlot(req *http.Request) (*http.Response, error) { + if w.srv.CreateOrUpdatePublicCertificateSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdatePublicCertificateSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/publicCertificates/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.PublicCertificate](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + publicCertificateNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("publicCertificateName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.CreateOrUpdatePublicCertificateSlot(req.Context(), resourceGroupNameParam, nameParam, publicCertificateNameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).PublicCertificate, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchCreateOrUpdateRelayServiceConnection(req *http.Request) (*http.Response, error) { + if w.srv.CreateOrUpdateRelayServiceConnection == nil { + return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdateRelayServiceConnection not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hybridconnection/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.RelayServiceConnectionEntity](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + entityNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("entityName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.CreateOrUpdateRelayServiceConnection(req.Context(), resourceGroupNameParam, nameParam, entityNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).RelayServiceConnectionEntity, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchCreateOrUpdateRelayServiceConnectionSlot(req *http.Request) (*http.Response, error) { + if w.srv.CreateOrUpdateRelayServiceConnectionSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdateRelayServiceConnectionSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hybridconnection/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.RelayServiceConnectionEntity](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + entityNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("entityName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.CreateOrUpdateRelayServiceConnectionSlot(req.Context(), resourceGroupNameParam, nameParam, entityNameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).RelayServiceConnectionEntity, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchBeginCreateOrUpdateSlot(req *http.Request) (*http.Response, error) { + if w.srv.BeginCreateOrUpdateSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdateSlot not implemented")} + } + beginCreateOrUpdateSlot := w.beginCreateOrUpdateSlot.get(req) + if beginCreateOrUpdateSlot == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.Site](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.BeginCreateOrUpdateSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginCreateOrUpdateSlot = &respr + w.beginCreateOrUpdateSlot.add(req, beginCreateOrUpdateSlot) + } + + resp, err := server.PollerResponderNext(beginCreateOrUpdateSlot, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + w.beginCreateOrUpdateSlot.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginCreateOrUpdateSlot) { + w.beginCreateOrUpdateSlot.remove(req) + } + + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchBeginCreateOrUpdateSourceControl(req *http.Request) (*http.Response, error) { + if w.srv.BeginCreateOrUpdateSourceControl == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdateSourceControl not implemented")} + } + beginCreateOrUpdateSourceControl := w.beginCreateOrUpdateSourceControl.get(req) + if beginCreateOrUpdateSourceControl == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/sourcecontrols/web` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.SiteSourceControl](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.BeginCreateOrUpdateSourceControl(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginCreateOrUpdateSourceControl = &respr + w.beginCreateOrUpdateSourceControl.add(req, beginCreateOrUpdateSourceControl) + } + + resp, err := server.PollerResponderNext(beginCreateOrUpdateSourceControl, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusCreated, http.StatusAccepted}, resp.StatusCode) { + w.beginCreateOrUpdateSourceControl.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginCreateOrUpdateSourceControl) { + w.beginCreateOrUpdateSourceControl.remove(req) + } + + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchBeginCreateOrUpdateSourceControlSlot(req *http.Request) (*http.Response, error) { + if w.srv.BeginCreateOrUpdateSourceControlSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdateSourceControlSlot not implemented")} + } + beginCreateOrUpdateSourceControlSlot := w.beginCreateOrUpdateSourceControlSlot.get(req) + if beginCreateOrUpdateSourceControlSlot == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/sourcecontrols/web` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.SiteSourceControl](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.BeginCreateOrUpdateSourceControlSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginCreateOrUpdateSourceControlSlot = &respr + w.beginCreateOrUpdateSourceControlSlot.add(req, beginCreateOrUpdateSourceControlSlot) + } + + resp, err := server.PollerResponderNext(beginCreateOrUpdateSourceControlSlot, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusCreated, http.StatusAccepted}, resp.StatusCode) { + w.beginCreateOrUpdateSourceControlSlot.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginCreateOrUpdateSourceControlSlot) { + w.beginCreateOrUpdateSourceControlSlot.remove(req) + } + + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchCreateOrUpdateSwiftVirtualNetworkConnectionWithCheck(req *http.Request) (*http.Response, error) { + if w.srv.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck == nil { + return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkConfig/virtualNetwork` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.SwiftVirtualNetwork](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SwiftVirtualNetwork, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot(req *http.Request) (*http.Response, error) { + if w.srv.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkConfig/virtualNetwork` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.SwiftVirtualNetwork](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SwiftVirtualNetwork, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchCreateOrUpdateVnetConnection(req *http.Request) (*http.Response, error) { + if w.srv.CreateOrUpdateVnetConnection == nil { + return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdateVnetConnection not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.VnetInfoResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + vnetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vnetName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.CreateOrUpdateVnetConnection(req.Context(), resourceGroupNameParam, nameParam, vnetNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).VnetInfoResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchCreateOrUpdateVnetConnectionGateway(req *http.Request) (*http.Response, error) { + if w.srv.CreateOrUpdateVnetConnectionGateway == nil { + return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdateVnetConnectionGateway not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/gateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.VnetGateway](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + vnetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vnetName")]) + if err != nil { + return nil, err + } + gatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.CreateOrUpdateVnetConnectionGateway(req.Context(), resourceGroupNameParam, nameParam, vnetNameParam, gatewayNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).VnetGateway, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchCreateOrUpdateVnetConnectionGatewaySlot(req *http.Request) (*http.Response, error) { + if w.srv.CreateOrUpdateVnetConnectionGatewaySlot == nil { + return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdateVnetConnectionGatewaySlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/gateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 6 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.VnetGateway](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + vnetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vnetName")]) + if err != nil { + return nil, err + } + gatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.CreateOrUpdateVnetConnectionGatewaySlot(req.Context(), resourceGroupNameParam, nameParam, vnetNameParam, gatewayNameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).VnetGateway, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchCreateOrUpdateVnetConnectionSlot(req *http.Request) (*http.Response, error) { + if w.srv.CreateOrUpdateVnetConnectionSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdateVnetConnectionSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.VnetInfoResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + vnetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vnetName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.CreateOrUpdateVnetConnectionSlot(req.Context(), resourceGroupNameParam, nameParam, vnetNameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).VnetInfoResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDelete(req *http.Request) (*http.Response, error) { + if w.srv.Delete == nil { + return nil, &nonRetriableError{errors.New("fake for method Delete not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + deleteMetricsUnescaped, err := url.QueryUnescape(qp.Get("deleteMetrics")) + if err != nil { + return nil, err + } + deleteMetricsParam, err := parseOptional(deleteMetricsUnescaped, strconv.ParseBool) + if err != nil { + return nil, err + } + deleteEmptyServerFarmUnescaped, err := url.QueryUnescape(qp.Get("deleteEmptyServerFarm")) + if err != nil { + return nil, err + } + deleteEmptyServerFarmParam, err := parseOptional(deleteEmptyServerFarmUnescaped, strconv.ParseBool) + if err != nil { + return nil, err + } + var options *armappservice.WebAppsClientDeleteOptions + if deleteMetricsParam != nil || deleteEmptyServerFarmParam != nil { + options = &armappservice.WebAppsClientDeleteOptions{ + DeleteMetrics: deleteMetricsParam, + DeleteEmptyServerFarm: deleteEmptyServerFarmParam, + } + } + respr, errRespr := w.srv.Delete(req.Context(), resourceGroupNameParam, nameParam, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeleteBackup(req *http.Request) (*http.Response, error) { + if w.srv.DeleteBackup == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteBackup not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/backups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + backupIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("backupId")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DeleteBackup(req.Context(), resourceGroupNameParam, nameParam, backupIDParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeleteBackupConfiguration(req *http.Request) (*http.Response, error) { + if w.srv.DeleteBackupConfiguration == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteBackupConfiguration not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/backup` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DeleteBackupConfiguration(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeleteBackupConfigurationSlot(req *http.Request) (*http.Response, error) { + if w.srv.DeleteBackupConfigurationSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteBackupConfigurationSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/backup` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DeleteBackupConfigurationSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeleteBackupSlot(req *http.Request) (*http.Response, error) { + if w.srv.DeleteBackupSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteBackupSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/backups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + backupIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("backupId")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DeleteBackupSlot(req.Context(), resourceGroupNameParam, nameParam, backupIDParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeleteContinuousWebJob(req *http.Request) (*http.Response, error) { + if w.srv.DeleteContinuousWebJob == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteContinuousWebJob not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/continuouswebjobs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + webJobNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("webJobName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DeleteContinuousWebJob(req.Context(), resourceGroupNameParam, nameParam, webJobNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeleteContinuousWebJobSlot(req *http.Request) (*http.Response, error) { + if w.srv.DeleteContinuousWebJobSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteContinuousWebJobSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/continuouswebjobs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + webJobNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("webJobName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DeleteContinuousWebJobSlot(req.Context(), resourceGroupNameParam, nameParam, webJobNameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeleteDeployment(req *http.Request) (*http.Response, error) { + if w.srv.DeleteDeployment == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteDeployment not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + idParam, err := url.PathUnescape(matches[regex.SubexpIndex("id")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DeleteDeployment(req.Context(), resourceGroupNameParam, nameParam, idParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeleteDeploymentSlot(req *http.Request) (*http.Response, error) { + if w.srv.DeleteDeploymentSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteDeploymentSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + idParam, err := url.PathUnescape(matches[regex.SubexpIndex("id")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DeleteDeploymentSlot(req.Context(), resourceGroupNameParam, nameParam, idParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeleteDomainOwnershipIdentifier(req *http.Request) (*http.Response, error) { + if w.srv.DeleteDomainOwnershipIdentifier == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteDomainOwnershipIdentifier not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/domainOwnershipIdentifiers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + domainOwnershipIdentifierNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("domainOwnershipIdentifierName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DeleteDomainOwnershipIdentifier(req.Context(), resourceGroupNameParam, nameParam, domainOwnershipIdentifierNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeleteDomainOwnershipIdentifierSlot(req *http.Request) (*http.Response, error) { + if w.srv.DeleteDomainOwnershipIdentifierSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteDomainOwnershipIdentifierSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/domainOwnershipIdentifiers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + domainOwnershipIdentifierNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("domainOwnershipIdentifierName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DeleteDomainOwnershipIdentifierSlot(req.Context(), resourceGroupNameParam, nameParam, domainOwnershipIdentifierNameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeleteFunction(req *http.Request) (*http.Response, error) { + if w.srv.DeleteFunction == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteFunction not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/functions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + functionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("functionName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DeleteFunction(req.Context(), resourceGroupNameParam, nameParam, functionNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeleteFunctionSecret(req *http.Request) (*http.Response, error) { + if w.srv.DeleteFunctionSecret == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteFunctionSecret not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/functions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/keys/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + functionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("functionName")]) + if err != nil { + return nil, err + } + keyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("keyName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DeleteFunctionSecret(req.Context(), resourceGroupNameParam, nameParam, functionNameParam, keyNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeleteFunctionSecretSlot(req *http.Request) (*http.Response, error) { + if w.srv.DeleteFunctionSecretSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteFunctionSecretSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/functions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/keys/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 6 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + functionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("functionName")]) + if err != nil { + return nil, err + } + keyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("keyName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DeleteFunctionSecretSlot(req.Context(), resourceGroupNameParam, nameParam, functionNameParam, keyNameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeleteHostNameBinding(req *http.Request) (*http.Response, error) { + if w.srv.DeleteHostNameBinding == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteHostNameBinding not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hostNameBindings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + hostNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("hostName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DeleteHostNameBinding(req.Context(), resourceGroupNameParam, nameParam, hostNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeleteHostNameBindingSlot(req *http.Request) (*http.Response, error) { + if w.srv.DeleteHostNameBindingSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteHostNameBindingSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hostNameBindings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + hostNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("hostName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DeleteHostNameBindingSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, hostNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeleteHostSecret(req *http.Request) (*http.Response, error) { + if w.srv.DeleteHostSecret == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteHostSecret not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/host/default/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + keyTypeParam, err := url.PathUnescape(matches[regex.SubexpIndex("keyType")]) + if err != nil { + return nil, err + } + keyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("keyName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DeleteHostSecret(req.Context(), resourceGroupNameParam, nameParam, keyTypeParam, keyNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeleteHostSecretSlot(req *http.Request) (*http.Response, error) { + if w.srv.DeleteHostSecretSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteHostSecretSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/host/default/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 6 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + keyTypeParam, err := url.PathUnescape(matches[regex.SubexpIndex("keyType")]) + if err != nil { + return nil, err + } + keyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("keyName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DeleteHostSecretSlot(req.Context(), resourceGroupNameParam, nameParam, keyTypeParam, keyNameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeleteHybridConnection(req *http.Request) (*http.Response, error) { + if w.srv.DeleteHybridConnection == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteHybridConnection not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hybridConnectionNamespaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/relays/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + namespaceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("namespaceName")]) + if err != nil { + return nil, err + } + relayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("relayName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DeleteHybridConnection(req.Context(), resourceGroupNameParam, nameParam, namespaceNameParam, relayNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeleteHybridConnectionSlot(req *http.Request) (*http.Response, error) { + if w.srv.DeleteHybridConnectionSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteHybridConnectionSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hybridConnectionNamespaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/relays/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 6 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + namespaceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("namespaceName")]) + if err != nil { + return nil, err + } + relayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("relayName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DeleteHybridConnectionSlot(req.Context(), resourceGroupNameParam, nameParam, namespaceNameParam, relayNameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeleteInstanceFunctionSlot(req *http.Request) (*http.Response, error) { + if w.srv.DeleteInstanceFunctionSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteInstanceFunctionSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/functions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + functionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("functionName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DeleteInstanceFunctionSlot(req.Context(), resourceGroupNameParam, nameParam, functionNameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeleteInstanceProcess(req *http.Request) (*http.Response, error) { + if w.srv.DeleteInstanceProcess == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteInstanceProcess not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/instances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/processes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + processIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("processId")]) + if err != nil { + return nil, err + } + instanceIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("instanceId")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DeleteInstanceProcess(req.Context(), resourceGroupNameParam, nameParam, processIDParam, instanceIDParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeleteInstanceProcessSlot(req *http.Request) (*http.Response, error) { + if w.srv.DeleteInstanceProcessSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteInstanceProcessSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/instances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/processes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 6 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + processIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("processId")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + instanceIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("instanceId")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DeleteInstanceProcessSlot(req.Context(), resourceGroupNameParam, nameParam, processIDParam, slotParam, instanceIDParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeletePremierAddOn(req *http.Request) (*http.Response, error) { + if w.srv.DeletePremierAddOn == nil { + return nil, &nonRetriableError{errors.New("fake for method DeletePremierAddOn not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/premieraddons/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + premierAddOnNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("premierAddOnName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DeletePremierAddOn(req.Context(), resourceGroupNameParam, nameParam, premierAddOnNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeletePremierAddOnSlot(req *http.Request) (*http.Response, error) { + if w.srv.DeletePremierAddOnSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method DeletePremierAddOnSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/premieraddons/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + premierAddOnNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("premierAddOnName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DeletePremierAddOnSlot(req.Context(), resourceGroupNameParam, nameParam, premierAddOnNameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchBeginDeletePrivateEndpointConnection(req *http.Request) (*http.Response, error) { + if w.srv.BeginDeletePrivateEndpointConnection == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginDeletePrivateEndpointConnection not implemented")} + } + beginDeletePrivateEndpointConnection := w.beginDeletePrivateEndpointConnection.get(req) + if beginDeletePrivateEndpointConnection == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateEndpointConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + privateEndpointConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("privateEndpointConnectionName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.BeginDeletePrivateEndpointConnection(req.Context(), resourceGroupNameParam, nameParam, privateEndpointConnectionNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginDeletePrivateEndpointConnection = &respr + w.beginDeletePrivateEndpointConnection.add(req, beginDeletePrivateEndpointConnection) + } + + resp, err := server.PollerResponderNext(beginDeletePrivateEndpointConnection, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + w.beginDeletePrivateEndpointConnection.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + } + if !server.PollerResponderMore(beginDeletePrivateEndpointConnection) { + w.beginDeletePrivateEndpointConnection.remove(req) + } + + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchBeginDeletePrivateEndpointConnectionSlot(req *http.Request) (*http.Response, error) { + if w.srv.BeginDeletePrivateEndpointConnectionSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginDeletePrivateEndpointConnectionSlot not implemented")} + } + beginDeletePrivateEndpointConnectionSlot := w.beginDeletePrivateEndpointConnectionSlot.get(req) + if beginDeletePrivateEndpointConnectionSlot == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateEndpointConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + privateEndpointConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("privateEndpointConnectionName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.BeginDeletePrivateEndpointConnectionSlot(req.Context(), resourceGroupNameParam, nameParam, privateEndpointConnectionNameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginDeletePrivateEndpointConnectionSlot = &respr + w.beginDeletePrivateEndpointConnectionSlot.add(req, beginDeletePrivateEndpointConnectionSlot) + } + + resp, err := server.PollerResponderNext(beginDeletePrivateEndpointConnectionSlot, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + w.beginDeletePrivateEndpointConnectionSlot.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + } + if !server.PollerResponderMore(beginDeletePrivateEndpointConnectionSlot) { + w.beginDeletePrivateEndpointConnectionSlot.remove(req) + } + + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeleteProcess(req *http.Request) (*http.Response, error) { + if w.srv.DeleteProcess == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteProcess not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/processes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + processIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("processId")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DeleteProcess(req.Context(), resourceGroupNameParam, nameParam, processIDParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeleteProcessSlot(req *http.Request) (*http.Response, error) { + if w.srv.DeleteProcessSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteProcessSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/processes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + processIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("processId")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DeleteProcessSlot(req.Context(), resourceGroupNameParam, nameParam, processIDParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeletePublicCertificate(req *http.Request) (*http.Response, error) { + if w.srv.DeletePublicCertificate == nil { + return nil, &nonRetriableError{errors.New("fake for method DeletePublicCertificate not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/publicCertificates/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + publicCertificateNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("publicCertificateName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DeletePublicCertificate(req.Context(), resourceGroupNameParam, nameParam, publicCertificateNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeletePublicCertificateSlot(req *http.Request) (*http.Response, error) { + if w.srv.DeletePublicCertificateSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method DeletePublicCertificateSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/publicCertificates/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + publicCertificateNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("publicCertificateName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DeletePublicCertificateSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, publicCertificateNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeleteRelayServiceConnection(req *http.Request) (*http.Response, error) { + if w.srv.DeleteRelayServiceConnection == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteRelayServiceConnection not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hybridconnection/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + entityNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("entityName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DeleteRelayServiceConnection(req.Context(), resourceGroupNameParam, nameParam, entityNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeleteRelayServiceConnectionSlot(req *http.Request) (*http.Response, error) { + if w.srv.DeleteRelayServiceConnectionSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteRelayServiceConnectionSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hybridconnection/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + entityNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("entityName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DeleteRelayServiceConnectionSlot(req.Context(), resourceGroupNameParam, nameParam, entityNameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeleteSiteExtension(req *http.Request) (*http.Response, error) { + if w.srv.DeleteSiteExtension == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteSiteExtension not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/siteextensions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + siteExtensionIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("siteExtensionId")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DeleteSiteExtension(req.Context(), resourceGroupNameParam, nameParam, siteExtensionIDParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeleteSiteExtensionSlot(req *http.Request) (*http.Response, error) { + if w.srv.DeleteSiteExtensionSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteSiteExtensionSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/siteextensions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + siteExtensionIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("siteExtensionId")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DeleteSiteExtensionSlot(req.Context(), resourceGroupNameParam, nameParam, siteExtensionIDParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeleteSlot(req *http.Request) (*http.Response, error) { + if w.srv.DeleteSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + deleteMetricsUnescaped, err := url.QueryUnescape(qp.Get("deleteMetrics")) + if err != nil { + return nil, err + } + deleteMetricsParam, err := parseOptional(deleteMetricsUnescaped, strconv.ParseBool) + if err != nil { + return nil, err + } + deleteEmptyServerFarmUnescaped, err := url.QueryUnescape(qp.Get("deleteEmptyServerFarm")) + if err != nil { + return nil, err + } + deleteEmptyServerFarmParam, err := parseOptional(deleteEmptyServerFarmUnescaped, strconv.ParseBool) + if err != nil { + return nil, err + } + var options *armappservice.WebAppsClientDeleteSlotOptions + if deleteMetricsParam != nil || deleteEmptyServerFarmParam != nil { + options = &armappservice.WebAppsClientDeleteSlotOptions{ + DeleteMetrics: deleteMetricsParam, + DeleteEmptyServerFarm: deleteEmptyServerFarmParam, + } + } + respr, errRespr := w.srv.DeleteSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeleteSourceControl(req *http.Request) (*http.Response, error) { + if w.srv.DeleteSourceControl == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteSourceControl not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/sourcecontrols/web` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + additionalFlagsUnescaped, err := url.QueryUnescape(qp.Get("additionalFlags")) + if err != nil { + return nil, err + } + additionalFlagsParam := getOptional(additionalFlagsUnescaped) + var options *armappservice.WebAppsClientDeleteSourceControlOptions + if additionalFlagsParam != nil { + options = &armappservice.WebAppsClientDeleteSourceControlOptions{ + AdditionalFlags: additionalFlagsParam, + } + } + respr, errRespr := w.srv.DeleteSourceControl(req.Context(), resourceGroupNameParam, nameParam, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusAccepted}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeleteSourceControlSlot(req *http.Request) (*http.Response, error) { + if w.srv.DeleteSourceControlSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteSourceControlSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/sourcecontrols/web` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + additionalFlagsUnescaped, err := url.QueryUnescape(qp.Get("additionalFlags")) + if err != nil { + return nil, err + } + additionalFlagsParam := getOptional(additionalFlagsUnescaped) + var options *armappservice.WebAppsClientDeleteSourceControlSlotOptions + if additionalFlagsParam != nil { + options = &armappservice.WebAppsClientDeleteSourceControlSlotOptions{ + AdditionalFlags: additionalFlagsParam, + } + } + respr, errRespr := w.srv.DeleteSourceControlSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusAccepted}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeleteSwiftVirtualNetwork(req *http.Request) (*http.Response, error) { + if w.srv.DeleteSwiftVirtualNetwork == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteSwiftVirtualNetwork not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkConfig/virtualNetwork` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DeleteSwiftVirtualNetwork(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeleteSwiftVirtualNetworkSlot(req *http.Request) (*http.Response, error) { + if w.srv.DeleteSwiftVirtualNetworkSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteSwiftVirtualNetworkSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkConfig/virtualNetwork` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DeleteSwiftVirtualNetworkSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeleteTriggeredWebJob(req *http.Request) (*http.Response, error) { + if w.srv.DeleteTriggeredWebJob == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteTriggeredWebJob not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/triggeredwebjobs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + webJobNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("webJobName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DeleteTriggeredWebJob(req.Context(), resourceGroupNameParam, nameParam, webJobNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeleteTriggeredWebJobSlot(req *http.Request) (*http.Response, error) { + if w.srv.DeleteTriggeredWebJobSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteTriggeredWebJobSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/triggeredwebjobs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + webJobNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("webJobName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DeleteTriggeredWebJobSlot(req.Context(), resourceGroupNameParam, nameParam, webJobNameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeleteVnetConnection(req *http.Request) (*http.Response, error) { + if w.srv.DeleteVnetConnection == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteVnetConnection not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + vnetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vnetName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DeleteVnetConnection(req.Context(), resourceGroupNameParam, nameParam, vnetNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeleteVnetConnectionSlot(req *http.Request) (*http.Response, error) { + if w.srv.DeleteVnetConnectionSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method DeleteVnetConnectionSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + vnetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vnetName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DeleteVnetConnectionSlot(req.Context(), resourceGroupNameParam, nameParam, vnetNameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeployWorkflowArtifacts(req *http.Request) (*http.Response, error) { + if w.srv.DeployWorkflowArtifacts == nil { + return nil, &nonRetriableError{errors.New("fake for method DeployWorkflowArtifacts not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/deployWorkflowArtifacts` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.WorkflowArtifacts](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + var options *armappservice.WebAppsClientDeployWorkflowArtifactsOptions + if !reflect.ValueOf(body).IsZero() { + options = &armappservice.WebAppsClientDeployWorkflowArtifactsOptions{ + WorkflowArtifacts: &body, + } + } + respr, errRespr := w.srv.DeployWorkflowArtifacts(req.Context(), resourceGroupNameParam, nameParam, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDeployWorkflowArtifactsSlot(req *http.Request) (*http.Response, error) { + if w.srv.DeployWorkflowArtifactsSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method DeployWorkflowArtifactsSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/deployWorkflowArtifacts` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.WorkflowArtifacts](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + var options *armappservice.WebAppsClientDeployWorkflowArtifactsSlotOptions + if !reflect.ValueOf(body).IsZero() { + options = &armappservice.WebAppsClientDeployWorkflowArtifactsSlotOptions{ + WorkflowArtifacts: &body, + } + } + respr, errRespr := w.srv.DeployWorkflowArtifactsSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDiscoverBackup(req *http.Request) (*http.Response, error) { + if w.srv.DiscoverBackup == nil { + return nil, &nonRetriableError{errors.New("fake for method DiscoverBackup not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/discoverbackup` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.RestoreRequest](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DiscoverBackup(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).RestoreRequest, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchDiscoverBackupSlot(req *http.Request) (*http.Response, error) { + if w.srv.DiscoverBackupSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method DiscoverBackupSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/discoverbackup` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.RestoreRequest](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.DiscoverBackupSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).RestoreRequest, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGenerateNewSitePublishingPassword(req *http.Request) (*http.Response, error) { + if w.srv.GenerateNewSitePublishingPassword == nil { + return nil, &nonRetriableError{errors.New("fake for method GenerateNewSitePublishingPassword not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/newpassword` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GenerateNewSitePublishingPassword(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGenerateNewSitePublishingPasswordSlot(req *http.Request) (*http.Response, error) { + if w.srv.GenerateNewSitePublishingPasswordSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GenerateNewSitePublishingPasswordSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/newpassword` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GenerateNewSitePublishingPasswordSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGet(req *http.Request) (*http.Response, error) { + if w.srv.Get == nil { + return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.Get(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).Site, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetAppSettingKeyVaultReference(req *http.Request) (*http.Response, error) { + if w.srv.GetAppSettingKeyVaultReference == nil { + return nil, &nonRetriableError{errors.New("fake for method GetAppSettingKeyVaultReference not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/configreferences/appsettings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + appSettingKeyParam, err := url.PathUnescape(matches[regex.SubexpIndex("appSettingKey")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetAppSettingKeyVaultReference(req.Context(), resourceGroupNameParam, nameParam, appSettingKeyParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).APIKVReference, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetAppSettingKeyVaultReferenceSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetAppSettingKeyVaultReferenceSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetAppSettingKeyVaultReferenceSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/configreferences/appsettings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + appSettingKeyParam, err := url.PathUnescape(matches[regex.SubexpIndex("appSettingKey")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetAppSettingKeyVaultReferenceSlot(req.Context(), resourceGroupNameParam, nameParam, appSettingKeyParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).APIKVReference, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewGetAppSettingsKeyVaultReferencesPager(req *http.Request) (*http.Response, error) { + if w.srv.NewGetAppSettingsKeyVaultReferencesPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewGetAppSettingsKeyVaultReferencesPager not implemented")} + } + newGetAppSettingsKeyVaultReferencesPager := w.newGetAppSettingsKeyVaultReferencesPager.get(req) + if newGetAppSettingsKeyVaultReferencesPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/configreferences/appsettings` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := w.srv.NewGetAppSettingsKeyVaultReferencesPager(resourceGroupNameParam, nameParam, nil) + newGetAppSettingsKeyVaultReferencesPager = &resp + w.newGetAppSettingsKeyVaultReferencesPager.add(req, newGetAppSettingsKeyVaultReferencesPager) + server.PagerResponderInjectNextLinks(newGetAppSettingsKeyVaultReferencesPager, req, func(page *armappservice.WebAppsClientGetAppSettingsKeyVaultReferencesResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newGetAppSettingsKeyVaultReferencesPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newGetAppSettingsKeyVaultReferencesPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newGetAppSettingsKeyVaultReferencesPager) { + w.newGetAppSettingsKeyVaultReferencesPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewGetAppSettingsKeyVaultReferencesSlotPager(req *http.Request) (*http.Response, error) { + if w.srv.NewGetAppSettingsKeyVaultReferencesSlotPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewGetAppSettingsKeyVaultReferencesSlotPager not implemented")} + } + newGetAppSettingsKeyVaultReferencesSlotPager := w.newGetAppSettingsKeyVaultReferencesSlotPager.get(req) + if newGetAppSettingsKeyVaultReferencesSlotPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/configreferences/appsettings` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + resp := w.srv.NewGetAppSettingsKeyVaultReferencesSlotPager(resourceGroupNameParam, nameParam, slotParam, nil) + newGetAppSettingsKeyVaultReferencesSlotPager = &resp + w.newGetAppSettingsKeyVaultReferencesSlotPager.add(req, newGetAppSettingsKeyVaultReferencesSlotPager) + server.PagerResponderInjectNextLinks(newGetAppSettingsKeyVaultReferencesSlotPager, req, func(page *armappservice.WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newGetAppSettingsKeyVaultReferencesSlotPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newGetAppSettingsKeyVaultReferencesSlotPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newGetAppSettingsKeyVaultReferencesSlotPager) { + w.newGetAppSettingsKeyVaultReferencesSlotPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetAuthSettings(req *http.Request) (*http.Response, error) { + if w.srv.GetAuthSettings == nil { + return nil, &nonRetriableError{errors.New("fake for method GetAuthSettings not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/authsettings/list` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetAuthSettings(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SiteAuthSettings, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetAuthSettingsSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetAuthSettingsSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetAuthSettingsSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/authsettings/list` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetAuthSettingsSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SiteAuthSettings, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetAuthSettingsV2(req *http.Request) (*http.Response, error) { + if w.srv.GetAuthSettingsV2 == nil { + return nil, &nonRetriableError{errors.New("fake for method GetAuthSettingsV2 not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/authsettingsV2/list` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetAuthSettingsV2(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SiteAuthSettingsV2, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetAuthSettingsV2Slot(req *http.Request) (*http.Response, error) { + if w.srv.GetAuthSettingsV2Slot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetAuthSettingsV2Slot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/authsettingsV2/list` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetAuthSettingsV2Slot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SiteAuthSettingsV2, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetAuthSettingsV2WithoutSecrets(req *http.Request) (*http.Response, error) { + if w.srv.GetAuthSettingsV2WithoutSecrets == nil { + return nil, &nonRetriableError{errors.New("fake for method GetAuthSettingsV2WithoutSecrets not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/authsettingsV2` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetAuthSettingsV2WithoutSecrets(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SiteAuthSettingsV2, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetAuthSettingsV2WithoutSecretsSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetAuthSettingsV2WithoutSecretsSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetAuthSettingsV2WithoutSecretsSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/authsettingsV2` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetAuthSettingsV2WithoutSecretsSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SiteAuthSettingsV2, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetBackupConfiguration(req *http.Request) (*http.Response, error) { + if w.srv.GetBackupConfiguration == nil { + return nil, &nonRetriableError{errors.New("fake for method GetBackupConfiguration not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/backup/list` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetBackupConfiguration(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).BackupRequest, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetBackupConfigurationSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetBackupConfigurationSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetBackupConfigurationSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/backup/list` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetBackupConfigurationSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).BackupRequest, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetBackupStatus(req *http.Request) (*http.Response, error) { + if w.srv.GetBackupStatus == nil { + return nil, &nonRetriableError{errors.New("fake for method GetBackupStatus not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/backups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + backupIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("backupId")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetBackupStatus(req.Context(), resourceGroupNameParam, nameParam, backupIDParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).BackupItem, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetBackupStatusSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetBackupStatusSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetBackupStatusSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/backups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + backupIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("backupId")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetBackupStatusSlot(req.Context(), resourceGroupNameParam, nameParam, backupIDParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).BackupItem, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetConfiguration(req *http.Request) (*http.Response, error) { + if w.srv.GetConfiguration == nil { + return nil, &nonRetriableError{errors.New("fake for method GetConfiguration not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/web` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetConfiguration(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SiteConfigResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetConfigurationSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetConfigurationSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetConfigurationSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/web` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetConfigurationSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SiteConfigResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetConfigurationSnapshot(req *http.Request) (*http.Response, error) { + if w.srv.GetConfigurationSnapshot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetConfigurationSnapshot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/web/snapshots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + snapshotIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("snapshotId")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetConfigurationSnapshot(req.Context(), resourceGroupNameParam, nameParam, snapshotIDParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SiteConfigResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetConfigurationSnapshotSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetConfigurationSnapshotSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetConfigurationSnapshotSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/web/snapshots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + snapshotIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("snapshotId")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetConfigurationSnapshotSlot(req.Context(), resourceGroupNameParam, nameParam, snapshotIDParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SiteConfigResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetContainerLogsZip(req *http.Request) (*http.Response, error) { + if w.srv.GetContainerLogsZip == nil { + return nil, &nonRetriableError{errors.New("fake for method GetContainerLogsZip not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/containerlogs/zip/download` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetContainerLogsZip(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, &server.ResponseOptions{ + Body: server.GetResponse(respr).Body, + ContentType: "application/octet-stream", + }) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetContainerLogsZipSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetContainerLogsZipSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetContainerLogsZipSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/containerlogs/zip/download` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetContainerLogsZipSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, &server.ResponseOptions{ + Body: server.GetResponse(respr).Body, + ContentType: "application/octet-stream", + }) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetContinuousWebJob(req *http.Request) (*http.Response, error) { + if w.srv.GetContinuousWebJob == nil { + return nil, &nonRetriableError{errors.New("fake for method GetContinuousWebJob not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/continuouswebjobs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + webJobNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("webJobName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetContinuousWebJob(req.Context(), resourceGroupNameParam, nameParam, webJobNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).ContinuousWebJob, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetContinuousWebJobSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetContinuousWebJobSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetContinuousWebJobSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/continuouswebjobs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + webJobNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("webJobName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetContinuousWebJobSlot(req.Context(), resourceGroupNameParam, nameParam, webJobNameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).ContinuousWebJob, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetDeployment(req *http.Request) (*http.Response, error) { + if w.srv.GetDeployment == nil { + return nil, &nonRetriableError{errors.New("fake for method GetDeployment not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + idParam, err := url.PathUnescape(matches[regex.SubexpIndex("id")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetDeployment(req.Context(), resourceGroupNameParam, nameParam, idParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).Deployment, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetDeploymentSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetDeploymentSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetDeploymentSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + idParam, err := url.PathUnescape(matches[regex.SubexpIndex("id")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetDeploymentSlot(req.Context(), resourceGroupNameParam, nameParam, idParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).Deployment, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetDiagnosticLogsConfiguration(req *http.Request) (*http.Response, error) { + if w.srv.GetDiagnosticLogsConfiguration == nil { + return nil, &nonRetriableError{errors.New("fake for method GetDiagnosticLogsConfiguration not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/logs` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetDiagnosticLogsConfiguration(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SiteLogsConfig, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetDiagnosticLogsConfigurationSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetDiagnosticLogsConfigurationSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetDiagnosticLogsConfigurationSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/logs` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetDiagnosticLogsConfigurationSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SiteLogsConfig, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetDomainOwnershipIdentifier(req *http.Request) (*http.Response, error) { + if w.srv.GetDomainOwnershipIdentifier == nil { + return nil, &nonRetriableError{errors.New("fake for method GetDomainOwnershipIdentifier not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/domainOwnershipIdentifiers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + domainOwnershipIdentifierNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("domainOwnershipIdentifierName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetDomainOwnershipIdentifier(req.Context(), resourceGroupNameParam, nameParam, domainOwnershipIdentifierNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).Identifier, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetDomainOwnershipIdentifierSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetDomainOwnershipIdentifierSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetDomainOwnershipIdentifierSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/domainOwnershipIdentifiers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + domainOwnershipIdentifierNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("domainOwnershipIdentifierName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetDomainOwnershipIdentifierSlot(req.Context(), resourceGroupNameParam, nameParam, domainOwnershipIdentifierNameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).Identifier, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetFtpAllowed(req *http.Request) (*http.Response, error) { + if w.srv.GetFtpAllowed == nil { + return nil, &nonRetriableError{errors.New("fake for method GetFtpAllowed not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/basicPublishingCredentialsPolicies/ftp` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetFtpAllowed(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).CsmPublishingCredentialsPoliciesEntity, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetFtpAllowedSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetFtpAllowedSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetFtpAllowedSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/basicPublishingCredentialsPolicies/ftp` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetFtpAllowedSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).CsmPublishingCredentialsPoliciesEntity, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetFunction(req *http.Request) (*http.Response, error) { + if w.srv.GetFunction == nil { + return nil, &nonRetriableError{errors.New("fake for method GetFunction not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/functions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + functionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("functionName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetFunction(req.Context(), resourceGroupNameParam, nameParam, functionNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).FunctionEnvelope, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetFunctionsAdminToken(req *http.Request) (*http.Response, error) { + if w.srv.GetFunctionsAdminToken == nil { + return nil, &nonRetriableError{errors.New("fake for method GetFunctionsAdminToken not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/functions/admin/token` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetFunctionsAdminToken(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).Value, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetFunctionsAdminTokenSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetFunctionsAdminTokenSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetFunctionsAdminTokenSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/functions/admin/token` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetFunctionsAdminTokenSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).Value, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetHostNameBinding(req *http.Request) (*http.Response, error) { + if w.srv.GetHostNameBinding == nil { + return nil, &nonRetriableError{errors.New("fake for method GetHostNameBinding not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hostNameBindings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + hostNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("hostName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetHostNameBinding(req.Context(), resourceGroupNameParam, nameParam, hostNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).HostNameBinding, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetHostNameBindingSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetHostNameBindingSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetHostNameBindingSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hostNameBindings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + hostNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("hostName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetHostNameBindingSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, hostNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).HostNameBinding, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetHybridConnection(req *http.Request) (*http.Response, error) { + if w.srv.GetHybridConnection == nil { + return nil, &nonRetriableError{errors.New("fake for method GetHybridConnection not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hybridConnectionNamespaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/relays/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + namespaceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("namespaceName")]) + if err != nil { + return nil, err + } + relayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("relayName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetHybridConnection(req.Context(), resourceGroupNameParam, nameParam, namespaceNameParam, relayNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).HybridConnection, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetHybridConnectionSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetHybridConnectionSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetHybridConnectionSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hybridConnectionNamespaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/relays/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 6 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + namespaceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("namespaceName")]) + if err != nil { + return nil, err + } + relayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("relayName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetHybridConnectionSlot(req.Context(), resourceGroupNameParam, nameParam, namespaceNameParam, relayNameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).HybridConnection, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetInstanceFunctionSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetInstanceFunctionSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetInstanceFunctionSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/functions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + functionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("functionName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetInstanceFunctionSlot(req.Context(), resourceGroupNameParam, nameParam, functionNameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).FunctionEnvelope, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetInstanceInfo(req *http.Request) (*http.Response, error) { + if w.srv.GetInstanceInfo == nil { + return nil, &nonRetriableError{errors.New("fake for method GetInstanceInfo not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/instances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + instanceIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("instanceId")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetInstanceInfo(req.Context(), resourceGroupNameParam, nameParam, instanceIDParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).WebSiteInstanceStatus, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetInstanceInfoSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetInstanceInfoSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetInstanceInfoSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/instances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + instanceIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("instanceId")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetInstanceInfoSlot(req.Context(), resourceGroupNameParam, nameParam, instanceIDParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).WebSiteInstanceStatus, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetInstanceMSDeployLog(req *http.Request) (*http.Response, error) { + if w.srv.GetInstanceMSDeployLog == nil { + return nil, &nonRetriableError{errors.New("fake for method GetInstanceMSDeployLog not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/instances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/extensions/MSDeploy/log` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + instanceIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("instanceId")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetInstanceMSDeployLog(req.Context(), resourceGroupNameParam, nameParam, instanceIDParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).MSDeployLog, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetInstanceMSDeployLogSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetInstanceMSDeployLogSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetInstanceMSDeployLogSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/instances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/extensions/MSDeploy/log` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + instanceIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("instanceId")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetInstanceMSDeployLogSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, instanceIDParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).MSDeployLog, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetInstanceMsDeployStatus(req *http.Request) (*http.Response, error) { + if w.srv.GetInstanceMsDeployStatus == nil { + return nil, &nonRetriableError{errors.New("fake for method GetInstanceMsDeployStatus not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/instances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/extensions/MSDeploy` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + instanceIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("instanceId")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetInstanceMsDeployStatus(req.Context(), resourceGroupNameParam, nameParam, instanceIDParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).MSDeployStatus, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetInstanceMsDeployStatusSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetInstanceMsDeployStatusSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetInstanceMsDeployStatusSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/instances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/extensions/MSDeploy` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + instanceIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("instanceId")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetInstanceMsDeployStatusSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, instanceIDParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).MSDeployStatus, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetInstanceProcess(req *http.Request) (*http.Response, error) { + if w.srv.GetInstanceProcess == nil { + return nil, &nonRetriableError{errors.New("fake for method GetInstanceProcess not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/instances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/processes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + processIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("processId")]) + if err != nil { + return nil, err + } + instanceIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("instanceId")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetInstanceProcess(req.Context(), resourceGroupNameParam, nameParam, processIDParam, instanceIDParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).ProcessInfo, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetInstanceProcessDump(req *http.Request) (*http.Response, error) { + if w.srv.GetInstanceProcessDump == nil { + return nil, &nonRetriableError{errors.New("fake for method GetInstanceProcessDump not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/instances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/processes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/dump` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + processIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("processId")]) + if err != nil { + return nil, err + } + instanceIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("instanceId")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetInstanceProcessDump(req.Context(), resourceGroupNameParam, nameParam, processIDParam, instanceIDParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, &server.ResponseOptions{ + Body: server.GetResponse(respr).Body, + ContentType: "application/octet-stream", + }) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetInstanceProcessDumpSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetInstanceProcessDumpSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetInstanceProcessDumpSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/instances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/processes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/dump` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 6 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + processIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("processId")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + instanceIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("instanceId")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetInstanceProcessDumpSlot(req.Context(), resourceGroupNameParam, nameParam, processIDParam, slotParam, instanceIDParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, &server.ResponseOptions{ + Body: server.GetResponse(respr).Body, + ContentType: "application/octet-stream", + }) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetInstanceProcessModule(req *http.Request) (*http.Response, error) { + if w.srv.GetInstanceProcessModule == nil { + return nil, &nonRetriableError{errors.New("fake for method GetInstanceProcessModule not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/instances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/processes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/modules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 6 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + processIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("processId")]) + if err != nil { + return nil, err + } + baseAddressParam, err := url.PathUnescape(matches[regex.SubexpIndex("baseAddress")]) + if err != nil { + return nil, err + } + instanceIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("instanceId")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetInstanceProcessModule(req.Context(), resourceGroupNameParam, nameParam, processIDParam, baseAddressParam, instanceIDParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).ProcessModuleInfo, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetInstanceProcessModuleSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetInstanceProcessModuleSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetInstanceProcessModuleSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/instances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/processes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/modules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 7 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + processIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("processId")]) + if err != nil { + return nil, err + } + baseAddressParam, err := url.PathUnescape(matches[regex.SubexpIndex("baseAddress")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + instanceIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("instanceId")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetInstanceProcessModuleSlot(req.Context(), resourceGroupNameParam, nameParam, processIDParam, baseAddressParam, slotParam, instanceIDParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).ProcessModuleInfo, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetInstanceProcessSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetInstanceProcessSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetInstanceProcessSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/instances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/processes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 6 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + processIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("processId")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + instanceIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("instanceId")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetInstanceProcessSlot(req.Context(), resourceGroupNameParam, nameParam, processIDParam, slotParam, instanceIDParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).ProcessInfo, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetInstanceWorkflowSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetInstanceWorkflowSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetInstanceWorkflowSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/workflows/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + workflowNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("workflowName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetInstanceWorkflowSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, workflowNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).WorkflowEnvelope, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetMSDeployLog(req *http.Request) (*http.Response, error) { + if w.srv.GetMSDeployLog == nil { + return nil, &nonRetriableError{errors.New("fake for method GetMSDeployLog not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/extensions/MSDeploy/log` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetMSDeployLog(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).MSDeployLog, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetMSDeployLogSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetMSDeployLogSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetMSDeployLogSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/extensions/MSDeploy/log` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetMSDeployLogSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).MSDeployLog, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetMSDeployStatus(req *http.Request) (*http.Response, error) { + if w.srv.GetMSDeployStatus == nil { + return nil, &nonRetriableError{errors.New("fake for method GetMSDeployStatus not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/extensions/MSDeploy` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetMSDeployStatus(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).MSDeployStatus, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetMSDeployStatusSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetMSDeployStatusSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetMSDeployStatusSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/extensions/MSDeploy` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetMSDeployStatusSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).MSDeployStatus, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetMigrateMySQLStatus(req *http.Request) (*http.Response, error) { + if w.srv.GetMigrateMySQLStatus == nil { + return nil, &nonRetriableError{errors.New("fake for method GetMigrateMySQLStatus not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/migratemysql/status` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetMigrateMySQLStatus(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).MigrateMySQLStatus, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetMigrateMySQLStatusSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetMigrateMySQLStatusSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetMigrateMySQLStatusSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/migratemysql/status` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetMigrateMySQLStatusSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).MigrateMySQLStatus, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetNetworkTraceOperation(req *http.Request) (*http.Response, error) { + if w.srv.GetNetworkTraceOperation == nil { + return nil, &nonRetriableError{errors.New("fake for method GetNetworkTraceOperation not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkTrace/operationresults/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + operationIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("operationId")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetNetworkTraceOperation(req.Context(), resourceGroupNameParam, nameParam, operationIDParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusAccepted}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).NetworkTraceArray, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetNetworkTraceOperationSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetNetworkTraceOperationSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetNetworkTraceOperationSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkTrace/operationresults/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + operationIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("operationId")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetNetworkTraceOperationSlot(req.Context(), resourceGroupNameParam, nameParam, operationIDParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusAccepted}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).NetworkTraceArray, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetNetworkTraceOperationSlotV2(req *http.Request) (*http.Response, error) { + if w.srv.GetNetworkTraceOperationSlotV2 == nil { + return nil, &nonRetriableError{errors.New("fake for method GetNetworkTraceOperationSlotV2 not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkTraces/current/operationresults/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + operationIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("operationId")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetNetworkTraceOperationSlotV2(req.Context(), resourceGroupNameParam, nameParam, operationIDParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusAccepted}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).NetworkTraceArray, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetNetworkTraceOperationV2(req *http.Request) (*http.Response, error) { + if w.srv.GetNetworkTraceOperationV2 == nil { + return nil, &nonRetriableError{errors.New("fake for method GetNetworkTraceOperationV2 not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkTraces/current/operationresults/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + operationIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("operationId")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetNetworkTraceOperationV2(req.Context(), resourceGroupNameParam, nameParam, operationIDParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusAccepted}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).NetworkTraceArray, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetNetworkTraces(req *http.Request) (*http.Response, error) { + if w.srv.GetNetworkTraces == nil { + return nil, &nonRetriableError{errors.New("fake for method GetNetworkTraces not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkTrace/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + operationIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("operationId")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetNetworkTraces(req.Context(), resourceGroupNameParam, nameParam, operationIDParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).NetworkTraceArray, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetNetworkTracesSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetNetworkTracesSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetNetworkTracesSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkTrace/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + operationIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("operationId")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetNetworkTracesSlot(req.Context(), resourceGroupNameParam, nameParam, operationIDParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).NetworkTraceArray, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetNetworkTracesSlotV2(req *http.Request) (*http.Response, error) { + if w.srv.GetNetworkTracesSlotV2 == nil { + return nil, &nonRetriableError{errors.New("fake for method GetNetworkTracesSlotV2 not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkTraces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + operationIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("operationId")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetNetworkTracesSlotV2(req.Context(), resourceGroupNameParam, nameParam, operationIDParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).NetworkTraceArray, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetNetworkTracesV2(req *http.Request) (*http.Response, error) { + if w.srv.GetNetworkTracesV2 == nil { + return nil, &nonRetriableError{errors.New("fake for method GetNetworkTracesV2 not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkTraces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + operationIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("operationId")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetNetworkTracesV2(req.Context(), resourceGroupNameParam, nameParam, operationIDParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).NetworkTraceArray, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetOneDeployStatus(req *http.Request) (*http.Response, error) { + if w.srv.GetOneDeployStatus == nil { + return nil, &nonRetriableError{errors.New("fake for method GetOneDeployStatus not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/extensions/onedeploy` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetOneDeployStatus(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).Interface, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetPremierAddOn(req *http.Request) (*http.Response, error) { + if w.srv.GetPremierAddOn == nil { + return nil, &nonRetriableError{errors.New("fake for method GetPremierAddOn not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/premieraddons/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + premierAddOnNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("premierAddOnName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetPremierAddOn(req.Context(), resourceGroupNameParam, nameParam, premierAddOnNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).PremierAddOn, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetPremierAddOnSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetPremierAddOnSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetPremierAddOnSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/premieraddons/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + premierAddOnNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("premierAddOnName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetPremierAddOnSlot(req.Context(), resourceGroupNameParam, nameParam, premierAddOnNameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).PremierAddOn, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetPrivateAccess(req *http.Request) (*http.Response, error) { + if w.srv.GetPrivateAccess == nil { + return nil, &nonRetriableError{errors.New("fake for method GetPrivateAccess not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateAccess/virtualNetworks` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetPrivateAccess(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).PrivateAccess, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetPrivateAccessSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetPrivateAccessSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetPrivateAccessSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateAccess/virtualNetworks` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetPrivateAccessSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).PrivateAccess, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetPrivateEndpointConnection(req *http.Request) (*http.Response, error) { + if w.srv.GetPrivateEndpointConnection == nil { + return nil, &nonRetriableError{errors.New("fake for method GetPrivateEndpointConnection not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateEndpointConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + privateEndpointConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("privateEndpointConnectionName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetPrivateEndpointConnection(req.Context(), resourceGroupNameParam, nameParam, privateEndpointConnectionNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).RemotePrivateEndpointConnectionARMResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewGetPrivateEndpointConnectionListPager(req *http.Request) (*http.Response, error) { + if w.srv.NewGetPrivateEndpointConnectionListPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewGetPrivateEndpointConnectionListPager not implemented")} + } + newGetPrivateEndpointConnectionListPager := w.newGetPrivateEndpointConnectionListPager.get(req) + if newGetPrivateEndpointConnectionListPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateEndpointConnections` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := w.srv.NewGetPrivateEndpointConnectionListPager(resourceGroupNameParam, nameParam, nil) + newGetPrivateEndpointConnectionListPager = &resp + w.newGetPrivateEndpointConnectionListPager.add(req, newGetPrivateEndpointConnectionListPager) + server.PagerResponderInjectNextLinks(newGetPrivateEndpointConnectionListPager, req, func(page *armappservice.WebAppsClientGetPrivateEndpointConnectionListResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newGetPrivateEndpointConnectionListPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newGetPrivateEndpointConnectionListPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newGetPrivateEndpointConnectionListPager) { + w.newGetPrivateEndpointConnectionListPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewGetPrivateEndpointConnectionListSlotPager(req *http.Request) (*http.Response, error) { + if w.srv.NewGetPrivateEndpointConnectionListSlotPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewGetPrivateEndpointConnectionListSlotPager not implemented")} + } + newGetPrivateEndpointConnectionListSlotPager := w.newGetPrivateEndpointConnectionListSlotPager.get(req) + if newGetPrivateEndpointConnectionListSlotPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateEndpointConnections` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + resp := w.srv.NewGetPrivateEndpointConnectionListSlotPager(resourceGroupNameParam, nameParam, slotParam, nil) + newGetPrivateEndpointConnectionListSlotPager = &resp + w.newGetPrivateEndpointConnectionListSlotPager.add(req, newGetPrivateEndpointConnectionListSlotPager) + server.PagerResponderInjectNextLinks(newGetPrivateEndpointConnectionListSlotPager, req, func(page *armappservice.WebAppsClientGetPrivateEndpointConnectionListSlotResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newGetPrivateEndpointConnectionListSlotPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newGetPrivateEndpointConnectionListSlotPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newGetPrivateEndpointConnectionListSlotPager) { + w.newGetPrivateEndpointConnectionListSlotPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetPrivateEndpointConnectionSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetPrivateEndpointConnectionSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetPrivateEndpointConnectionSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateEndpointConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + privateEndpointConnectionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("privateEndpointConnectionName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetPrivateEndpointConnectionSlot(req.Context(), resourceGroupNameParam, nameParam, privateEndpointConnectionNameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).RemotePrivateEndpointConnectionARMResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetPrivateLinkResources(req *http.Request) (*http.Response, error) { + if w.srv.GetPrivateLinkResources == nil { + return nil, &nonRetriableError{errors.New("fake for method GetPrivateLinkResources not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateLinkResources` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetPrivateLinkResources(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).PrivateLinkResourcesWrapper, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetPrivateLinkResourcesSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetPrivateLinkResourcesSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetPrivateLinkResourcesSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateLinkResources` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetPrivateLinkResourcesSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).PrivateLinkResourcesWrapper, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetProcess(req *http.Request) (*http.Response, error) { + if w.srv.GetProcess == nil { + return nil, &nonRetriableError{errors.New("fake for method GetProcess not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/processes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + processIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("processId")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetProcess(req.Context(), resourceGroupNameParam, nameParam, processIDParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).ProcessInfo, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetProcessDump(req *http.Request) (*http.Response, error) { + if w.srv.GetProcessDump == nil { + return nil, &nonRetriableError{errors.New("fake for method GetProcessDump not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/processes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/dump` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + processIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("processId")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetProcessDump(req.Context(), resourceGroupNameParam, nameParam, processIDParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, &server.ResponseOptions{ + Body: server.GetResponse(respr).Body, + ContentType: "application/octet-stream", + }) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetProcessDumpSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetProcessDumpSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetProcessDumpSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/processes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/dump` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + processIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("processId")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetProcessDumpSlot(req.Context(), resourceGroupNameParam, nameParam, processIDParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, &server.ResponseOptions{ + Body: server.GetResponse(respr).Body, + ContentType: "application/octet-stream", + }) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetProcessModule(req *http.Request) (*http.Response, error) { + if w.srv.GetProcessModule == nil { + return nil, &nonRetriableError{errors.New("fake for method GetProcessModule not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/processes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/modules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + processIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("processId")]) + if err != nil { + return nil, err + } + baseAddressParam, err := url.PathUnescape(matches[regex.SubexpIndex("baseAddress")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetProcessModule(req.Context(), resourceGroupNameParam, nameParam, processIDParam, baseAddressParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).ProcessModuleInfo, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetProcessModuleSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetProcessModuleSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetProcessModuleSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/processes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/modules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 6 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + processIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("processId")]) + if err != nil { + return nil, err + } + baseAddressParam, err := url.PathUnescape(matches[regex.SubexpIndex("baseAddress")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetProcessModuleSlot(req.Context(), resourceGroupNameParam, nameParam, processIDParam, baseAddressParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).ProcessModuleInfo, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetProcessSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetProcessSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetProcessSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/processes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + processIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("processId")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetProcessSlot(req.Context(), resourceGroupNameParam, nameParam, processIDParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).ProcessInfo, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchBeginGetProductionSiteDeploymentStatus(req *http.Request) (*http.Response, error) { + if w.srv.BeginGetProductionSiteDeploymentStatus == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginGetProductionSiteDeploymentStatus not implemented")} + } + beginGetProductionSiteDeploymentStatus := w.beginGetProductionSiteDeploymentStatus.get(req) + if beginGetProductionSiteDeploymentStatus == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/deploymentStatus/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + deploymentStatusIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentStatusId")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.BeginGetProductionSiteDeploymentStatus(req.Context(), resourceGroupNameParam, nameParam, deploymentStatusIDParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginGetProductionSiteDeploymentStatus = &respr + w.beginGetProductionSiteDeploymentStatus.add(req, beginGetProductionSiteDeploymentStatus) + } + + resp, err := server.PollerResponderNext(beginGetProductionSiteDeploymentStatus, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + w.beginGetProductionSiteDeploymentStatus.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginGetProductionSiteDeploymentStatus) { + w.beginGetProductionSiteDeploymentStatus.remove(req) + } + + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetPublicCertificate(req *http.Request) (*http.Response, error) { + if w.srv.GetPublicCertificate == nil { + return nil, &nonRetriableError{errors.New("fake for method GetPublicCertificate not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/publicCertificates/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + publicCertificateNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("publicCertificateName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetPublicCertificate(req.Context(), resourceGroupNameParam, nameParam, publicCertificateNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).PublicCertificate, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetPublicCertificateSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetPublicCertificateSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetPublicCertificateSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/publicCertificates/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + publicCertificateNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("publicCertificateName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetPublicCertificateSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, publicCertificateNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).PublicCertificate, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetRelayServiceConnection(req *http.Request) (*http.Response, error) { + if w.srv.GetRelayServiceConnection == nil { + return nil, &nonRetriableError{errors.New("fake for method GetRelayServiceConnection not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hybridconnection/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + entityNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("entityName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetRelayServiceConnection(req.Context(), resourceGroupNameParam, nameParam, entityNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).RelayServiceConnectionEntity, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetRelayServiceConnectionSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetRelayServiceConnectionSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetRelayServiceConnectionSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hybridconnection/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + entityNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("entityName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetRelayServiceConnectionSlot(req.Context(), resourceGroupNameParam, nameParam, entityNameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).RelayServiceConnectionEntity, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetScmAllowed(req *http.Request) (*http.Response, error) { + if w.srv.GetScmAllowed == nil { + return nil, &nonRetriableError{errors.New("fake for method GetScmAllowed not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/basicPublishingCredentialsPolicies/scm` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetScmAllowed(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).CsmPublishingCredentialsPoliciesEntity, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetScmAllowedSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetScmAllowedSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetScmAllowedSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/basicPublishingCredentialsPolicies/scm` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetScmAllowedSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).CsmPublishingCredentialsPoliciesEntity, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetSiteConnectionStringKeyVaultReference(req *http.Request) (*http.Response, error) { + if w.srv.GetSiteConnectionStringKeyVaultReference == nil { + return nil, &nonRetriableError{errors.New("fake for method GetSiteConnectionStringKeyVaultReference not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/configreferences/connectionstrings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + connectionStringKeyParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectionStringKey")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetSiteConnectionStringKeyVaultReference(req.Context(), resourceGroupNameParam, nameParam, connectionStringKeyParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).APIKVReference, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetSiteConnectionStringKeyVaultReferenceSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetSiteConnectionStringKeyVaultReferenceSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetSiteConnectionStringKeyVaultReferenceSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/configreferences/connectionstrings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + connectionStringKeyParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectionStringKey")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetSiteConnectionStringKeyVaultReferenceSlot(req.Context(), resourceGroupNameParam, nameParam, connectionStringKeyParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).APIKVReference, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewGetSiteConnectionStringKeyVaultReferencesPager(req *http.Request) (*http.Response, error) { + if w.srv.NewGetSiteConnectionStringKeyVaultReferencesPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewGetSiteConnectionStringKeyVaultReferencesPager not implemented")} + } + newGetSiteConnectionStringKeyVaultReferencesPager := w.newGetSiteConnectionStringKeyVaultReferencesPager.get(req) + if newGetSiteConnectionStringKeyVaultReferencesPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/configreferences/connectionstrings` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := w.srv.NewGetSiteConnectionStringKeyVaultReferencesPager(resourceGroupNameParam, nameParam, nil) + newGetSiteConnectionStringKeyVaultReferencesPager = &resp + w.newGetSiteConnectionStringKeyVaultReferencesPager.add(req, newGetSiteConnectionStringKeyVaultReferencesPager) + server.PagerResponderInjectNextLinks(newGetSiteConnectionStringKeyVaultReferencesPager, req, func(page *armappservice.WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newGetSiteConnectionStringKeyVaultReferencesPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newGetSiteConnectionStringKeyVaultReferencesPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newGetSiteConnectionStringKeyVaultReferencesPager) { + w.newGetSiteConnectionStringKeyVaultReferencesPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewGetSiteConnectionStringKeyVaultReferencesSlotPager(req *http.Request) (*http.Response, error) { + if w.srv.NewGetSiteConnectionStringKeyVaultReferencesSlotPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewGetSiteConnectionStringKeyVaultReferencesSlotPager not implemented")} + } + newGetSiteConnectionStringKeyVaultReferencesSlotPager := w.newGetSiteConnectionStringKeyVaultReferencesSlotPager.get(req) + if newGetSiteConnectionStringKeyVaultReferencesSlotPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/configreferences/connectionstrings` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + resp := w.srv.NewGetSiteConnectionStringKeyVaultReferencesSlotPager(resourceGroupNameParam, nameParam, slotParam, nil) + newGetSiteConnectionStringKeyVaultReferencesSlotPager = &resp + w.newGetSiteConnectionStringKeyVaultReferencesSlotPager.add(req, newGetSiteConnectionStringKeyVaultReferencesSlotPager) + server.PagerResponderInjectNextLinks(newGetSiteConnectionStringKeyVaultReferencesSlotPager, req, func(page *armappservice.WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newGetSiteConnectionStringKeyVaultReferencesSlotPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newGetSiteConnectionStringKeyVaultReferencesSlotPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newGetSiteConnectionStringKeyVaultReferencesSlotPager) { + w.newGetSiteConnectionStringKeyVaultReferencesSlotPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetSiteExtension(req *http.Request) (*http.Response, error) { + if w.srv.GetSiteExtension == nil { + return nil, &nonRetriableError{errors.New("fake for method GetSiteExtension not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/siteextensions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + siteExtensionIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("siteExtensionId")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetSiteExtension(req.Context(), resourceGroupNameParam, nameParam, siteExtensionIDParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SiteExtensionInfo, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetSiteExtensionSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetSiteExtensionSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetSiteExtensionSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/siteextensions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + siteExtensionIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("siteExtensionId")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetSiteExtensionSlot(req.Context(), resourceGroupNameParam, nameParam, siteExtensionIDParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SiteExtensionInfo, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetSitePhpErrorLogFlag(req *http.Request) (*http.Response, error) { + if w.srv.GetSitePhpErrorLogFlag == nil { + return nil, &nonRetriableError{errors.New("fake for method GetSitePhpErrorLogFlag not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/phplogging` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetSitePhpErrorLogFlag(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SitePhpErrorLogFlag, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetSitePhpErrorLogFlagSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetSitePhpErrorLogFlagSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetSitePhpErrorLogFlagSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/phplogging` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetSitePhpErrorLogFlagSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SitePhpErrorLogFlag, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).Site, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchBeginGetSlotSiteDeploymentStatusSlot(req *http.Request) (*http.Response, error) { + if w.srv.BeginGetSlotSiteDeploymentStatusSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginGetSlotSiteDeploymentStatusSlot not implemented")} + } + beginGetSlotSiteDeploymentStatusSlot := w.beginGetSlotSiteDeploymentStatusSlot.get(req) + if beginGetSlotSiteDeploymentStatusSlot == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/deploymentStatus/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + deploymentStatusIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("deploymentStatusId")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.BeginGetSlotSiteDeploymentStatusSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, deploymentStatusIDParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginGetSlotSiteDeploymentStatusSlot = &respr + w.beginGetSlotSiteDeploymentStatusSlot.add(req, beginGetSlotSiteDeploymentStatusSlot) + } + + resp, err := server.PollerResponderNext(beginGetSlotSiteDeploymentStatusSlot, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + w.beginGetSlotSiteDeploymentStatusSlot.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginGetSlotSiteDeploymentStatusSlot) { + w.beginGetSlotSiteDeploymentStatusSlot.remove(req) + } + + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetSourceControl(req *http.Request) (*http.Response, error) { + if w.srv.GetSourceControl == nil { + return nil, &nonRetriableError{errors.New("fake for method GetSourceControl not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/sourcecontrols/web` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetSourceControl(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusCreated, http.StatusAccepted}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated, http.StatusAccepted", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SiteSourceControl, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetSourceControlSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetSourceControlSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetSourceControlSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/sourcecontrols/web` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetSourceControlSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusCreated, http.StatusAccepted}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated, http.StatusAccepted", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SiteSourceControl, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetSwiftVirtualNetworkConnection(req *http.Request) (*http.Response, error) { + if w.srv.GetSwiftVirtualNetworkConnection == nil { + return nil, &nonRetriableError{errors.New("fake for method GetSwiftVirtualNetworkConnection not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkConfig/virtualNetwork` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetSwiftVirtualNetworkConnection(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SwiftVirtualNetwork, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetSwiftVirtualNetworkConnectionSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetSwiftVirtualNetworkConnectionSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetSwiftVirtualNetworkConnectionSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkConfig/virtualNetwork` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetSwiftVirtualNetworkConnectionSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SwiftVirtualNetwork, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetTriggeredWebJob(req *http.Request) (*http.Response, error) { + if w.srv.GetTriggeredWebJob == nil { + return nil, &nonRetriableError{errors.New("fake for method GetTriggeredWebJob not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/triggeredwebjobs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + webJobNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("webJobName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetTriggeredWebJob(req.Context(), resourceGroupNameParam, nameParam, webJobNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).TriggeredWebJob, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetTriggeredWebJobHistory(req *http.Request) (*http.Response, error) { + if w.srv.GetTriggeredWebJobHistory == nil { + return nil, &nonRetriableError{errors.New("fake for method GetTriggeredWebJobHistory not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/triggeredwebjobs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/history/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + webJobNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("webJobName")]) + if err != nil { + return nil, err + } + idParam, err := url.PathUnescape(matches[regex.SubexpIndex("id")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetTriggeredWebJobHistory(req.Context(), resourceGroupNameParam, nameParam, webJobNameParam, idParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).TriggeredJobHistory, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetTriggeredWebJobHistorySlot(req *http.Request) (*http.Response, error) { + if w.srv.GetTriggeredWebJobHistorySlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetTriggeredWebJobHistorySlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/triggeredwebjobs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/history/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 6 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + webJobNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("webJobName")]) + if err != nil { + return nil, err + } + idParam, err := url.PathUnescape(matches[regex.SubexpIndex("id")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetTriggeredWebJobHistorySlot(req.Context(), resourceGroupNameParam, nameParam, webJobNameParam, idParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).TriggeredJobHistory, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetTriggeredWebJobSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetTriggeredWebJobSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetTriggeredWebJobSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/triggeredwebjobs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + webJobNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("webJobName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetTriggeredWebJobSlot(req.Context(), resourceGroupNameParam, nameParam, webJobNameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).TriggeredWebJob, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetVnetConnection(req *http.Request) (*http.Response, error) { + if w.srv.GetVnetConnection == nil { + return nil, &nonRetriableError{errors.New("fake for method GetVnetConnection not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + vnetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vnetName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetVnetConnection(req.Context(), resourceGroupNameParam, nameParam, vnetNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).VnetInfoResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetVnetConnectionGateway(req *http.Request) (*http.Response, error) { + if w.srv.GetVnetConnectionGateway == nil { + return nil, &nonRetriableError{errors.New("fake for method GetVnetConnectionGateway not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/gateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + vnetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vnetName")]) + if err != nil { + return nil, err + } + gatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetVnetConnectionGateway(req.Context(), resourceGroupNameParam, nameParam, vnetNameParam, gatewayNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).VnetGateway, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetVnetConnectionGatewaySlot(req *http.Request) (*http.Response, error) { + if w.srv.GetVnetConnectionGatewaySlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetVnetConnectionGatewaySlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/gateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 6 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + vnetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vnetName")]) + if err != nil { + return nil, err + } + gatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetVnetConnectionGatewaySlot(req.Context(), resourceGroupNameParam, nameParam, vnetNameParam, gatewayNameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).VnetGateway, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetVnetConnectionSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetVnetConnectionSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetVnetConnectionSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + vnetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vnetName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetVnetConnectionSlot(req.Context(), resourceGroupNameParam, nameParam, vnetNameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).VnetInfoResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetWebJob(req *http.Request) (*http.Response, error) { + if w.srv.GetWebJob == nil { + return nil, &nonRetriableError{errors.New("fake for method GetWebJob not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/webjobs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + webJobNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("webJobName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetWebJob(req.Context(), resourceGroupNameParam, nameParam, webJobNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).WebJob, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetWebJobSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetWebJobSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetWebJobSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/webjobs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + webJobNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("webJobName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetWebJobSlot(req.Context(), resourceGroupNameParam, nameParam, webJobNameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).WebJob, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetWebSiteContainerLogs(req *http.Request) (*http.Response, error) { + if w.srv.GetWebSiteContainerLogs == nil { + return nil, &nonRetriableError{errors.New("fake for method GetWebSiteContainerLogs not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/containerlogs` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetWebSiteContainerLogs(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, &server.ResponseOptions{ + Body: server.GetResponse(respr).Body, + ContentType: "application/octet-stream", + }) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetWebSiteContainerLogsSlot(req *http.Request) (*http.Response, error) { + if w.srv.GetWebSiteContainerLogsSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method GetWebSiteContainerLogsSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/containerlogs` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetWebSiteContainerLogsSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, &server.ResponseOptions{ + Body: server.GetResponse(respr).Body, + ContentType: "application/octet-stream", + }) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchGetWorkflow(req *http.Request) (*http.Response, error) { + if w.srv.GetWorkflow == nil { + return nil, &nonRetriableError{errors.New("fake for method GetWorkflow not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/workflows/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + workflowNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("workflowName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetWorkflow(req.Context(), resourceGroupNameParam, nameParam, workflowNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).WorkflowEnvelope, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchBeginInstallSiteExtension(req *http.Request) (*http.Response, error) { + if w.srv.BeginInstallSiteExtension == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginInstallSiteExtension not implemented")} + } + beginInstallSiteExtension := w.beginInstallSiteExtension.get(req) + if beginInstallSiteExtension == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/siteextensions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + siteExtensionIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("siteExtensionId")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.BeginInstallSiteExtension(req.Context(), resourceGroupNameParam, nameParam, siteExtensionIDParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginInstallSiteExtension = &respr + w.beginInstallSiteExtension.add(req, beginInstallSiteExtension) + } + + resp, err := server.PollerResponderNext(beginInstallSiteExtension, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + w.beginInstallSiteExtension.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} + } + if !server.PollerResponderMore(beginInstallSiteExtension) { + w.beginInstallSiteExtension.remove(req) + } + + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchBeginInstallSiteExtensionSlot(req *http.Request) (*http.Response, error) { + if w.srv.BeginInstallSiteExtensionSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginInstallSiteExtensionSlot not implemented")} + } + beginInstallSiteExtensionSlot := w.beginInstallSiteExtensionSlot.get(req) + if beginInstallSiteExtensionSlot == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/siteextensions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + siteExtensionIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("siteExtensionId")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.BeginInstallSiteExtensionSlot(req.Context(), resourceGroupNameParam, nameParam, siteExtensionIDParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginInstallSiteExtensionSlot = &respr + w.beginInstallSiteExtensionSlot.add(req, beginInstallSiteExtensionSlot) + } + + resp, err := server.PollerResponderNext(beginInstallSiteExtensionSlot, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + w.beginInstallSiteExtensionSlot.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} + } + if !server.PollerResponderMore(beginInstallSiteExtensionSlot) { + w.beginInstallSiteExtensionSlot.remove(req) + } + + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchIsCloneable(req *http.Request) (*http.Response, error) { + if w.srv.IsCloneable == nil { + return nil, &nonRetriableError{errors.New("fake for method IsCloneable not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/iscloneable` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.IsCloneable(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SiteCloneability, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchIsCloneableSlot(req *http.Request) (*http.Response, error) { + if w.srv.IsCloneableSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method IsCloneableSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/iscloneable` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.IsCloneableSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SiteCloneability, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} + } + newListPager := w.newListPager.get(req) + if newListPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 1 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resp := w.srv.NewListPager(nil) + newListPager = &resp + w.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armappservice.WebAppsClientListResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListPager) { + w.newListPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListApplicationSettings(req *http.Request) (*http.Response, error) { + if w.srv.ListApplicationSettings == nil { + return nil, &nonRetriableError{errors.New("fake for method ListApplicationSettings not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/appsettings/list` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListApplicationSettings(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).StringDictionary, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListApplicationSettingsSlot(req *http.Request) (*http.Response, error) { + if w.srv.ListApplicationSettingsSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method ListApplicationSettingsSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/appsettings/list` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListApplicationSettingsSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).StringDictionary, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListAzureStorageAccounts(req *http.Request) (*http.Response, error) { + if w.srv.ListAzureStorageAccounts == nil { + return nil, &nonRetriableError{errors.New("fake for method ListAzureStorageAccounts not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/azurestorageaccounts/list` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListAzureStorageAccounts(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).AzureStoragePropertyDictionaryResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListAzureStorageAccountsSlot(req *http.Request) (*http.Response, error) { + if w.srv.ListAzureStorageAccountsSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method ListAzureStorageAccountsSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/azurestorageaccounts/list` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListAzureStorageAccountsSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).AzureStoragePropertyDictionaryResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListBackupStatusSecrets(req *http.Request) (*http.Response, error) { + if w.srv.ListBackupStatusSecrets == nil { + return nil, &nonRetriableError{errors.New("fake for method ListBackupStatusSecrets not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/backups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/list` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.BackupRequest](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + backupIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("backupId")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListBackupStatusSecrets(req.Context(), resourceGroupNameParam, nameParam, backupIDParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).BackupItem, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListBackupStatusSecretsSlot(req *http.Request) (*http.Response, error) { + if w.srv.ListBackupStatusSecretsSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method ListBackupStatusSecretsSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/backups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/list` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.BackupRequest](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + backupIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("backupId")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListBackupStatusSecretsSlot(req.Context(), resourceGroupNameParam, nameParam, backupIDParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).BackupItem, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListBackupsPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListBackupsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListBackupsPager not implemented")} + } + newListBackupsPager := w.newListBackupsPager.get(req) + if newListBackupsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/backups` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListBackupsPager(resourceGroupNameParam, nameParam, nil) + newListBackupsPager = &resp + w.newListBackupsPager.add(req, newListBackupsPager) + server.PagerResponderInjectNextLinks(newListBackupsPager, req, func(page *armappservice.WebAppsClientListBackupsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListBackupsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListBackupsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListBackupsPager) { + w.newListBackupsPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListBackupsSlotPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListBackupsSlotPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListBackupsSlotPager not implemented")} + } + newListBackupsSlotPager := w.newListBackupsSlotPager.get(req) + if newListBackupsSlotPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/backups` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListBackupsSlotPager(resourceGroupNameParam, nameParam, slotParam, nil) + newListBackupsSlotPager = &resp + w.newListBackupsSlotPager.add(req, newListBackupsSlotPager) + server.PagerResponderInjectNextLinks(newListBackupsSlotPager, req, func(page *armappservice.WebAppsClientListBackupsSlotResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListBackupsSlotPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListBackupsSlotPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListBackupsSlotPager) { + w.newListBackupsSlotPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListBasicPublishingCredentialsPoliciesPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListBasicPublishingCredentialsPoliciesPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListBasicPublishingCredentialsPoliciesPager not implemented")} + } + newListBasicPublishingCredentialsPoliciesPager := w.newListBasicPublishingCredentialsPoliciesPager.get(req) + if newListBasicPublishingCredentialsPoliciesPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/basicPublishingCredentialsPolicies` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListBasicPublishingCredentialsPoliciesPager(resourceGroupNameParam, nameParam, nil) + newListBasicPublishingCredentialsPoliciesPager = &resp + w.newListBasicPublishingCredentialsPoliciesPager.add(req, newListBasicPublishingCredentialsPoliciesPager) + server.PagerResponderInjectNextLinks(newListBasicPublishingCredentialsPoliciesPager, req, func(page *armappservice.WebAppsClientListBasicPublishingCredentialsPoliciesResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListBasicPublishingCredentialsPoliciesPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListBasicPublishingCredentialsPoliciesPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListBasicPublishingCredentialsPoliciesPager) { + w.newListBasicPublishingCredentialsPoliciesPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListBasicPublishingCredentialsPoliciesSlotPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListBasicPublishingCredentialsPoliciesSlotPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListBasicPublishingCredentialsPoliciesSlotPager not implemented")} + } + newListBasicPublishingCredentialsPoliciesSlotPager := w.newListBasicPublishingCredentialsPoliciesSlotPager.get(req) + if newListBasicPublishingCredentialsPoliciesSlotPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/basicPublishingCredentialsPolicies` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListBasicPublishingCredentialsPoliciesSlotPager(resourceGroupNameParam, nameParam, slotParam, nil) + newListBasicPublishingCredentialsPoliciesSlotPager = &resp + w.newListBasicPublishingCredentialsPoliciesSlotPager.add(req, newListBasicPublishingCredentialsPoliciesSlotPager) + server.PagerResponderInjectNextLinks(newListBasicPublishingCredentialsPoliciesSlotPager, req, func(page *armappservice.WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListBasicPublishingCredentialsPoliciesSlotPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListBasicPublishingCredentialsPoliciesSlotPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListBasicPublishingCredentialsPoliciesSlotPager) { + w.newListBasicPublishingCredentialsPoliciesSlotPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListByResourceGroupPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListByResourceGroupPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListByResourceGroupPager not implemented")} + } + newListByResourceGroupPager := w.newListByResourceGroupPager.get(req) + if newListByResourceGroupPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 2 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + includeSlotsUnescaped, err := url.QueryUnescape(qp.Get("includeSlots")) + if err != nil { + return nil, err + } + includeSlotsParam, err := parseOptional(includeSlotsUnescaped, strconv.ParseBool) + if err != nil { + return nil, err + } + var options *armappservice.WebAppsClientListByResourceGroupOptions + if includeSlotsParam != nil { + options = &armappservice.WebAppsClientListByResourceGroupOptions{ + IncludeSlots: includeSlotsParam, + } + } + resp := w.srv.NewListByResourceGroupPager(resourceGroupNameParam, options) + newListByResourceGroupPager = &resp + w.newListByResourceGroupPager.add(req, newListByResourceGroupPager) + server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armappservice.WebAppsClientListByResourceGroupResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListByResourceGroupPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListByResourceGroupPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListByResourceGroupPager) { + w.newListByResourceGroupPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListConfigurationSnapshotInfoPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListConfigurationSnapshotInfoPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListConfigurationSnapshotInfoPager not implemented")} + } + newListConfigurationSnapshotInfoPager := w.newListConfigurationSnapshotInfoPager.get(req) + if newListConfigurationSnapshotInfoPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/web/snapshots` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListConfigurationSnapshotInfoPager(resourceGroupNameParam, nameParam, nil) + newListConfigurationSnapshotInfoPager = &resp + w.newListConfigurationSnapshotInfoPager.add(req, newListConfigurationSnapshotInfoPager) + server.PagerResponderInjectNextLinks(newListConfigurationSnapshotInfoPager, req, func(page *armappservice.WebAppsClientListConfigurationSnapshotInfoResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListConfigurationSnapshotInfoPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListConfigurationSnapshotInfoPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListConfigurationSnapshotInfoPager) { + w.newListConfigurationSnapshotInfoPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListConfigurationSnapshotInfoSlotPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListConfigurationSnapshotInfoSlotPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListConfigurationSnapshotInfoSlotPager not implemented")} + } + newListConfigurationSnapshotInfoSlotPager := w.newListConfigurationSnapshotInfoSlotPager.get(req) + if newListConfigurationSnapshotInfoSlotPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/web/snapshots` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListConfigurationSnapshotInfoSlotPager(resourceGroupNameParam, nameParam, slotParam, nil) + newListConfigurationSnapshotInfoSlotPager = &resp + w.newListConfigurationSnapshotInfoSlotPager.add(req, newListConfigurationSnapshotInfoSlotPager) + server.PagerResponderInjectNextLinks(newListConfigurationSnapshotInfoSlotPager, req, func(page *armappservice.WebAppsClientListConfigurationSnapshotInfoSlotResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListConfigurationSnapshotInfoSlotPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListConfigurationSnapshotInfoSlotPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListConfigurationSnapshotInfoSlotPager) { + w.newListConfigurationSnapshotInfoSlotPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListConfigurationsPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListConfigurationsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListConfigurationsPager not implemented")} + } + newListConfigurationsPager := w.newListConfigurationsPager.get(req) + if newListConfigurationsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListConfigurationsPager(resourceGroupNameParam, nameParam, nil) + newListConfigurationsPager = &resp + w.newListConfigurationsPager.add(req, newListConfigurationsPager) + server.PagerResponderInjectNextLinks(newListConfigurationsPager, req, func(page *armappservice.WebAppsClientListConfigurationsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListConfigurationsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListConfigurationsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListConfigurationsPager) { + w.newListConfigurationsPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListConfigurationsSlotPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListConfigurationsSlotPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListConfigurationsSlotPager not implemented")} + } + newListConfigurationsSlotPager := w.newListConfigurationsSlotPager.get(req) + if newListConfigurationsSlotPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListConfigurationsSlotPager(resourceGroupNameParam, nameParam, slotParam, nil) + newListConfigurationsSlotPager = &resp + w.newListConfigurationsSlotPager.add(req, newListConfigurationsSlotPager) + server.PagerResponderInjectNextLinks(newListConfigurationsSlotPager, req, func(page *armappservice.WebAppsClientListConfigurationsSlotResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListConfigurationsSlotPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListConfigurationsSlotPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListConfigurationsSlotPager) { + w.newListConfigurationsSlotPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListConnectionStrings(req *http.Request) (*http.Response, error) { + if w.srv.ListConnectionStrings == nil { + return nil, &nonRetriableError{errors.New("fake for method ListConnectionStrings not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/connectionstrings/list` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListConnectionStrings(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).ConnectionStringDictionary, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListConnectionStringsSlot(req *http.Request) (*http.Response, error) { + if w.srv.ListConnectionStringsSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method ListConnectionStringsSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/connectionstrings/list` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListConnectionStringsSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).ConnectionStringDictionary, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListContinuousWebJobsPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListContinuousWebJobsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListContinuousWebJobsPager not implemented")} + } + newListContinuousWebJobsPager := w.newListContinuousWebJobsPager.get(req) + if newListContinuousWebJobsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/continuouswebjobs` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListContinuousWebJobsPager(resourceGroupNameParam, nameParam, nil) + newListContinuousWebJobsPager = &resp + w.newListContinuousWebJobsPager.add(req, newListContinuousWebJobsPager) + server.PagerResponderInjectNextLinks(newListContinuousWebJobsPager, req, func(page *armappservice.WebAppsClientListContinuousWebJobsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListContinuousWebJobsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListContinuousWebJobsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListContinuousWebJobsPager) { + w.newListContinuousWebJobsPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListContinuousWebJobsSlotPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListContinuousWebJobsSlotPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListContinuousWebJobsSlotPager not implemented")} + } + newListContinuousWebJobsSlotPager := w.newListContinuousWebJobsSlotPager.get(req) + if newListContinuousWebJobsSlotPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/continuouswebjobs` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListContinuousWebJobsSlotPager(resourceGroupNameParam, nameParam, slotParam, nil) + newListContinuousWebJobsSlotPager = &resp + w.newListContinuousWebJobsSlotPager.add(req, newListContinuousWebJobsSlotPager) + server.PagerResponderInjectNextLinks(newListContinuousWebJobsSlotPager, req, func(page *armappservice.WebAppsClientListContinuousWebJobsSlotResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListContinuousWebJobsSlotPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListContinuousWebJobsSlotPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListContinuousWebJobsSlotPager) { + w.newListContinuousWebJobsSlotPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListDeploymentLog(req *http.Request) (*http.Response, error) { + if w.srv.ListDeploymentLog == nil { + return nil, &nonRetriableError{errors.New("fake for method ListDeploymentLog not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/log` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + idParam, err := url.PathUnescape(matches[regex.SubexpIndex("id")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListDeploymentLog(req.Context(), resourceGroupNameParam, nameParam, idParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).Deployment, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListDeploymentLogSlot(req *http.Request) (*http.Response, error) { + if w.srv.ListDeploymentLogSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method ListDeploymentLogSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/log` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + idParam, err := url.PathUnescape(matches[regex.SubexpIndex("id")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListDeploymentLogSlot(req.Context(), resourceGroupNameParam, nameParam, idParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).Deployment, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListDeploymentsPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListDeploymentsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListDeploymentsPager not implemented")} + } + newListDeploymentsPager := w.newListDeploymentsPager.get(req) + if newListDeploymentsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/deployments` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListDeploymentsPager(resourceGroupNameParam, nameParam, nil) + newListDeploymentsPager = &resp + w.newListDeploymentsPager.add(req, newListDeploymentsPager) + server.PagerResponderInjectNextLinks(newListDeploymentsPager, req, func(page *armappservice.WebAppsClientListDeploymentsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListDeploymentsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListDeploymentsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListDeploymentsPager) { + w.newListDeploymentsPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListDeploymentsSlotPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListDeploymentsSlotPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListDeploymentsSlotPager not implemented")} + } + newListDeploymentsSlotPager := w.newListDeploymentsSlotPager.get(req) + if newListDeploymentsSlotPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/deployments` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListDeploymentsSlotPager(resourceGroupNameParam, nameParam, slotParam, nil) + newListDeploymentsSlotPager = &resp + w.newListDeploymentsSlotPager.add(req, newListDeploymentsSlotPager) + server.PagerResponderInjectNextLinks(newListDeploymentsSlotPager, req, func(page *armappservice.WebAppsClientListDeploymentsSlotResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListDeploymentsSlotPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListDeploymentsSlotPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListDeploymentsSlotPager) { + w.newListDeploymentsSlotPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListDomainOwnershipIdentifiersPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListDomainOwnershipIdentifiersPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListDomainOwnershipIdentifiersPager not implemented")} + } + newListDomainOwnershipIdentifiersPager := w.newListDomainOwnershipIdentifiersPager.get(req) + if newListDomainOwnershipIdentifiersPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/domainOwnershipIdentifiers` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListDomainOwnershipIdentifiersPager(resourceGroupNameParam, nameParam, nil) + newListDomainOwnershipIdentifiersPager = &resp + w.newListDomainOwnershipIdentifiersPager.add(req, newListDomainOwnershipIdentifiersPager) + server.PagerResponderInjectNextLinks(newListDomainOwnershipIdentifiersPager, req, func(page *armappservice.WebAppsClientListDomainOwnershipIdentifiersResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListDomainOwnershipIdentifiersPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListDomainOwnershipIdentifiersPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListDomainOwnershipIdentifiersPager) { + w.newListDomainOwnershipIdentifiersPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListDomainOwnershipIdentifiersSlotPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListDomainOwnershipIdentifiersSlotPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListDomainOwnershipIdentifiersSlotPager not implemented")} + } + newListDomainOwnershipIdentifiersSlotPager := w.newListDomainOwnershipIdentifiersSlotPager.get(req) + if newListDomainOwnershipIdentifiersSlotPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/domainOwnershipIdentifiers` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListDomainOwnershipIdentifiersSlotPager(resourceGroupNameParam, nameParam, slotParam, nil) + newListDomainOwnershipIdentifiersSlotPager = &resp + w.newListDomainOwnershipIdentifiersSlotPager.add(req, newListDomainOwnershipIdentifiersSlotPager) + server.PagerResponderInjectNextLinks(newListDomainOwnershipIdentifiersSlotPager, req, func(page *armappservice.WebAppsClientListDomainOwnershipIdentifiersSlotResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListDomainOwnershipIdentifiersSlotPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListDomainOwnershipIdentifiersSlotPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListDomainOwnershipIdentifiersSlotPager) { + w.newListDomainOwnershipIdentifiersSlotPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListFunctionKeys(req *http.Request) (*http.Response, error) { + if w.srv.ListFunctionKeys == nil { + return nil, &nonRetriableError{errors.New("fake for method ListFunctionKeys not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/functions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listkeys` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + functionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("functionName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListFunctionKeys(req.Context(), resourceGroupNameParam, nameParam, functionNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).StringDictionary, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListFunctionKeysSlot(req *http.Request) (*http.Response, error) { + if w.srv.ListFunctionKeysSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method ListFunctionKeysSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/functions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listkeys` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + functionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("functionName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListFunctionKeysSlot(req.Context(), resourceGroupNameParam, nameParam, functionNameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).StringDictionary, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListFunctionSecrets(req *http.Request) (*http.Response, error) { + if w.srv.ListFunctionSecrets == nil { + return nil, &nonRetriableError{errors.New("fake for method ListFunctionSecrets not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/functions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listsecrets` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + functionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("functionName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListFunctionSecrets(req.Context(), resourceGroupNameParam, nameParam, functionNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).FunctionSecrets, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListFunctionSecretsSlot(req *http.Request) (*http.Response, error) { + if w.srv.ListFunctionSecretsSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method ListFunctionSecretsSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/functions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listsecrets` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + functionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("functionName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListFunctionSecretsSlot(req.Context(), resourceGroupNameParam, nameParam, functionNameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).FunctionSecrets, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListFunctionsPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListFunctionsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListFunctionsPager not implemented")} + } + newListFunctionsPager := w.newListFunctionsPager.get(req) + if newListFunctionsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/functions` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListFunctionsPager(resourceGroupNameParam, nameParam, nil) + newListFunctionsPager = &resp + w.newListFunctionsPager.add(req, newListFunctionsPager) + server.PagerResponderInjectNextLinks(newListFunctionsPager, req, func(page *armappservice.WebAppsClientListFunctionsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListFunctionsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListFunctionsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListFunctionsPager) { + w.newListFunctionsPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListHostKeys(req *http.Request) (*http.Response, error) { + if w.srv.ListHostKeys == nil { + return nil, &nonRetriableError{errors.New("fake for method ListHostKeys not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/host/default/listkeys` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListHostKeys(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).HostKeys, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListHostKeysSlot(req *http.Request) (*http.Response, error) { + if w.srv.ListHostKeysSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method ListHostKeysSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/host/default/listkeys` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListHostKeysSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).HostKeys, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListHostNameBindingsPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListHostNameBindingsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListHostNameBindingsPager not implemented")} + } + newListHostNameBindingsPager := w.newListHostNameBindingsPager.get(req) + if newListHostNameBindingsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hostNameBindings` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListHostNameBindingsPager(resourceGroupNameParam, nameParam, nil) + newListHostNameBindingsPager = &resp + w.newListHostNameBindingsPager.add(req, newListHostNameBindingsPager) + server.PagerResponderInjectNextLinks(newListHostNameBindingsPager, req, func(page *armappservice.WebAppsClientListHostNameBindingsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListHostNameBindingsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListHostNameBindingsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListHostNameBindingsPager) { + w.newListHostNameBindingsPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListHostNameBindingsSlotPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListHostNameBindingsSlotPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListHostNameBindingsSlotPager not implemented")} + } + newListHostNameBindingsSlotPager := w.newListHostNameBindingsSlotPager.get(req) + if newListHostNameBindingsSlotPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hostNameBindings` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListHostNameBindingsSlotPager(resourceGroupNameParam, nameParam, slotParam, nil) + newListHostNameBindingsSlotPager = &resp + w.newListHostNameBindingsSlotPager.add(req, newListHostNameBindingsSlotPager) + server.PagerResponderInjectNextLinks(newListHostNameBindingsSlotPager, req, func(page *armappservice.WebAppsClientListHostNameBindingsSlotResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListHostNameBindingsSlotPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListHostNameBindingsSlotPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListHostNameBindingsSlotPager) { + w.newListHostNameBindingsSlotPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListHybridConnections(req *http.Request) (*http.Response, error) { + if w.srv.ListHybridConnections == nil { + return nil, &nonRetriableError{errors.New("fake for method ListHybridConnections not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hybridConnectionRelays` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListHybridConnections(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).HybridConnection, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListHybridConnectionsSlot(req *http.Request) (*http.Response, error) { + if w.srv.ListHybridConnectionsSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method ListHybridConnectionsSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hybridConnectionRelays` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListHybridConnectionsSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).HybridConnection, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListInstanceFunctionsSlotPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListInstanceFunctionsSlotPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListInstanceFunctionsSlotPager not implemented")} + } + newListInstanceFunctionsSlotPager := w.newListInstanceFunctionsSlotPager.get(req) + if newListInstanceFunctionsSlotPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/functions` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListInstanceFunctionsSlotPager(resourceGroupNameParam, nameParam, slotParam, nil) + newListInstanceFunctionsSlotPager = &resp + w.newListInstanceFunctionsSlotPager.add(req, newListInstanceFunctionsSlotPager) + server.PagerResponderInjectNextLinks(newListInstanceFunctionsSlotPager, req, func(page *armappservice.WebAppsClientListInstanceFunctionsSlotResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListInstanceFunctionsSlotPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListInstanceFunctionsSlotPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListInstanceFunctionsSlotPager) { + w.newListInstanceFunctionsSlotPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListInstanceIdentifiersPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListInstanceIdentifiersPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListInstanceIdentifiersPager not implemented")} + } + newListInstanceIdentifiersPager := w.newListInstanceIdentifiersPager.get(req) + if newListInstanceIdentifiersPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/instances` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListInstanceIdentifiersPager(resourceGroupNameParam, nameParam, nil) + newListInstanceIdentifiersPager = &resp + w.newListInstanceIdentifiersPager.add(req, newListInstanceIdentifiersPager) + server.PagerResponderInjectNextLinks(newListInstanceIdentifiersPager, req, func(page *armappservice.WebAppsClientListInstanceIdentifiersResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListInstanceIdentifiersPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListInstanceIdentifiersPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListInstanceIdentifiersPager) { + w.newListInstanceIdentifiersPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListInstanceIdentifiersSlotPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListInstanceIdentifiersSlotPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListInstanceIdentifiersSlotPager not implemented")} + } + newListInstanceIdentifiersSlotPager := w.newListInstanceIdentifiersSlotPager.get(req) + if newListInstanceIdentifiersSlotPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/instances` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListInstanceIdentifiersSlotPager(resourceGroupNameParam, nameParam, slotParam, nil) + newListInstanceIdentifiersSlotPager = &resp + w.newListInstanceIdentifiersSlotPager.add(req, newListInstanceIdentifiersSlotPager) + server.PagerResponderInjectNextLinks(newListInstanceIdentifiersSlotPager, req, func(page *armappservice.WebAppsClientListInstanceIdentifiersSlotResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListInstanceIdentifiersSlotPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListInstanceIdentifiersSlotPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListInstanceIdentifiersSlotPager) { + w.newListInstanceIdentifiersSlotPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListInstanceProcessModulesPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListInstanceProcessModulesPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListInstanceProcessModulesPager not implemented")} + } + newListInstanceProcessModulesPager := w.newListInstanceProcessModulesPager.get(req) + if newListInstanceProcessModulesPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/instances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/processes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/modules` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + processIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("processId")]) + if err != nil { + return nil, err + } + instanceIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("instanceId")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListInstanceProcessModulesPager(resourceGroupNameParam, nameParam, processIDParam, instanceIDParam, nil) + newListInstanceProcessModulesPager = &resp + w.newListInstanceProcessModulesPager.add(req, newListInstanceProcessModulesPager) + server.PagerResponderInjectNextLinks(newListInstanceProcessModulesPager, req, func(page *armappservice.WebAppsClientListInstanceProcessModulesResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListInstanceProcessModulesPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListInstanceProcessModulesPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListInstanceProcessModulesPager) { + w.newListInstanceProcessModulesPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListInstanceProcessModulesSlotPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListInstanceProcessModulesSlotPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListInstanceProcessModulesSlotPager not implemented")} + } + newListInstanceProcessModulesSlotPager := w.newListInstanceProcessModulesSlotPager.get(req) + if newListInstanceProcessModulesSlotPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/instances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/processes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/modules` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 6 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + processIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("processId")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + instanceIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("instanceId")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListInstanceProcessModulesSlotPager(resourceGroupNameParam, nameParam, processIDParam, slotParam, instanceIDParam, nil) + newListInstanceProcessModulesSlotPager = &resp + w.newListInstanceProcessModulesSlotPager.add(req, newListInstanceProcessModulesSlotPager) + server.PagerResponderInjectNextLinks(newListInstanceProcessModulesSlotPager, req, func(page *armappservice.WebAppsClientListInstanceProcessModulesSlotResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListInstanceProcessModulesSlotPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListInstanceProcessModulesSlotPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListInstanceProcessModulesSlotPager) { + w.newListInstanceProcessModulesSlotPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListInstanceProcessThreadsPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListInstanceProcessThreadsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListInstanceProcessThreadsPager not implemented")} + } + newListInstanceProcessThreadsPager := w.newListInstanceProcessThreadsPager.get(req) + if newListInstanceProcessThreadsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/instances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/processes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/threads` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + processIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("processId")]) + if err != nil { + return nil, err + } + instanceIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("instanceId")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListInstanceProcessThreadsPager(resourceGroupNameParam, nameParam, processIDParam, instanceIDParam, nil) + newListInstanceProcessThreadsPager = &resp + w.newListInstanceProcessThreadsPager.add(req, newListInstanceProcessThreadsPager) + server.PagerResponderInjectNextLinks(newListInstanceProcessThreadsPager, req, func(page *armappservice.WebAppsClientListInstanceProcessThreadsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListInstanceProcessThreadsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListInstanceProcessThreadsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListInstanceProcessThreadsPager) { + w.newListInstanceProcessThreadsPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListInstanceProcessThreadsSlotPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListInstanceProcessThreadsSlotPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListInstanceProcessThreadsSlotPager not implemented")} + } + newListInstanceProcessThreadsSlotPager := w.newListInstanceProcessThreadsSlotPager.get(req) + if newListInstanceProcessThreadsSlotPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/instances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/processes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/threads` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 6 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + processIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("processId")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + instanceIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("instanceId")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListInstanceProcessThreadsSlotPager(resourceGroupNameParam, nameParam, processIDParam, slotParam, instanceIDParam, nil) + newListInstanceProcessThreadsSlotPager = &resp + w.newListInstanceProcessThreadsSlotPager.add(req, newListInstanceProcessThreadsSlotPager) + server.PagerResponderInjectNextLinks(newListInstanceProcessThreadsSlotPager, req, func(page *armappservice.WebAppsClientListInstanceProcessThreadsSlotResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListInstanceProcessThreadsSlotPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListInstanceProcessThreadsSlotPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListInstanceProcessThreadsSlotPager) { + w.newListInstanceProcessThreadsSlotPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListInstanceProcessesPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListInstanceProcessesPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListInstanceProcessesPager not implemented")} + } + newListInstanceProcessesPager := w.newListInstanceProcessesPager.get(req) + if newListInstanceProcessesPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/instances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/processes` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + instanceIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("instanceId")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListInstanceProcessesPager(resourceGroupNameParam, nameParam, instanceIDParam, nil) + newListInstanceProcessesPager = &resp + w.newListInstanceProcessesPager.add(req, newListInstanceProcessesPager) + server.PagerResponderInjectNextLinks(newListInstanceProcessesPager, req, func(page *armappservice.WebAppsClientListInstanceProcessesResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListInstanceProcessesPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListInstanceProcessesPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListInstanceProcessesPager) { + w.newListInstanceProcessesPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListInstanceProcessesSlotPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListInstanceProcessesSlotPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListInstanceProcessesSlotPager not implemented")} + } + newListInstanceProcessesSlotPager := w.newListInstanceProcessesSlotPager.get(req) + if newListInstanceProcessesSlotPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/instances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/processes` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + instanceIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("instanceId")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListInstanceProcessesSlotPager(resourceGroupNameParam, nameParam, slotParam, instanceIDParam, nil) + newListInstanceProcessesSlotPager = &resp + w.newListInstanceProcessesSlotPager.add(req, newListInstanceProcessesSlotPager) + server.PagerResponderInjectNextLinks(newListInstanceProcessesSlotPager, req, func(page *armappservice.WebAppsClientListInstanceProcessesSlotResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListInstanceProcessesSlotPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListInstanceProcessesSlotPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListInstanceProcessesSlotPager) { + w.newListInstanceProcessesSlotPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListInstanceWorkflowsSlotPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListInstanceWorkflowsSlotPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListInstanceWorkflowsSlotPager not implemented")} + } + newListInstanceWorkflowsSlotPager := w.newListInstanceWorkflowsSlotPager.get(req) + if newListInstanceWorkflowsSlotPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/workflows` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListInstanceWorkflowsSlotPager(resourceGroupNameParam, nameParam, slotParam, nil) + newListInstanceWorkflowsSlotPager = &resp + w.newListInstanceWorkflowsSlotPager.add(req, newListInstanceWorkflowsSlotPager) + server.PagerResponderInjectNextLinks(newListInstanceWorkflowsSlotPager, req, func(page *armappservice.WebAppsClientListInstanceWorkflowsSlotResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListInstanceWorkflowsSlotPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListInstanceWorkflowsSlotPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListInstanceWorkflowsSlotPager) { + w.newListInstanceWorkflowsSlotPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListMetadata(req *http.Request) (*http.Response, error) { + if w.srv.ListMetadata == nil { + return nil, &nonRetriableError{errors.New("fake for method ListMetadata not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/metadata/list` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListMetadata(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).StringDictionary, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListMetadataSlot(req *http.Request) (*http.Response, error) { + if w.srv.ListMetadataSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method ListMetadataSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/metadata/list` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListMetadataSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).StringDictionary, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListNetworkFeatures(req *http.Request) (*http.Response, error) { + if w.srv.ListNetworkFeatures == nil { + return nil, &nonRetriableError{errors.New("fake for method ListNetworkFeatures not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkFeatures/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + viewParam, err := url.PathUnescape(matches[regex.SubexpIndex("view")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListNetworkFeatures(req.Context(), resourceGroupNameParam, nameParam, viewParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).NetworkFeatures, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListNetworkFeaturesSlot(req *http.Request) (*http.Response, error) { + if w.srv.ListNetworkFeaturesSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method ListNetworkFeaturesSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkFeatures/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + viewParam, err := url.PathUnescape(matches[regex.SubexpIndex("view")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListNetworkFeaturesSlot(req.Context(), resourceGroupNameParam, nameParam, viewParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).NetworkFeatures, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListPerfMonCountersPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListPerfMonCountersPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListPerfMonCountersPager not implemented")} + } + newListPerfMonCountersPager := w.newListPerfMonCountersPager.get(req) + if newListPerfMonCountersPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/perfcounters` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + filterUnescaped, err := url.QueryUnescape(qp.Get("$filter")) + if err != nil { + return nil, err + } + filterParam := getOptional(filterUnescaped) + var options *armappservice.WebAppsClientListPerfMonCountersOptions + if filterParam != nil { + options = &armappservice.WebAppsClientListPerfMonCountersOptions{ + Filter: filterParam, + } + } + resp := w.srv.NewListPerfMonCountersPager(resourceGroupNameParam, nameParam, options) + newListPerfMonCountersPager = &resp + w.newListPerfMonCountersPager.add(req, newListPerfMonCountersPager) + server.PagerResponderInjectNextLinks(newListPerfMonCountersPager, req, func(page *armappservice.WebAppsClientListPerfMonCountersResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListPerfMonCountersPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListPerfMonCountersPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListPerfMonCountersPager) { + w.newListPerfMonCountersPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListPerfMonCountersSlotPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListPerfMonCountersSlotPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListPerfMonCountersSlotPager not implemented")} + } + newListPerfMonCountersSlotPager := w.newListPerfMonCountersSlotPager.get(req) + if newListPerfMonCountersSlotPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/perfcounters` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + filterUnescaped, err := url.QueryUnescape(qp.Get("$filter")) + if err != nil { + return nil, err + } + filterParam := getOptional(filterUnescaped) + var options *armappservice.WebAppsClientListPerfMonCountersSlotOptions + if filterParam != nil { + options = &armappservice.WebAppsClientListPerfMonCountersSlotOptions{ + Filter: filterParam, + } + } + resp := w.srv.NewListPerfMonCountersSlotPager(resourceGroupNameParam, nameParam, slotParam, options) + newListPerfMonCountersSlotPager = &resp + w.newListPerfMonCountersSlotPager.add(req, newListPerfMonCountersSlotPager) + server.PagerResponderInjectNextLinks(newListPerfMonCountersSlotPager, req, func(page *armappservice.WebAppsClientListPerfMonCountersSlotResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListPerfMonCountersSlotPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListPerfMonCountersSlotPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListPerfMonCountersSlotPager) { + w.newListPerfMonCountersSlotPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListPremierAddOns(req *http.Request) (*http.Response, error) { + if w.srv.ListPremierAddOns == nil { + return nil, &nonRetriableError{errors.New("fake for method ListPremierAddOns not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/premieraddons` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListPremierAddOns(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).PremierAddOn, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListPremierAddOnsSlot(req *http.Request) (*http.Response, error) { + if w.srv.ListPremierAddOnsSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method ListPremierAddOnsSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/premieraddons` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListPremierAddOnsSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).PremierAddOn, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListProcessModulesPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListProcessModulesPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListProcessModulesPager not implemented")} + } + newListProcessModulesPager := w.newListProcessModulesPager.get(req) + if newListProcessModulesPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/processes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/modules` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + processIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("processId")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListProcessModulesPager(resourceGroupNameParam, nameParam, processIDParam, nil) + newListProcessModulesPager = &resp + w.newListProcessModulesPager.add(req, newListProcessModulesPager) + server.PagerResponderInjectNextLinks(newListProcessModulesPager, req, func(page *armappservice.WebAppsClientListProcessModulesResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListProcessModulesPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListProcessModulesPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListProcessModulesPager) { + w.newListProcessModulesPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListProcessModulesSlotPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListProcessModulesSlotPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListProcessModulesSlotPager not implemented")} + } + newListProcessModulesSlotPager := w.newListProcessModulesSlotPager.get(req) + if newListProcessModulesSlotPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/processes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/modules` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + processIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("processId")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListProcessModulesSlotPager(resourceGroupNameParam, nameParam, processIDParam, slotParam, nil) + newListProcessModulesSlotPager = &resp + w.newListProcessModulesSlotPager.add(req, newListProcessModulesSlotPager) + server.PagerResponderInjectNextLinks(newListProcessModulesSlotPager, req, func(page *armappservice.WebAppsClientListProcessModulesSlotResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListProcessModulesSlotPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListProcessModulesSlotPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListProcessModulesSlotPager) { + w.newListProcessModulesSlotPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListProcessThreadsPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListProcessThreadsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListProcessThreadsPager not implemented")} + } + newListProcessThreadsPager := w.newListProcessThreadsPager.get(req) + if newListProcessThreadsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/processes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/threads` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + processIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("processId")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListProcessThreadsPager(resourceGroupNameParam, nameParam, processIDParam, nil) + newListProcessThreadsPager = &resp + w.newListProcessThreadsPager.add(req, newListProcessThreadsPager) + server.PagerResponderInjectNextLinks(newListProcessThreadsPager, req, func(page *armappservice.WebAppsClientListProcessThreadsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListProcessThreadsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListProcessThreadsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListProcessThreadsPager) { + w.newListProcessThreadsPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListProcessThreadsSlotPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListProcessThreadsSlotPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListProcessThreadsSlotPager not implemented")} + } + newListProcessThreadsSlotPager := w.newListProcessThreadsSlotPager.get(req) + if newListProcessThreadsSlotPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/processes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/threads` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + processIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("processId")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListProcessThreadsSlotPager(resourceGroupNameParam, nameParam, processIDParam, slotParam, nil) + newListProcessThreadsSlotPager = &resp + w.newListProcessThreadsSlotPager.add(req, newListProcessThreadsSlotPager) + server.PagerResponderInjectNextLinks(newListProcessThreadsSlotPager, req, func(page *armappservice.WebAppsClientListProcessThreadsSlotResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListProcessThreadsSlotPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListProcessThreadsSlotPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListProcessThreadsSlotPager) { + w.newListProcessThreadsSlotPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListProcessesPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListProcessesPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListProcessesPager not implemented")} + } + newListProcessesPager := w.newListProcessesPager.get(req) + if newListProcessesPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/processes` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListProcessesPager(resourceGroupNameParam, nameParam, nil) + newListProcessesPager = &resp + w.newListProcessesPager.add(req, newListProcessesPager) + server.PagerResponderInjectNextLinks(newListProcessesPager, req, func(page *armappservice.WebAppsClientListProcessesResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListProcessesPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListProcessesPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListProcessesPager) { + w.newListProcessesPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListProcessesSlotPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListProcessesSlotPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListProcessesSlotPager not implemented")} + } + newListProcessesSlotPager := w.newListProcessesSlotPager.get(req) + if newListProcessesSlotPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/processes` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListProcessesSlotPager(resourceGroupNameParam, nameParam, slotParam, nil) + newListProcessesSlotPager = &resp + w.newListProcessesSlotPager.add(req, newListProcessesSlotPager) + server.PagerResponderInjectNextLinks(newListProcessesSlotPager, req, func(page *armappservice.WebAppsClientListProcessesSlotResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListProcessesSlotPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListProcessesSlotPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListProcessesSlotPager) { + w.newListProcessesSlotPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListProductionSiteDeploymentStatusesPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListProductionSiteDeploymentStatusesPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListProductionSiteDeploymentStatusesPager not implemented")} + } + newListProductionSiteDeploymentStatusesPager := w.newListProductionSiteDeploymentStatusesPager.get(req) + if newListProductionSiteDeploymentStatusesPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/deploymentStatus` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListProductionSiteDeploymentStatusesPager(resourceGroupNameParam, nameParam, nil) + newListProductionSiteDeploymentStatusesPager = &resp + w.newListProductionSiteDeploymentStatusesPager.add(req, newListProductionSiteDeploymentStatusesPager) + server.PagerResponderInjectNextLinks(newListProductionSiteDeploymentStatusesPager, req, func(page *armappservice.WebAppsClientListProductionSiteDeploymentStatusesResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListProductionSiteDeploymentStatusesPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListProductionSiteDeploymentStatusesPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListProductionSiteDeploymentStatusesPager) { + w.newListProductionSiteDeploymentStatusesPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListPublicCertificatesPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListPublicCertificatesPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListPublicCertificatesPager not implemented")} + } + newListPublicCertificatesPager := w.newListPublicCertificatesPager.get(req) + if newListPublicCertificatesPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/publicCertificates` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListPublicCertificatesPager(resourceGroupNameParam, nameParam, nil) + newListPublicCertificatesPager = &resp + w.newListPublicCertificatesPager.add(req, newListPublicCertificatesPager) + server.PagerResponderInjectNextLinks(newListPublicCertificatesPager, req, func(page *armappservice.WebAppsClientListPublicCertificatesResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListPublicCertificatesPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListPublicCertificatesPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListPublicCertificatesPager) { + w.newListPublicCertificatesPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListPublicCertificatesSlotPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListPublicCertificatesSlotPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListPublicCertificatesSlotPager not implemented")} + } + newListPublicCertificatesSlotPager := w.newListPublicCertificatesSlotPager.get(req) + if newListPublicCertificatesSlotPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/publicCertificates` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListPublicCertificatesSlotPager(resourceGroupNameParam, nameParam, slotParam, nil) + newListPublicCertificatesSlotPager = &resp + w.newListPublicCertificatesSlotPager.add(req, newListPublicCertificatesSlotPager) + server.PagerResponderInjectNextLinks(newListPublicCertificatesSlotPager, req, func(page *armappservice.WebAppsClientListPublicCertificatesSlotResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListPublicCertificatesSlotPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListPublicCertificatesSlotPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListPublicCertificatesSlotPager) { + w.newListPublicCertificatesSlotPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchBeginListPublishingCredentials(req *http.Request) (*http.Response, error) { + if w.srv.BeginListPublishingCredentials == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginListPublishingCredentials not implemented")} + } + beginListPublishingCredentials := w.beginListPublishingCredentials.get(req) + if beginListPublishingCredentials == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/publishingcredentials/list` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.BeginListPublishingCredentials(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginListPublishingCredentials = &respr + w.beginListPublishingCredentials.add(req, beginListPublishingCredentials) + } + + resp, err := server.PollerResponderNext(beginListPublishingCredentials, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.beginListPublishingCredentials.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PollerResponderMore(beginListPublishingCredentials) { + w.beginListPublishingCredentials.remove(req) + } + + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchBeginListPublishingCredentialsSlot(req *http.Request) (*http.Response, error) { + if w.srv.BeginListPublishingCredentialsSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginListPublishingCredentialsSlot not implemented")} + } + beginListPublishingCredentialsSlot := w.beginListPublishingCredentialsSlot.get(req) + if beginListPublishingCredentialsSlot == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/publishingcredentials/list` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.BeginListPublishingCredentialsSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginListPublishingCredentialsSlot = &respr + w.beginListPublishingCredentialsSlot.add(req, beginListPublishingCredentialsSlot) + } + + resp, err := server.PollerResponderNext(beginListPublishingCredentialsSlot, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.beginListPublishingCredentialsSlot.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PollerResponderMore(beginListPublishingCredentialsSlot) { + w.beginListPublishingCredentialsSlot.remove(req) + } + + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListPublishingProfileXMLWithSecrets(req *http.Request) (*http.Response, error) { + if w.srv.ListPublishingProfileXMLWithSecrets == nil { + return nil, &nonRetriableError{errors.New("fake for method ListPublishingProfileXMLWithSecrets not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/publishxml` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.CsmPublishingProfileOptions](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListPublishingProfileXMLWithSecrets(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, &server.ResponseOptions{ + Body: server.GetResponse(respr).Body, + ContentType: "application/octet-stream", + }) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListPublishingProfileXMLWithSecretsSlot(req *http.Request) (*http.Response, error) { + if w.srv.ListPublishingProfileXMLWithSecretsSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method ListPublishingProfileXMLWithSecretsSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/publishxml` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.CsmPublishingProfileOptions](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListPublishingProfileXMLWithSecretsSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, &server.ResponseOptions{ + Body: server.GetResponse(respr).Body, + ContentType: "application/octet-stream", + }) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListRelayServiceConnections(req *http.Request) (*http.Response, error) { + if w.srv.ListRelayServiceConnections == nil { + return nil, &nonRetriableError{errors.New("fake for method ListRelayServiceConnections not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hybridconnection` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListRelayServiceConnections(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).RelayServiceConnectionEntity, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListRelayServiceConnectionsSlot(req *http.Request) (*http.Response, error) { + if w.srv.ListRelayServiceConnectionsSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method ListRelayServiceConnectionsSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hybridconnection` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListRelayServiceConnectionsSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).RelayServiceConnectionEntity, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListSiteBackupsPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListSiteBackupsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListSiteBackupsPager not implemented")} + } + newListSiteBackupsPager := w.newListSiteBackupsPager.get(req) + if newListSiteBackupsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listbackups` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListSiteBackupsPager(resourceGroupNameParam, nameParam, nil) + newListSiteBackupsPager = &resp + w.newListSiteBackupsPager.add(req, newListSiteBackupsPager) + server.PagerResponderInjectNextLinks(newListSiteBackupsPager, req, func(page *armappservice.WebAppsClientListSiteBackupsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListSiteBackupsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListSiteBackupsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListSiteBackupsPager) { + w.newListSiteBackupsPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListSiteBackupsSlotPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListSiteBackupsSlotPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListSiteBackupsSlotPager not implemented")} + } + newListSiteBackupsSlotPager := w.newListSiteBackupsSlotPager.get(req) + if newListSiteBackupsSlotPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listbackups` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListSiteBackupsSlotPager(resourceGroupNameParam, nameParam, slotParam, nil) + newListSiteBackupsSlotPager = &resp + w.newListSiteBackupsSlotPager.add(req, newListSiteBackupsSlotPager) + server.PagerResponderInjectNextLinks(newListSiteBackupsSlotPager, req, func(page *armappservice.WebAppsClientListSiteBackupsSlotResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListSiteBackupsSlotPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListSiteBackupsSlotPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListSiteBackupsSlotPager) { + w.newListSiteBackupsSlotPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListSiteExtensionsPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListSiteExtensionsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListSiteExtensionsPager not implemented")} + } + newListSiteExtensionsPager := w.newListSiteExtensionsPager.get(req) + if newListSiteExtensionsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/siteextensions` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListSiteExtensionsPager(resourceGroupNameParam, nameParam, nil) + newListSiteExtensionsPager = &resp + w.newListSiteExtensionsPager.add(req, newListSiteExtensionsPager) + server.PagerResponderInjectNextLinks(newListSiteExtensionsPager, req, func(page *armappservice.WebAppsClientListSiteExtensionsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListSiteExtensionsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListSiteExtensionsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListSiteExtensionsPager) { + w.newListSiteExtensionsPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListSiteExtensionsSlotPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListSiteExtensionsSlotPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListSiteExtensionsSlotPager not implemented")} + } + newListSiteExtensionsSlotPager := w.newListSiteExtensionsSlotPager.get(req) + if newListSiteExtensionsSlotPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/siteextensions` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListSiteExtensionsSlotPager(resourceGroupNameParam, nameParam, slotParam, nil) + newListSiteExtensionsSlotPager = &resp + w.newListSiteExtensionsSlotPager.add(req, newListSiteExtensionsSlotPager) + server.PagerResponderInjectNextLinks(newListSiteExtensionsSlotPager, req, func(page *armappservice.WebAppsClientListSiteExtensionsSlotResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListSiteExtensionsSlotPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListSiteExtensionsSlotPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListSiteExtensionsSlotPager) { + w.newListSiteExtensionsSlotPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListSitePushSettings(req *http.Request) (*http.Response, error) { + if w.srv.ListSitePushSettings == nil { + return nil, &nonRetriableError{errors.New("fake for method ListSitePushSettings not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/pushsettings/list` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListSitePushSettings(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).PushSettings, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListSitePushSettingsSlot(req *http.Request) (*http.Response, error) { + if w.srv.ListSitePushSettingsSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method ListSitePushSettingsSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/pushsettings/list` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListSitePushSettingsSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).PushSettings, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListSlotConfigurationNames(req *http.Request) (*http.Response, error) { + if w.srv.ListSlotConfigurationNames == nil { + return nil, &nonRetriableError{errors.New("fake for method ListSlotConfigurationNames not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/slotConfigNames` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListSlotConfigurationNames(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SlotConfigNamesResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListSlotDifferencesFromProductionPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListSlotDifferencesFromProductionPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListSlotDifferencesFromProductionPager not implemented")} + } + newListSlotDifferencesFromProductionPager := w.newListSlotDifferencesFromProductionPager.get(req) + if newListSlotDifferencesFromProductionPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slotsdiffs` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.CsmSlotEntity](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListSlotDifferencesFromProductionPager(resourceGroupNameParam, nameParam, body, nil) + newListSlotDifferencesFromProductionPager = &resp + w.newListSlotDifferencesFromProductionPager.add(req, newListSlotDifferencesFromProductionPager) + server.PagerResponderInjectNextLinks(newListSlotDifferencesFromProductionPager, req, func(page *armappservice.WebAppsClientListSlotDifferencesFromProductionResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListSlotDifferencesFromProductionPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListSlotDifferencesFromProductionPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListSlotDifferencesFromProductionPager) { + w.newListSlotDifferencesFromProductionPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListSlotDifferencesSlotPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListSlotDifferencesSlotPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListSlotDifferencesSlotPager not implemented")} + } + newListSlotDifferencesSlotPager := w.newListSlotDifferencesSlotPager.get(req) + if newListSlotDifferencesSlotPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slotsdiffs` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.CsmSlotEntity](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListSlotDifferencesSlotPager(resourceGroupNameParam, nameParam, slotParam, body, nil) + newListSlotDifferencesSlotPager = &resp + w.newListSlotDifferencesSlotPager.add(req, newListSlotDifferencesSlotPager) + server.PagerResponderInjectNextLinks(newListSlotDifferencesSlotPager, req, func(page *armappservice.WebAppsClientListSlotDifferencesSlotResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListSlotDifferencesSlotPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListSlotDifferencesSlotPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListSlotDifferencesSlotPager) { + w.newListSlotDifferencesSlotPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListSlotSiteDeploymentStatusesSlotPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListSlotSiteDeploymentStatusesSlotPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListSlotSiteDeploymentStatusesSlotPager not implemented")} + } + newListSlotSiteDeploymentStatusesSlotPager := w.newListSlotSiteDeploymentStatusesSlotPager.get(req) + if newListSlotSiteDeploymentStatusesSlotPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/deploymentStatus` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListSlotSiteDeploymentStatusesSlotPager(resourceGroupNameParam, nameParam, slotParam, nil) + newListSlotSiteDeploymentStatusesSlotPager = &resp + w.newListSlotSiteDeploymentStatusesSlotPager.add(req, newListSlotSiteDeploymentStatusesSlotPager) + server.PagerResponderInjectNextLinks(newListSlotSiteDeploymentStatusesSlotPager, req, func(page *armappservice.WebAppsClientListSlotSiteDeploymentStatusesSlotResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListSlotSiteDeploymentStatusesSlotPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListSlotSiteDeploymentStatusesSlotPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListSlotSiteDeploymentStatusesSlotPager) { + w.newListSlotSiteDeploymentStatusesSlotPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListSlotsPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListSlotsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListSlotsPager not implemented")} + } + newListSlotsPager := w.newListSlotsPager.get(req) + if newListSlotsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListSlotsPager(resourceGroupNameParam, nameParam, nil) + newListSlotsPager = &resp + w.newListSlotsPager.add(req, newListSlotsPager) + server.PagerResponderInjectNextLinks(newListSlotsPager, req, func(page *armappservice.WebAppsClientListSlotsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListSlotsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListSlotsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListSlotsPager) { + w.newListSlotsPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListSnapshotsPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListSnapshotsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListSnapshotsPager not implemented")} + } + newListSnapshotsPager := w.newListSnapshotsPager.get(req) + if newListSnapshotsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/snapshots` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListSnapshotsPager(resourceGroupNameParam, nameParam, nil) + newListSnapshotsPager = &resp + w.newListSnapshotsPager.add(req, newListSnapshotsPager) + server.PagerResponderInjectNextLinks(newListSnapshotsPager, req, func(page *armappservice.WebAppsClientListSnapshotsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListSnapshotsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListSnapshotsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListSnapshotsPager) { + w.newListSnapshotsPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListSnapshotsFromDRSecondaryPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListSnapshotsFromDRSecondaryPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListSnapshotsFromDRSecondaryPager not implemented")} + } + newListSnapshotsFromDRSecondaryPager := w.newListSnapshotsFromDRSecondaryPager.get(req) + if newListSnapshotsFromDRSecondaryPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/snapshotsdr` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListSnapshotsFromDRSecondaryPager(resourceGroupNameParam, nameParam, nil) + newListSnapshotsFromDRSecondaryPager = &resp + w.newListSnapshotsFromDRSecondaryPager.add(req, newListSnapshotsFromDRSecondaryPager) + server.PagerResponderInjectNextLinks(newListSnapshotsFromDRSecondaryPager, req, func(page *armappservice.WebAppsClientListSnapshotsFromDRSecondaryResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListSnapshotsFromDRSecondaryPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListSnapshotsFromDRSecondaryPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListSnapshotsFromDRSecondaryPager) { + w.newListSnapshotsFromDRSecondaryPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListSnapshotsFromDRSecondarySlotPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListSnapshotsFromDRSecondarySlotPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListSnapshotsFromDRSecondarySlotPager not implemented")} + } + newListSnapshotsFromDRSecondarySlotPager := w.newListSnapshotsFromDRSecondarySlotPager.get(req) + if newListSnapshotsFromDRSecondarySlotPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/snapshotsdr` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListSnapshotsFromDRSecondarySlotPager(resourceGroupNameParam, nameParam, slotParam, nil) + newListSnapshotsFromDRSecondarySlotPager = &resp + w.newListSnapshotsFromDRSecondarySlotPager.add(req, newListSnapshotsFromDRSecondarySlotPager) + server.PagerResponderInjectNextLinks(newListSnapshotsFromDRSecondarySlotPager, req, func(page *armappservice.WebAppsClientListSnapshotsFromDRSecondarySlotResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListSnapshotsFromDRSecondarySlotPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListSnapshotsFromDRSecondarySlotPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListSnapshotsFromDRSecondarySlotPager) { + w.newListSnapshotsFromDRSecondarySlotPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListSnapshotsSlotPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListSnapshotsSlotPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListSnapshotsSlotPager not implemented")} + } + newListSnapshotsSlotPager := w.newListSnapshotsSlotPager.get(req) + if newListSnapshotsSlotPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/snapshots` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListSnapshotsSlotPager(resourceGroupNameParam, nameParam, slotParam, nil) + newListSnapshotsSlotPager = &resp + w.newListSnapshotsSlotPager.add(req, newListSnapshotsSlotPager) + server.PagerResponderInjectNextLinks(newListSnapshotsSlotPager, req, func(page *armappservice.WebAppsClientListSnapshotsSlotResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListSnapshotsSlotPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListSnapshotsSlotPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListSnapshotsSlotPager) { + w.newListSnapshotsSlotPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListSyncFunctionTriggers(req *http.Request) (*http.Response, error) { + if w.srv.ListSyncFunctionTriggers == nil { + return nil, &nonRetriableError{errors.New("fake for method ListSyncFunctionTriggers not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listsyncfunctiontriggerstatus` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListSyncFunctionTriggers(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).FunctionSecrets, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListSyncFunctionTriggersSlot(req *http.Request) (*http.Response, error) { + if w.srv.ListSyncFunctionTriggersSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method ListSyncFunctionTriggersSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listsyncfunctiontriggerstatus` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListSyncFunctionTriggersSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).FunctionSecrets, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListSyncStatus(req *http.Request) (*http.Response, error) { + if w.srv.ListSyncStatus == nil { + return nil, &nonRetriableError{errors.New("fake for method ListSyncStatus not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/host/default/listsyncstatus` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListSyncStatus(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListSyncStatusSlot(req *http.Request) (*http.Response, error) { + if w.srv.ListSyncStatusSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method ListSyncStatusSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/host/default/listsyncstatus` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListSyncStatusSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListTriggeredWebJobHistoryPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListTriggeredWebJobHistoryPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListTriggeredWebJobHistoryPager not implemented")} + } + newListTriggeredWebJobHistoryPager := w.newListTriggeredWebJobHistoryPager.get(req) + if newListTriggeredWebJobHistoryPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/triggeredwebjobs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/history` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + webJobNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("webJobName")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListTriggeredWebJobHistoryPager(resourceGroupNameParam, nameParam, webJobNameParam, nil) + newListTriggeredWebJobHistoryPager = &resp + w.newListTriggeredWebJobHistoryPager.add(req, newListTriggeredWebJobHistoryPager) + server.PagerResponderInjectNextLinks(newListTriggeredWebJobHistoryPager, req, func(page *armappservice.WebAppsClientListTriggeredWebJobHistoryResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListTriggeredWebJobHistoryPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListTriggeredWebJobHistoryPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListTriggeredWebJobHistoryPager) { + w.newListTriggeredWebJobHistoryPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListTriggeredWebJobHistorySlotPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListTriggeredWebJobHistorySlotPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListTriggeredWebJobHistorySlotPager not implemented")} + } + newListTriggeredWebJobHistorySlotPager := w.newListTriggeredWebJobHistorySlotPager.get(req) + if newListTriggeredWebJobHistorySlotPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/triggeredwebjobs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/history` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + webJobNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("webJobName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListTriggeredWebJobHistorySlotPager(resourceGroupNameParam, nameParam, webJobNameParam, slotParam, nil) + newListTriggeredWebJobHistorySlotPager = &resp + w.newListTriggeredWebJobHistorySlotPager.add(req, newListTriggeredWebJobHistorySlotPager) + server.PagerResponderInjectNextLinks(newListTriggeredWebJobHistorySlotPager, req, func(page *armappservice.WebAppsClientListTriggeredWebJobHistorySlotResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListTriggeredWebJobHistorySlotPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListTriggeredWebJobHistorySlotPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListTriggeredWebJobHistorySlotPager) { + w.newListTriggeredWebJobHistorySlotPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListTriggeredWebJobsPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListTriggeredWebJobsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListTriggeredWebJobsPager not implemented")} + } + newListTriggeredWebJobsPager := w.newListTriggeredWebJobsPager.get(req) + if newListTriggeredWebJobsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/triggeredwebjobs` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListTriggeredWebJobsPager(resourceGroupNameParam, nameParam, nil) + newListTriggeredWebJobsPager = &resp + w.newListTriggeredWebJobsPager.add(req, newListTriggeredWebJobsPager) + server.PagerResponderInjectNextLinks(newListTriggeredWebJobsPager, req, func(page *armappservice.WebAppsClientListTriggeredWebJobsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListTriggeredWebJobsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListTriggeredWebJobsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListTriggeredWebJobsPager) { + w.newListTriggeredWebJobsPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListTriggeredWebJobsSlotPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListTriggeredWebJobsSlotPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListTriggeredWebJobsSlotPager not implemented")} + } + newListTriggeredWebJobsSlotPager := w.newListTriggeredWebJobsSlotPager.get(req) + if newListTriggeredWebJobsSlotPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/triggeredwebjobs` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListTriggeredWebJobsSlotPager(resourceGroupNameParam, nameParam, slotParam, nil) + newListTriggeredWebJobsSlotPager = &resp + w.newListTriggeredWebJobsSlotPager.add(req, newListTriggeredWebJobsSlotPager) + server.PagerResponderInjectNextLinks(newListTriggeredWebJobsSlotPager, req, func(page *armappservice.WebAppsClientListTriggeredWebJobsSlotResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListTriggeredWebJobsSlotPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListTriggeredWebJobsSlotPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListTriggeredWebJobsSlotPager) { + w.newListTriggeredWebJobsSlotPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListUsagesPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListUsagesPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListUsagesPager not implemented")} + } + newListUsagesPager := w.newListUsagesPager.get(req) + if newListUsagesPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/usages` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + filterUnescaped, err := url.QueryUnescape(qp.Get("$filter")) + if err != nil { + return nil, err + } + filterParam := getOptional(filterUnescaped) + var options *armappservice.WebAppsClientListUsagesOptions + if filterParam != nil { + options = &armappservice.WebAppsClientListUsagesOptions{ + Filter: filterParam, + } + } + resp := w.srv.NewListUsagesPager(resourceGroupNameParam, nameParam, options) + newListUsagesPager = &resp + w.newListUsagesPager.add(req, newListUsagesPager) + server.PagerResponderInjectNextLinks(newListUsagesPager, req, func(page *armappservice.WebAppsClientListUsagesResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListUsagesPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListUsagesPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListUsagesPager) { + w.newListUsagesPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListUsagesSlotPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListUsagesSlotPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListUsagesSlotPager not implemented")} + } + newListUsagesSlotPager := w.newListUsagesSlotPager.get(req) + if newListUsagesSlotPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/usages` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + filterUnescaped, err := url.QueryUnescape(qp.Get("$filter")) + if err != nil { + return nil, err + } + filterParam := getOptional(filterUnescaped) + var options *armappservice.WebAppsClientListUsagesSlotOptions + if filterParam != nil { + options = &armappservice.WebAppsClientListUsagesSlotOptions{ + Filter: filterParam, + } + } + resp := w.srv.NewListUsagesSlotPager(resourceGroupNameParam, nameParam, slotParam, options) + newListUsagesSlotPager = &resp + w.newListUsagesSlotPager.add(req, newListUsagesSlotPager) + server.PagerResponderInjectNextLinks(newListUsagesSlotPager, req, func(page *armappservice.WebAppsClientListUsagesSlotResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListUsagesSlotPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListUsagesSlotPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListUsagesSlotPager) { + w.newListUsagesSlotPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListVnetConnections(req *http.Request) (*http.Response, error) { + if w.srv.ListVnetConnections == nil { + return nil, &nonRetriableError{errors.New("fake for method ListVnetConnections not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkConnections` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListVnetConnections(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).VnetInfoResourceArray, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListVnetConnectionsSlot(req *http.Request) (*http.Response, error) { + if w.srv.ListVnetConnectionsSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method ListVnetConnectionsSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkConnections` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListVnetConnectionsSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).VnetInfoResourceArray, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListWebJobsPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListWebJobsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListWebJobsPager not implemented")} + } + newListWebJobsPager := w.newListWebJobsPager.get(req) + if newListWebJobsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/webjobs` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListWebJobsPager(resourceGroupNameParam, nameParam, nil) + newListWebJobsPager = &resp + w.newListWebJobsPager.add(req, newListWebJobsPager) + server.PagerResponderInjectNextLinks(newListWebJobsPager, req, func(page *armappservice.WebAppsClientListWebJobsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListWebJobsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListWebJobsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListWebJobsPager) { + w.newListWebJobsPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListWebJobsSlotPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListWebJobsSlotPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListWebJobsSlotPager not implemented")} + } + newListWebJobsSlotPager := w.newListWebJobsSlotPager.get(req) + if newListWebJobsSlotPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/webjobs` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListWebJobsSlotPager(resourceGroupNameParam, nameParam, slotParam, nil) + newListWebJobsSlotPager = &resp + w.newListWebJobsSlotPager.add(req, newListWebJobsSlotPager) + server.PagerResponderInjectNextLinks(newListWebJobsSlotPager, req, func(page *armappservice.WebAppsClientListWebJobsSlotResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListWebJobsSlotPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListWebJobsSlotPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListWebJobsSlotPager) { + w.newListWebJobsSlotPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchNewListWorkflowsPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListWorkflowsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListWorkflowsPager not implemented")} + } + newListWorkflowsPager := w.newListWorkflowsPager.get(req) + if newListWorkflowsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/workflows` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListWorkflowsPager(resourceGroupNameParam, nameParam, nil) + newListWorkflowsPager = &resp + w.newListWorkflowsPager.add(req, newListWorkflowsPager) + server.PagerResponderInjectNextLinks(newListWorkflowsPager, req, func(page *armappservice.WebAppsClientListWorkflowsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListWorkflowsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListWorkflowsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListWorkflowsPager) { + w.newListWorkflowsPager.remove(req) + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListWorkflowsConnections(req *http.Request) (*http.Response, error) { + if w.srv.ListWorkflowsConnections == nil { + return nil, &nonRetriableError{errors.New("fake for method ListWorkflowsConnections not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listWorkflowsConnections` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListWorkflowsConnections(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).WorkflowEnvelope, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchListWorkflowsConnectionsSlot(req *http.Request) (*http.Response, error) { + if w.srv.ListWorkflowsConnectionsSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method ListWorkflowsConnectionsSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listWorkflowsConnections` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListWorkflowsConnectionsSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).WorkflowEnvelope, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchBeginMigrateMySQL(req *http.Request) (*http.Response, error) { + if w.srv.BeginMigrateMySQL == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginMigrateMySQL not implemented")} + } + beginMigrateMySQL := w.beginMigrateMySQL.get(req) + if beginMigrateMySQL == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/migratemysql` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.MigrateMySQLRequest](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.BeginMigrateMySQL(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginMigrateMySQL = &respr + w.beginMigrateMySQL.add(req, beginMigrateMySQL) + } + + resp, err := server.PollerResponderNext(beginMigrateMySQL, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.beginMigrateMySQL.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PollerResponderMore(beginMigrateMySQL) { + w.beginMigrateMySQL.remove(req) + } + + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchBeginMigrateStorage(req *http.Request) (*http.Response, error) { + if w.srv.BeginMigrateStorage == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginMigrateStorage not implemented")} + } + beginMigrateStorage := w.beginMigrateStorage.get(req) + if beginMigrateStorage == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/migrate` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + body, err := server.UnmarshalRequestAsJSON[armappservice.StorageMigrationOptions](req) + if err != nil { + return nil, err + } + subscriptionNameParam, err := url.QueryUnescape(qp.Get("subscriptionName")) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.BeginMigrateStorage(req.Context(), subscriptionNameParam, resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginMigrateStorage = &respr + w.beginMigrateStorage.add(req, beginMigrateStorage) + } + + resp, err := server.PollerResponderNext(beginMigrateStorage, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.beginMigrateStorage.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PollerResponderMore(beginMigrateStorage) { + w.beginMigrateStorage.remove(req) + } + + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchPutPrivateAccessVnet(req *http.Request) (*http.Response, error) { + if w.srv.PutPrivateAccessVnet == nil { + return nil, &nonRetriableError{errors.New("fake for method PutPrivateAccessVnet not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateAccess/virtualNetworks` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.PrivateAccess](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.PutPrivateAccessVnet(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).PrivateAccess, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchPutPrivateAccessVnetSlot(req *http.Request) (*http.Response, error) { + if w.srv.PutPrivateAccessVnetSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method PutPrivateAccessVnetSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateAccess/virtualNetworks` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.PrivateAccess](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.PutPrivateAccessVnetSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).PrivateAccess, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchRecoverSiteConfigurationSnapshot(req *http.Request) (*http.Response, error) { + if w.srv.RecoverSiteConfigurationSnapshot == nil { + return nil, &nonRetriableError{errors.New("fake for method RecoverSiteConfigurationSnapshot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/web/snapshots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/recover` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + snapshotIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("snapshotId")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.RecoverSiteConfigurationSnapshot(req.Context(), resourceGroupNameParam, nameParam, snapshotIDParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchRecoverSiteConfigurationSnapshotSlot(req *http.Request) (*http.Response, error) { + if w.srv.RecoverSiteConfigurationSnapshotSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method RecoverSiteConfigurationSnapshotSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/web/snapshots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/recover` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + snapshotIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("snapshotId")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.RecoverSiteConfigurationSnapshotSlot(req.Context(), resourceGroupNameParam, nameParam, snapshotIDParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchResetProductionSlotConfig(req *http.Request) (*http.Response, error) { + if w.srv.ResetProductionSlotConfig == nil { + return nil, &nonRetriableError{errors.New("fake for method ResetProductionSlotConfig not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resetSlotConfig` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ResetProductionSlotConfig(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchResetSlotConfigurationSlot(req *http.Request) (*http.Response, error) { + if w.srv.ResetSlotConfigurationSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method ResetSlotConfigurationSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resetSlotConfig` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ResetSlotConfigurationSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchRestart(req *http.Request) (*http.Response, error) { + if w.srv.Restart == nil { + return nil, &nonRetriableError{errors.New("fake for method Restart not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/restart` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + softRestartUnescaped, err := url.QueryUnescape(qp.Get("softRestart")) + if err != nil { + return nil, err + } + softRestartParam, err := parseOptional(softRestartUnescaped, strconv.ParseBool) + if err != nil { + return nil, err + } + synchronousUnescaped, err := url.QueryUnescape(qp.Get("synchronous")) + if err != nil { + return nil, err + } + synchronousParam, err := parseOptional(synchronousUnescaped, strconv.ParseBool) + if err != nil { + return nil, err + } + var options *armappservice.WebAppsClientRestartOptions + if softRestartParam != nil || synchronousParam != nil { + options = &armappservice.WebAppsClientRestartOptions{ + SoftRestart: softRestartParam, + Synchronous: synchronousParam, + } + } + respr, errRespr := w.srv.Restart(req.Context(), resourceGroupNameParam, nameParam, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchRestartSlot(req *http.Request) (*http.Response, error) { + if w.srv.RestartSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method RestartSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/restart` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + softRestartUnescaped, err := url.QueryUnescape(qp.Get("softRestart")) + if err != nil { + return nil, err + } + softRestartParam, err := parseOptional(softRestartUnescaped, strconv.ParseBool) + if err != nil { + return nil, err + } + synchronousUnescaped, err := url.QueryUnescape(qp.Get("synchronous")) + if err != nil { + return nil, err + } + synchronousParam, err := parseOptional(synchronousUnescaped, strconv.ParseBool) + if err != nil { + return nil, err + } + var options *armappservice.WebAppsClientRestartSlotOptions + if softRestartParam != nil || synchronousParam != nil { + options = &armappservice.WebAppsClientRestartSlotOptions{ + SoftRestart: softRestartParam, + Synchronous: synchronousParam, + } + } + respr, errRespr := w.srv.RestartSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchBeginRestore(req *http.Request) (*http.Response, error) { + if w.srv.BeginRestore == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginRestore not implemented")} + } + beginRestore := w.beginRestore.get(req) + if beginRestore == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/backups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/restore` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.RestoreRequest](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + backupIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("backupId")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.BeginRestore(req.Context(), resourceGroupNameParam, nameParam, backupIDParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginRestore = &respr + w.beginRestore.add(req, beginRestore) + } + + resp, err := server.PollerResponderNext(beginRestore, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + w.beginRestore.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginRestore) { + w.beginRestore.remove(req) + } + + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchBeginRestoreFromBackupBlob(req *http.Request) (*http.Response, error) { + if w.srv.BeginRestoreFromBackupBlob == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginRestoreFromBackupBlob not implemented")} + } + beginRestoreFromBackupBlob := w.beginRestoreFromBackupBlob.get(req) + if beginRestoreFromBackupBlob == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/restoreFromBackupBlob` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.RestoreRequest](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.BeginRestoreFromBackupBlob(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginRestoreFromBackupBlob = &respr + w.beginRestoreFromBackupBlob.add(req, beginRestoreFromBackupBlob) + } + + resp, err := server.PollerResponderNext(beginRestoreFromBackupBlob, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + w.beginRestoreFromBackupBlob.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginRestoreFromBackupBlob) { + w.beginRestoreFromBackupBlob.remove(req) + } + + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchBeginRestoreFromBackupBlobSlot(req *http.Request) (*http.Response, error) { + if w.srv.BeginRestoreFromBackupBlobSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginRestoreFromBackupBlobSlot not implemented")} + } + beginRestoreFromBackupBlobSlot := w.beginRestoreFromBackupBlobSlot.get(req) + if beginRestoreFromBackupBlobSlot == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/restoreFromBackupBlob` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.RestoreRequest](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.BeginRestoreFromBackupBlobSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginRestoreFromBackupBlobSlot = &respr + w.beginRestoreFromBackupBlobSlot.add(req, beginRestoreFromBackupBlobSlot) + } + + resp, err := server.PollerResponderNext(beginRestoreFromBackupBlobSlot, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + w.beginRestoreFromBackupBlobSlot.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginRestoreFromBackupBlobSlot) { + w.beginRestoreFromBackupBlobSlot.remove(req) + } + + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchBeginRestoreFromDeletedApp(req *http.Request) (*http.Response, error) { + if w.srv.BeginRestoreFromDeletedApp == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginRestoreFromDeletedApp not implemented")} + } + beginRestoreFromDeletedApp := w.beginRestoreFromDeletedApp.get(req) + if beginRestoreFromDeletedApp == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/restoreFromDeletedApp` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.DeletedAppRestoreRequest](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.BeginRestoreFromDeletedApp(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginRestoreFromDeletedApp = &respr + w.beginRestoreFromDeletedApp.add(req, beginRestoreFromDeletedApp) + } + + resp, err := server.PollerResponderNext(beginRestoreFromDeletedApp, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + w.beginRestoreFromDeletedApp.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginRestoreFromDeletedApp) { + w.beginRestoreFromDeletedApp.remove(req) + } + + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchBeginRestoreFromDeletedAppSlot(req *http.Request) (*http.Response, error) { + if w.srv.BeginRestoreFromDeletedAppSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginRestoreFromDeletedAppSlot not implemented")} + } + beginRestoreFromDeletedAppSlot := w.beginRestoreFromDeletedAppSlot.get(req) + if beginRestoreFromDeletedAppSlot == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/restoreFromDeletedApp` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.DeletedAppRestoreRequest](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.BeginRestoreFromDeletedAppSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginRestoreFromDeletedAppSlot = &respr + w.beginRestoreFromDeletedAppSlot.add(req, beginRestoreFromDeletedAppSlot) + } + + resp, err := server.PollerResponderNext(beginRestoreFromDeletedAppSlot, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + w.beginRestoreFromDeletedAppSlot.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginRestoreFromDeletedAppSlot) { + w.beginRestoreFromDeletedAppSlot.remove(req) + } + + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchBeginRestoreSlot(req *http.Request) (*http.Response, error) { + if w.srv.BeginRestoreSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginRestoreSlot not implemented")} + } + beginRestoreSlot := w.beginRestoreSlot.get(req) + if beginRestoreSlot == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/backups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/restore` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.RestoreRequest](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + backupIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("backupId")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.BeginRestoreSlot(req.Context(), resourceGroupNameParam, nameParam, backupIDParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginRestoreSlot = &respr + w.beginRestoreSlot.add(req, beginRestoreSlot) + } + + resp, err := server.PollerResponderNext(beginRestoreSlot, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + w.beginRestoreSlot.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginRestoreSlot) { + w.beginRestoreSlot.remove(req) + } + + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchBeginRestoreSnapshot(req *http.Request) (*http.Response, error) { + if w.srv.BeginRestoreSnapshot == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginRestoreSnapshot not implemented")} + } + beginRestoreSnapshot := w.beginRestoreSnapshot.get(req) + if beginRestoreSnapshot == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/restoreSnapshot` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.SnapshotRestoreRequest](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.BeginRestoreSnapshot(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginRestoreSnapshot = &respr + w.beginRestoreSnapshot.add(req, beginRestoreSnapshot) + } + + resp, err := server.PollerResponderNext(beginRestoreSnapshot, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + w.beginRestoreSnapshot.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginRestoreSnapshot) { + w.beginRestoreSnapshot.remove(req) + } + + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchBeginRestoreSnapshotSlot(req *http.Request) (*http.Response, error) { + if w.srv.BeginRestoreSnapshotSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginRestoreSnapshotSlot not implemented")} + } + beginRestoreSnapshotSlot := w.beginRestoreSnapshotSlot.get(req) + if beginRestoreSnapshotSlot == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/restoreSnapshot` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.SnapshotRestoreRequest](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.BeginRestoreSnapshotSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginRestoreSnapshotSlot = &respr + w.beginRestoreSnapshotSlot.add(req, beginRestoreSnapshotSlot) + } + + resp, err := server.PollerResponderNext(beginRestoreSnapshotSlot, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + w.beginRestoreSnapshotSlot.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginRestoreSnapshotSlot) { + w.beginRestoreSnapshotSlot.remove(req) + } + + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchRunTriggeredWebJob(req *http.Request) (*http.Response, error) { + if w.srv.RunTriggeredWebJob == nil { + return nil, &nonRetriableError{errors.New("fake for method RunTriggeredWebJob not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/triggeredwebjobs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/run` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + webJobNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("webJobName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.RunTriggeredWebJob(req.Context(), resourceGroupNameParam, nameParam, webJobNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchRunTriggeredWebJobSlot(req *http.Request) (*http.Response, error) { + if w.srv.RunTriggeredWebJobSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method RunTriggeredWebJobSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/triggeredwebjobs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/run` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + webJobNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("webJobName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.RunTriggeredWebJobSlot(req.Context(), resourceGroupNameParam, nameParam, webJobNameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchStart(req *http.Request) (*http.Response, error) { + if w.srv.Start == nil { + return nil, &nonRetriableError{errors.New("fake for method Start not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/start` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.Start(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchStartContinuousWebJob(req *http.Request) (*http.Response, error) { + if w.srv.StartContinuousWebJob == nil { + return nil, &nonRetriableError{errors.New("fake for method StartContinuousWebJob not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/continuouswebjobs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/start` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + webJobNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("webJobName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.StartContinuousWebJob(req.Context(), resourceGroupNameParam, nameParam, webJobNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchStartContinuousWebJobSlot(req *http.Request) (*http.Response, error) { + if w.srv.StartContinuousWebJobSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method StartContinuousWebJobSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/continuouswebjobs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/start` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + webJobNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("webJobName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.StartContinuousWebJobSlot(req.Context(), resourceGroupNameParam, nameParam, webJobNameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchBeginStartNetworkTrace(req *http.Request) (*http.Response, error) { + if w.srv.BeginStartNetworkTrace == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginStartNetworkTrace not implemented")} + } + beginStartNetworkTrace := w.beginStartNetworkTrace.get(req) + if beginStartNetworkTrace == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/startNetworkTrace` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + durationInSecondsUnescaped, err := url.QueryUnescape(qp.Get("durationInSeconds")) + if err != nil { + return nil, err + } + durationInSecondsParam, err := parseOptional(durationInSecondsUnescaped, func(v string) (int32, error) { + p, parseErr := strconv.ParseInt(v, 10, 32) + if parseErr != nil { + return 0, parseErr + } + return int32(p), nil + }) + if err != nil { + return nil, err + } + maxFrameLengthUnescaped, err := url.QueryUnescape(qp.Get("maxFrameLength")) + if err != nil { + return nil, err + } + maxFrameLengthParam, err := parseOptional(maxFrameLengthUnescaped, func(v string) (int32, error) { + p, parseErr := strconv.ParseInt(v, 10, 32) + if parseErr != nil { + return 0, parseErr + } + return int32(p), nil + }) + if err != nil { + return nil, err + } + sasURLUnescaped, err := url.QueryUnescape(qp.Get("sasUrl")) + if err != nil { + return nil, err + } + sasURLParam := getOptional(sasURLUnescaped) + var options *armappservice.WebAppsClientBeginStartNetworkTraceOptions + if durationInSecondsParam != nil || maxFrameLengthParam != nil || sasURLParam != nil { + options = &armappservice.WebAppsClientBeginStartNetworkTraceOptions{ + DurationInSeconds: durationInSecondsParam, + MaxFrameLength: maxFrameLengthParam, + SasURL: sasURLParam, + } + } + respr, errRespr := w.srv.BeginStartNetworkTrace(req.Context(), resourceGroupNameParam, nameParam, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginStartNetworkTrace = &respr + w.beginStartNetworkTrace.add(req, beginStartNetworkTrace) + } + + resp, err := server.PollerResponderNext(beginStartNetworkTrace, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + w.beginStartNetworkTrace.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginStartNetworkTrace) { + w.beginStartNetworkTrace.remove(req) + } + + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchBeginStartNetworkTraceSlot(req *http.Request) (*http.Response, error) { + if w.srv.BeginStartNetworkTraceSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginStartNetworkTraceSlot not implemented")} + } + beginStartNetworkTraceSlot := w.beginStartNetworkTraceSlot.get(req) + if beginStartNetworkTraceSlot == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/startNetworkTrace` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + durationInSecondsUnescaped, err := url.QueryUnescape(qp.Get("durationInSeconds")) + if err != nil { + return nil, err + } + durationInSecondsParam, err := parseOptional(durationInSecondsUnescaped, func(v string) (int32, error) { + p, parseErr := strconv.ParseInt(v, 10, 32) + if parseErr != nil { + return 0, parseErr + } + return int32(p), nil + }) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + maxFrameLengthUnescaped, err := url.QueryUnescape(qp.Get("maxFrameLength")) + if err != nil { + return nil, err + } + maxFrameLengthParam, err := parseOptional(maxFrameLengthUnescaped, func(v string) (int32, error) { + p, parseErr := strconv.ParseInt(v, 10, 32) + if parseErr != nil { + return 0, parseErr + } + return int32(p), nil + }) + if err != nil { + return nil, err + } + sasURLUnescaped, err := url.QueryUnescape(qp.Get("sasUrl")) + if err != nil { + return nil, err + } + sasURLParam := getOptional(sasURLUnescaped) + var options *armappservice.WebAppsClientBeginStartNetworkTraceSlotOptions + if durationInSecondsParam != nil || maxFrameLengthParam != nil || sasURLParam != nil { + options = &armappservice.WebAppsClientBeginStartNetworkTraceSlotOptions{ + DurationInSeconds: durationInSecondsParam, + MaxFrameLength: maxFrameLengthParam, + SasURL: sasURLParam, + } + } + respr, errRespr := w.srv.BeginStartNetworkTraceSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginStartNetworkTraceSlot = &respr + w.beginStartNetworkTraceSlot.add(req, beginStartNetworkTraceSlot) + } + + resp, err := server.PollerResponderNext(beginStartNetworkTraceSlot, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + w.beginStartNetworkTraceSlot.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginStartNetworkTraceSlot) { + w.beginStartNetworkTraceSlot.remove(req) + } + + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchStartSlot(req *http.Request) (*http.Response, error) { + if w.srv.StartSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method StartSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/start` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.StartSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchStartWebSiteNetworkTrace(req *http.Request) (*http.Response, error) { + if w.srv.StartWebSiteNetworkTrace == nil { + return nil, &nonRetriableError{errors.New("fake for method StartWebSiteNetworkTrace not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkTrace/start` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + durationInSecondsUnescaped, err := url.QueryUnescape(qp.Get("durationInSeconds")) + if err != nil { + return nil, err + } + durationInSecondsParam, err := parseOptional(durationInSecondsUnescaped, func(v string) (int32, error) { + p, parseErr := strconv.ParseInt(v, 10, 32) + if parseErr != nil { + return 0, parseErr + } + return int32(p), nil + }) + if err != nil { + return nil, err + } + maxFrameLengthUnescaped, err := url.QueryUnescape(qp.Get("maxFrameLength")) + if err != nil { + return nil, err + } + maxFrameLengthParam, err := parseOptional(maxFrameLengthUnescaped, func(v string) (int32, error) { + p, parseErr := strconv.ParseInt(v, 10, 32) + if parseErr != nil { + return 0, parseErr + } + return int32(p), nil + }) + if err != nil { + return nil, err + } + sasURLUnescaped, err := url.QueryUnescape(qp.Get("sasUrl")) + if err != nil { + return nil, err + } + sasURLParam := getOptional(sasURLUnescaped) + var options *armappservice.WebAppsClientStartWebSiteNetworkTraceOptions + if durationInSecondsParam != nil || maxFrameLengthParam != nil || sasURLParam != nil { + options = &armappservice.WebAppsClientStartWebSiteNetworkTraceOptions{ + DurationInSeconds: durationInSecondsParam, + MaxFrameLength: maxFrameLengthParam, + SasURL: sasURLParam, + } + } + respr, errRespr := w.srv.StartWebSiteNetworkTrace(req.Context(), resourceGroupNameParam, nameParam, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).Value, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchBeginStartWebSiteNetworkTraceOperation(req *http.Request) (*http.Response, error) { + if w.srv.BeginStartWebSiteNetworkTraceOperation == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginStartWebSiteNetworkTraceOperation not implemented")} + } + beginStartWebSiteNetworkTraceOperation := w.beginStartWebSiteNetworkTraceOperation.get(req) + if beginStartWebSiteNetworkTraceOperation == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkTrace/startOperation` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + durationInSecondsUnescaped, err := url.QueryUnescape(qp.Get("durationInSeconds")) + if err != nil { + return nil, err + } + durationInSecondsParam, err := parseOptional(durationInSecondsUnescaped, func(v string) (int32, error) { + p, parseErr := strconv.ParseInt(v, 10, 32) + if parseErr != nil { + return 0, parseErr + } + return int32(p), nil + }) + if err != nil { + return nil, err + } + maxFrameLengthUnescaped, err := url.QueryUnescape(qp.Get("maxFrameLength")) + if err != nil { + return nil, err + } + maxFrameLengthParam, err := parseOptional(maxFrameLengthUnescaped, func(v string) (int32, error) { + p, parseErr := strconv.ParseInt(v, 10, 32) + if parseErr != nil { + return 0, parseErr + } + return int32(p), nil + }) + if err != nil { + return nil, err + } + sasURLUnescaped, err := url.QueryUnescape(qp.Get("sasUrl")) + if err != nil { + return nil, err + } + sasURLParam := getOptional(sasURLUnescaped) + var options *armappservice.WebAppsClientBeginStartWebSiteNetworkTraceOperationOptions + if durationInSecondsParam != nil || maxFrameLengthParam != nil || sasURLParam != nil { + options = &armappservice.WebAppsClientBeginStartWebSiteNetworkTraceOperationOptions{ + DurationInSeconds: durationInSecondsParam, + MaxFrameLength: maxFrameLengthParam, + SasURL: sasURLParam, + } + } + respr, errRespr := w.srv.BeginStartWebSiteNetworkTraceOperation(req.Context(), resourceGroupNameParam, nameParam, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginStartWebSiteNetworkTraceOperation = &respr + w.beginStartWebSiteNetworkTraceOperation.add(req, beginStartWebSiteNetworkTraceOperation) + } + + resp, err := server.PollerResponderNext(beginStartWebSiteNetworkTraceOperation, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + w.beginStartWebSiteNetworkTraceOperation.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginStartWebSiteNetworkTraceOperation) { + w.beginStartWebSiteNetworkTraceOperation.remove(req) + } + + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchBeginStartWebSiteNetworkTraceOperationSlot(req *http.Request) (*http.Response, error) { + if w.srv.BeginStartWebSiteNetworkTraceOperationSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginStartWebSiteNetworkTraceOperationSlot not implemented")} + } + beginStartWebSiteNetworkTraceOperationSlot := w.beginStartWebSiteNetworkTraceOperationSlot.get(req) + if beginStartWebSiteNetworkTraceOperationSlot == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkTrace/startOperation` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + durationInSecondsUnescaped, err := url.QueryUnescape(qp.Get("durationInSeconds")) + if err != nil { + return nil, err + } + durationInSecondsParam, err := parseOptional(durationInSecondsUnescaped, func(v string) (int32, error) { + p, parseErr := strconv.ParseInt(v, 10, 32) + if parseErr != nil { + return 0, parseErr + } + return int32(p), nil + }) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + maxFrameLengthUnescaped, err := url.QueryUnescape(qp.Get("maxFrameLength")) + if err != nil { + return nil, err + } + maxFrameLengthParam, err := parseOptional(maxFrameLengthUnescaped, func(v string) (int32, error) { + p, parseErr := strconv.ParseInt(v, 10, 32) + if parseErr != nil { + return 0, parseErr + } + return int32(p), nil + }) + if err != nil { + return nil, err + } + sasURLUnescaped, err := url.QueryUnescape(qp.Get("sasUrl")) + if err != nil { + return nil, err + } + sasURLParam := getOptional(sasURLUnescaped) + var options *armappservice.WebAppsClientBeginStartWebSiteNetworkTraceOperationSlotOptions + if durationInSecondsParam != nil || maxFrameLengthParam != nil || sasURLParam != nil { + options = &armappservice.WebAppsClientBeginStartWebSiteNetworkTraceOperationSlotOptions{ + DurationInSeconds: durationInSecondsParam, + MaxFrameLength: maxFrameLengthParam, + SasURL: sasURLParam, + } + } + respr, errRespr := w.srv.BeginStartWebSiteNetworkTraceOperationSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginStartWebSiteNetworkTraceOperationSlot = &respr + w.beginStartWebSiteNetworkTraceOperationSlot.add(req, beginStartWebSiteNetworkTraceOperationSlot) + } + + resp, err := server.PollerResponderNext(beginStartWebSiteNetworkTraceOperationSlot, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + w.beginStartWebSiteNetworkTraceOperationSlot.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginStartWebSiteNetworkTraceOperationSlot) { + w.beginStartWebSiteNetworkTraceOperationSlot.remove(req) + } + + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchStartWebSiteNetworkTraceSlot(req *http.Request) (*http.Response, error) { + if w.srv.StartWebSiteNetworkTraceSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method StartWebSiteNetworkTraceSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkTrace/start` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + durationInSecondsUnescaped, err := url.QueryUnescape(qp.Get("durationInSeconds")) + if err != nil { + return nil, err + } + durationInSecondsParam, err := parseOptional(durationInSecondsUnescaped, func(v string) (int32, error) { + p, parseErr := strconv.ParseInt(v, 10, 32) + if parseErr != nil { + return 0, parseErr + } + return int32(p), nil + }) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + maxFrameLengthUnescaped, err := url.QueryUnescape(qp.Get("maxFrameLength")) + if err != nil { + return nil, err + } + maxFrameLengthParam, err := parseOptional(maxFrameLengthUnescaped, func(v string) (int32, error) { + p, parseErr := strconv.ParseInt(v, 10, 32) + if parseErr != nil { + return 0, parseErr + } + return int32(p), nil + }) + if err != nil { + return nil, err + } + sasURLUnescaped, err := url.QueryUnescape(qp.Get("sasUrl")) + if err != nil { + return nil, err + } + sasURLParam := getOptional(sasURLUnescaped) + var options *armappservice.WebAppsClientStartWebSiteNetworkTraceSlotOptions + if durationInSecondsParam != nil || maxFrameLengthParam != nil || sasURLParam != nil { + options = &armappservice.WebAppsClientStartWebSiteNetworkTraceSlotOptions{ + DurationInSeconds: durationInSecondsParam, + MaxFrameLength: maxFrameLengthParam, + SasURL: sasURLParam, + } + } + respr, errRespr := w.srv.StartWebSiteNetworkTraceSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, options) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).Value, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchStop(req *http.Request) (*http.Response, error) { + if w.srv.Stop == nil { + return nil, &nonRetriableError{errors.New("fake for method Stop not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/stop` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.Stop(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchStopContinuousWebJob(req *http.Request) (*http.Response, error) { + if w.srv.StopContinuousWebJob == nil { + return nil, &nonRetriableError{errors.New("fake for method StopContinuousWebJob not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/continuouswebjobs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/stop` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + webJobNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("webJobName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.StopContinuousWebJob(req.Context(), resourceGroupNameParam, nameParam, webJobNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchStopContinuousWebJobSlot(req *http.Request) (*http.Response, error) { + if w.srv.StopContinuousWebJobSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method StopContinuousWebJobSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/continuouswebjobs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/stop` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + webJobNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("webJobName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.StopContinuousWebJobSlot(req.Context(), resourceGroupNameParam, nameParam, webJobNameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchStopNetworkTrace(req *http.Request) (*http.Response, error) { + if w.srv.StopNetworkTrace == nil { + return nil, &nonRetriableError{errors.New("fake for method StopNetworkTrace not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/stopNetworkTrace` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.StopNetworkTrace(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchStopNetworkTraceSlot(req *http.Request) (*http.Response, error) { + if w.srv.StopNetworkTraceSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method StopNetworkTraceSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/stopNetworkTrace` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.StopNetworkTraceSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchStopSlot(req *http.Request) (*http.Response, error) { + if w.srv.StopSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method StopSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/stop` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.StopSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchStopWebSiteNetworkTrace(req *http.Request) (*http.Response, error) { + if w.srv.StopWebSiteNetworkTrace == nil { + return nil, &nonRetriableError{errors.New("fake for method StopWebSiteNetworkTrace not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkTrace/stop` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.StopWebSiteNetworkTrace(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchStopWebSiteNetworkTraceSlot(req *http.Request) (*http.Response, error) { + if w.srv.StopWebSiteNetworkTraceSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method StopWebSiteNetworkTraceSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkTrace/stop` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.StopWebSiteNetworkTraceSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchBeginSwapSlot(req *http.Request) (*http.Response, error) { + if w.srv.BeginSwapSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginSwapSlot not implemented")} + } + beginSwapSlot := w.beginSwapSlot.get(req) + if beginSwapSlot == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slotsswap` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.CsmSlotEntity](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.BeginSwapSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginSwapSlot = &respr + w.beginSwapSlot.add(req, beginSwapSlot) + } + + resp, err := server.PollerResponderNext(beginSwapSlot, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + w.beginSwapSlot.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginSwapSlot) { + w.beginSwapSlot.remove(req) + } + + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchBeginSwapSlotWithProduction(req *http.Request) (*http.Response, error) { + if w.srv.BeginSwapSlotWithProduction == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginSwapSlotWithProduction not implemented")} + } + beginSwapSlotWithProduction := w.beginSwapSlotWithProduction.get(req) + if beginSwapSlotWithProduction == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slotsswap` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.CsmSlotEntity](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.BeginSwapSlotWithProduction(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginSwapSlotWithProduction = &respr + w.beginSwapSlotWithProduction.add(req, beginSwapSlotWithProduction) + } + + resp, err := server.PollerResponderNext(beginSwapSlotWithProduction, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + w.beginSwapSlotWithProduction.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginSwapSlotWithProduction) { + w.beginSwapSlotWithProduction.remove(req) + } + + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchSyncFunctionTriggers(req *http.Request) (*http.Response, error) { + if w.srv.SyncFunctionTriggers == nil { + return nil, &nonRetriableError{errors.New("fake for method SyncFunctionTriggers not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/syncfunctiontriggers` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.SyncFunctionTriggers(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchSyncFunctionTriggersSlot(req *http.Request) (*http.Response, error) { + if w.srv.SyncFunctionTriggersSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method SyncFunctionTriggersSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/syncfunctiontriggers` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.SyncFunctionTriggersSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchSyncFunctions(req *http.Request) (*http.Response, error) { + if w.srv.SyncFunctions == nil { + return nil, &nonRetriableError{errors.New("fake for method SyncFunctions not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/host/default/sync` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.SyncFunctions(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchSyncFunctionsSlot(req *http.Request) (*http.Response, error) { + if w.srv.SyncFunctionsSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method SyncFunctionsSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/host/default/sync` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.SyncFunctionsSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchSyncRepository(req *http.Request) (*http.Response, error) { + if w.srv.SyncRepository == nil { + return nil, &nonRetriableError{errors.New("fake for method SyncRepository not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/sync` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.SyncRepository(req.Context(), resourceGroupNameParam, nameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchSyncRepositorySlot(req *http.Request) (*http.Response, error) { + if w.srv.SyncRepositorySlot == nil { + return nil, &nonRetriableError{errors.New("fake for method SyncRepositorySlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/sync` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.SyncRepositorySlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdate(req *http.Request) (*http.Response, error) { + if w.srv.Update == nil { + return nil, &nonRetriableError{errors.New("fake for method Update not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.SitePatchResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.Update(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusAccepted}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).Site, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateApplicationSettings(req *http.Request) (*http.Response, error) { + if w.srv.UpdateApplicationSettings == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateApplicationSettings not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/appsettings` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.StringDictionary](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateApplicationSettings(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).StringDictionary, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateApplicationSettingsSlot(req *http.Request) (*http.Response, error) { + if w.srv.UpdateApplicationSettingsSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateApplicationSettingsSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/appsettings` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.StringDictionary](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateApplicationSettingsSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).StringDictionary, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateAuthSettings(req *http.Request) (*http.Response, error) { + if w.srv.UpdateAuthSettings == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateAuthSettings not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/authsettings` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.SiteAuthSettings](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateAuthSettings(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SiteAuthSettings, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateAuthSettingsSlot(req *http.Request) (*http.Response, error) { + if w.srv.UpdateAuthSettingsSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateAuthSettingsSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/authsettings` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.SiteAuthSettings](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateAuthSettingsSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SiteAuthSettings, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateAuthSettingsV2(req *http.Request) (*http.Response, error) { + if w.srv.UpdateAuthSettingsV2 == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateAuthSettingsV2 not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/authsettingsV2` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.SiteAuthSettingsV2](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateAuthSettingsV2(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SiteAuthSettingsV2, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateAuthSettingsV2Slot(req *http.Request) (*http.Response, error) { + if w.srv.UpdateAuthSettingsV2Slot == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateAuthSettingsV2Slot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/authsettingsV2` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.SiteAuthSettingsV2](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateAuthSettingsV2Slot(req.Context(), resourceGroupNameParam, nameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SiteAuthSettingsV2, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateAzureStorageAccounts(req *http.Request) (*http.Response, error) { + if w.srv.UpdateAzureStorageAccounts == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateAzureStorageAccounts not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/azurestorageaccounts` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.AzureStoragePropertyDictionaryResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateAzureStorageAccounts(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).AzureStoragePropertyDictionaryResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateAzureStorageAccountsSlot(req *http.Request) (*http.Response, error) { + if w.srv.UpdateAzureStorageAccountsSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateAzureStorageAccountsSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/azurestorageaccounts` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.AzureStoragePropertyDictionaryResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateAzureStorageAccountsSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).AzureStoragePropertyDictionaryResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateBackupConfiguration(req *http.Request) (*http.Response, error) { + if w.srv.UpdateBackupConfiguration == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateBackupConfiguration not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/backup` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.BackupRequest](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateBackupConfiguration(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).BackupRequest, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateBackupConfigurationSlot(req *http.Request) (*http.Response, error) { + if w.srv.UpdateBackupConfigurationSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateBackupConfigurationSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/backup` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.BackupRequest](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateBackupConfigurationSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).BackupRequest, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateConfiguration(req *http.Request) (*http.Response, error) { + if w.srv.UpdateConfiguration == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateConfiguration not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/web` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.SiteConfigResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateConfiguration(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SiteConfigResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateConfigurationSlot(req *http.Request) (*http.Response, error) { + if w.srv.UpdateConfigurationSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateConfigurationSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/web` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.SiteConfigResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateConfigurationSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SiteConfigResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateConnectionStrings(req *http.Request) (*http.Response, error) { + if w.srv.UpdateConnectionStrings == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateConnectionStrings not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/connectionstrings` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.ConnectionStringDictionary](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateConnectionStrings(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).ConnectionStringDictionary, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateConnectionStringsSlot(req *http.Request) (*http.Response, error) { + if w.srv.UpdateConnectionStringsSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateConnectionStringsSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/connectionstrings` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.ConnectionStringDictionary](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateConnectionStringsSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).ConnectionStringDictionary, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateDiagnosticLogsConfig(req *http.Request) (*http.Response, error) { + if w.srv.UpdateDiagnosticLogsConfig == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateDiagnosticLogsConfig not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/logs` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.SiteLogsConfig](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateDiagnosticLogsConfig(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SiteLogsConfig, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateDiagnosticLogsConfigSlot(req *http.Request) (*http.Response, error) { + if w.srv.UpdateDiagnosticLogsConfigSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateDiagnosticLogsConfigSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/logs` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.SiteLogsConfig](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateDiagnosticLogsConfigSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SiteLogsConfig, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateDomainOwnershipIdentifier(req *http.Request) (*http.Response, error) { + if w.srv.UpdateDomainOwnershipIdentifier == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateDomainOwnershipIdentifier not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/domainOwnershipIdentifiers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.Identifier](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + domainOwnershipIdentifierNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("domainOwnershipIdentifierName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateDomainOwnershipIdentifier(req.Context(), resourceGroupNameParam, nameParam, domainOwnershipIdentifierNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).Identifier, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateDomainOwnershipIdentifierSlot(req *http.Request) (*http.Response, error) { + if w.srv.UpdateDomainOwnershipIdentifierSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateDomainOwnershipIdentifierSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/domainOwnershipIdentifiers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.Identifier](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + domainOwnershipIdentifierNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("domainOwnershipIdentifierName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateDomainOwnershipIdentifierSlot(req.Context(), resourceGroupNameParam, nameParam, domainOwnershipIdentifierNameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).Identifier, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateFtpAllowed(req *http.Request) (*http.Response, error) { + if w.srv.UpdateFtpAllowed == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateFtpAllowed not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/basicPublishingCredentialsPolicies/ftp` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.CsmPublishingCredentialsPoliciesEntity](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateFtpAllowed(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).CsmPublishingCredentialsPoliciesEntity, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateFtpAllowedSlot(req *http.Request) (*http.Response, error) { + if w.srv.UpdateFtpAllowedSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateFtpAllowedSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/basicPublishingCredentialsPolicies/ftp` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.CsmPublishingCredentialsPoliciesEntity](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateFtpAllowedSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).CsmPublishingCredentialsPoliciesEntity, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateHybridConnection(req *http.Request) (*http.Response, error) { + if w.srv.UpdateHybridConnection == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateHybridConnection not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hybridConnectionNamespaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/relays/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.HybridConnection](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + namespaceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("namespaceName")]) + if err != nil { + return nil, err + } + relayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("relayName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateHybridConnection(req.Context(), resourceGroupNameParam, nameParam, namespaceNameParam, relayNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).HybridConnection, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateHybridConnectionSlot(req *http.Request) (*http.Response, error) { + if w.srv.UpdateHybridConnectionSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateHybridConnectionSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hybridConnectionNamespaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/relays/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 6 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.HybridConnection](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + namespaceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("namespaceName")]) + if err != nil { + return nil, err + } + relayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("relayName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateHybridConnectionSlot(req.Context(), resourceGroupNameParam, nameParam, namespaceNameParam, relayNameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).HybridConnection, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateMetadata(req *http.Request) (*http.Response, error) { + if w.srv.UpdateMetadata == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateMetadata not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/metadata` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.StringDictionary](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateMetadata(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).StringDictionary, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateMetadataSlot(req *http.Request) (*http.Response, error) { + if w.srv.UpdateMetadataSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateMetadataSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/metadata` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.StringDictionary](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateMetadataSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).StringDictionary, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdatePremierAddOn(req *http.Request) (*http.Response, error) { + if w.srv.UpdatePremierAddOn == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdatePremierAddOn not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/premieraddons/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.PremierAddOnPatchResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + premierAddOnNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("premierAddOnName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdatePremierAddOn(req.Context(), resourceGroupNameParam, nameParam, premierAddOnNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).PremierAddOn, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdatePremierAddOnSlot(req *http.Request) (*http.Response, error) { + if w.srv.UpdatePremierAddOnSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdatePremierAddOnSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/premieraddons/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.PremierAddOnPatchResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + premierAddOnNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("premierAddOnName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdatePremierAddOnSlot(req.Context(), resourceGroupNameParam, nameParam, premierAddOnNameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).PremierAddOn, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateRelayServiceConnection(req *http.Request) (*http.Response, error) { + if w.srv.UpdateRelayServiceConnection == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateRelayServiceConnection not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hybridconnection/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.RelayServiceConnectionEntity](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + entityNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("entityName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateRelayServiceConnection(req.Context(), resourceGroupNameParam, nameParam, entityNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).RelayServiceConnectionEntity, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateRelayServiceConnectionSlot(req *http.Request) (*http.Response, error) { + if w.srv.UpdateRelayServiceConnectionSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateRelayServiceConnectionSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hybridconnection/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.RelayServiceConnectionEntity](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + entityNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("entityName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateRelayServiceConnectionSlot(req.Context(), resourceGroupNameParam, nameParam, entityNameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).RelayServiceConnectionEntity, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateScmAllowed(req *http.Request) (*http.Response, error) { + if w.srv.UpdateScmAllowed == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateScmAllowed not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/basicPublishingCredentialsPolicies/scm` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.CsmPublishingCredentialsPoliciesEntity](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateScmAllowed(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).CsmPublishingCredentialsPoliciesEntity, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateScmAllowedSlot(req *http.Request) (*http.Response, error) { + if w.srv.UpdateScmAllowedSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateScmAllowedSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/basicPublishingCredentialsPolicies/scm` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.CsmPublishingCredentialsPoliciesEntity](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateScmAllowedSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).CsmPublishingCredentialsPoliciesEntity, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateSitePushSettings(req *http.Request) (*http.Response, error) { + if w.srv.UpdateSitePushSettings == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateSitePushSettings not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/pushsettings` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.PushSettings](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateSitePushSettings(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).PushSettings, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateSitePushSettingsSlot(req *http.Request) (*http.Response, error) { + if w.srv.UpdateSitePushSettingsSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateSitePushSettingsSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/pushsettings` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.PushSettings](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateSitePushSettingsSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).PushSettings, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateSlot(req *http.Request) (*http.Response, error) { + if w.srv.UpdateSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.SitePatchResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusAccepted}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).Site, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateSlotConfigurationNames(req *http.Request) (*http.Response, error) { + if w.srv.UpdateSlotConfigurationNames == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateSlotConfigurationNames not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/config/slotConfigNames` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.SlotConfigNamesResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateSlotConfigurationNames(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SlotConfigNamesResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateSourceControl(req *http.Request) (*http.Response, error) { + if w.srv.UpdateSourceControl == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateSourceControl not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/sourcecontrols/web` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.SiteSourceControl](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateSourceControl(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusCreated, http.StatusAccepted}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated, http.StatusAccepted", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SiteSourceControl, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateSourceControlSlot(req *http.Request) (*http.Response, error) { + if w.srv.UpdateSourceControlSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateSourceControlSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/sourcecontrols/web` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.SiteSourceControl](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateSourceControlSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK, http.StatusCreated, http.StatusAccepted}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated, http.StatusAccepted", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SiteSourceControl, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateSwiftVirtualNetworkConnectionWithCheck(req *http.Request) (*http.Response, error) { + if w.srv.UpdateSwiftVirtualNetworkConnectionWithCheck == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateSwiftVirtualNetworkConnectionWithCheck not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkConfig/virtualNetwork` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 3 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.SwiftVirtualNetwork](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateSwiftVirtualNetworkConnectionWithCheck(req.Context(), resourceGroupNameParam, nameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SwiftVirtualNetwork, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateSwiftVirtualNetworkConnectionWithCheckSlot(req *http.Request) (*http.Response, error) { + if w.srv.UpdateSwiftVirtualNetworkConnectionWithCheckSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateSwiftVirtualNetworkConnectionWithCheckSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkConfig/virtualNetwork` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.SwiftVirtualNetwork](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateSwiftVirtualNetworkConnectionWithCheckSlot(req.Context(), resourceGroupNameParam, nameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SwiftVirtualNetwork, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateVnetConnection(req *http.Request) (*http.Response, error) { + if w.srv.UpdateVnetConnection == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateVnetConnection not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.VnetInfoResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + vnetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vnetName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateVnetConnection(req.Context(), resourceGroupNameParam, nameParam, vnetNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).VnetInfoResource, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateVnetConnectionGateway(req *http.Request) (*http.Response, error) { + if w.srv.UpdateVnetConnectionGateway == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateVnetConnectionGateway not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/gateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.VnetGateway](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + vnetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vnetName")]) + if err != nil { + return nil, err + } + gatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateVnetConnectionGateway(req.Context(), resourceGroupNameParam, nameParam, vnetNameParam, gatewayNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).VnetGateway, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateVnetConnectionGatewaySlot(req *http.Request) (*http.Response, error) { + if w.srv.UpdateVnetConnectionGatewaySlot == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateVnetConnectionGatewaySlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/gateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 6 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.VnetGateway](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + vnetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vnetName")]) + if err != nil { + return nil, err + } + gatewayNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("gatewayName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateVnetConnectionGatewaySlot(req.Context(), resourceGroupNameParam, nameParam, vnetNameParam, gatewayNameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).VnetGateway, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebAppsServerTransport) dispatchUpdateVnetConnectionSlot(req *http.Request) (*http.Response, error) { + if w.srv.UpdateVnetConnectionSlot == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateVnetConnectionSlot not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/slots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.VnetInfoResource](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + vnetNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("vnetName")]) + if err != nil { + return nil, err + } + slotParam, err := url.PathUnescape(matches[regex.SubexpIndex("slot")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateVnetConnectionSlot(req.Context(), resourceGroupNameParam, nameParam, vnetNameParam, slotParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).VnetInfoResource, req) + if err != nil { + return nil, err + } + return resp, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/fake/websitemanagement_server.go b/sdk/resourcemanager/appservice/armappservice/fake/websitemanagement_server.go new file mode 100644 index 000000000000..1195181a4a5e --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/fake/websitemanagement_server.go @@ -0,0 +1,796 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "context" + "errors" + "fmt" + azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" + "net/http" + "net/url" + "regexp" + "strconv" +) + +// WebSiteManagementServer is a fake server for instances of the armappservice.WebSiteManagementClient type. +type WebSiteManagementServer struct { + // CheckNameAvailability is the fake for method WebSiteManagementClient.CheckNameAvailability + // HTTP status codes to indicate success: http.StatusOK + CheckNameAvailability func(ctx context.Context, request armappservice.ResourceNameAvailabilityRequest, options *armappservice.WebSiteManagementClientCheckNameAvailabilityOptions) (resp azfake.Responder[armappservice.WebSiteManagementClientCheckNameAvailabilityResponse], errResp azfake.ErrorResponder) + + // GetPublishingUser is the fake for method WebSiteManagementClient.GetPublishingUser + // HTTP status codes to indicate success: http.StatusOK + GetPublishingUser func(ctx context.Context, options *armappservice.WebSiteManagementClientGetPublishingUserOptions) (resp azfake.Responder[armappservice.WebSiteManagementClientGetPublishingUserResponse], errResp azfake.ErrorResponder) + + // GetSourceControl is the fake for method WebSiteManagementClient.GetSourceControl + // HTTP status codes to indicate success: http.StatusOK + GetSourceControl func(ctx context.Context, sourceControlType string, options *armappservice.WebSiteManagementClientGetSourceControlOptions) (resp azfake.Responder[armappservice.WebSiteManagementClientGetSourceControlResponse], errResp azfake.ErrorResponder) + + // GetSubscriptionDeploymentLocations is the fake for method WebSiteManagementClient.GetSubscriptionDeploymentLocations + // HTTP status codes to indicate success: http.StatusOK + GetSubscriptionDeploymentLocations func(ctx context.Context, options *armappservice.WebSiteManagementClientGetSubscriptionDeploymentLocationsOptions) (resp azfake.Responder[armappservice.WebSiteManagementClientGetSubscriptionDeploymentLocationsResponse], errResp azfake.ErrorResponder) + + // NewListAseRegionsPager is the fake for method WebSiteManagementClient.NewListAseRegionsPager + // HTTP status codes to indicate success: http.StatusOK + NewListAseRegionsPager func(options *armappservice.WebSiteManagementClientListAseRegionsOptions) (resp azfake.PagerResponder[armappservice.WebSiteManagementClientListAseRegionsResponse]) + + // NewListBillingMetersPager is the fake for method WebSiteManagementClient.NewListBillingMetersPager + // HTTP status codes to indicate success: http.StatusOK + NewListBillingMetersPager func(options *armappservice.WebSiteManagementClientListBillingMetersOptions) (resp azfake.PagerResponder[armappservice.WebSiteManagementClientListBillingMetersResponse]) + + // NewListCustomHostNameSitesPager is the fake for method WebSiteManagementClient.NewListCustomHostNameSitesPager + // HTTP status codes to indicate success: http.StatusOK + NewListCustomHostNameSitesPager func(options *armappservice.WebSiteManagementClientListCustomHostNameSitesOptions) (resp azfake.PagerResponder[armappservice.WebSiteManagementClientListCustomHostNameSitesResponse]) + + // NewListGeoRegionsPager is the fake for method WebSiteManagementClient.NewListGeoRegionsPager + // HTTP status codes to indicate success: http.StatusOK + NewListGeoRegionsPager func(options *armappservice.WebSiteManagementClientListGeoRegionsOptions) (resp azfake.PagerResponder[armappservice.WebSiteManagementClientListGeoRegionsResponse]) + + // NewListPremierAddOnOffersPager is the fake for method WebSiteManagementClient.NewListPremierAddOnOffersPager + // HTTP status codes to indicate success: http.StatusOK + NewListPremierAddOnOffersPager func(options *armappservice.WebSiteManagementClientListPremierAddOnOffersOptions) (resp azfake.PagerResponder[armappservice.WebSiteManagementClientListPremierAddOnOffersResponse]) + + // ListSKUs is the fake for method WebSiteManagementClient.ListSKUs + // HTTP status codes to indicate success: http.StatusOK + ListSKUs func(ctx context.Context, options *armappservice.WebSiteManagementClientListSKUsOptions) (resp azfake.Responder[armappservice.WebSiteManagementClientListSKUsResponse], errResp azfake.ErrorResponder) + + // NewListSiteIdentifiersAssignedToHostNamePager is the fake for method WebSiteManagementClient.NewListSiteIdentifiersAssignedToHostNamePager + // HTTP status codes to indicate success: http.StatusOK + NewListSiteIdentifiersAssignedToHostNamePager func(nameIdentifier armappservice.NameIdentifier, options *armappservice.WebSiteManagementClientListSiteIdentifiersAssignedToHostNameOptions) (resp azfake.PagerResponder[armappservice.WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse]) + + // NewListSourceControlsPager is the fake for method WebSiteManagementClient.NewListSourceControlsPager + // HTTP status codes to indicate success: http.StatusOK + NewListSourceControlsPager func(options *armappservice.WebSiteManagementClientListSourceControlsOptions) (resp azfake.PagerResponder[armappservice.WebSiteManagementClientListSourceControlsResponse]) + + // Move is the fake for method WebSiteManagementClient.Move + // HTTP status codes to indicate success: http.StatusNoContent + Move func(ctx context.Context, resourceGroupName string, moveResourceEnvelope armappservice.CsmMoveResourceEnvelope, options *armappservice.WebSiteManagementClientMoveOptions) (resp azfake.Responder[armappservice.WebSiteManagementClientMoveResponse], errResp azfake.ErrorResponder) + + // UpdatePublishingUser is the fake for method WebSiteManagementClient.UpdatePublishingUser + // HTTP status codes to indicate success: http.StatusOK + UpdatePublishingUser func(ctx context.Context, userDetails armappservice.User, options *armappservice.WebSiteManagementClientUpdatePublishingUserOptions) (resp azfake.Responder[armappservice.WebSiteManagementClientUpdatePublishingUserResponse], errResp azfake.ErrorResponder) + + // UpdateSourceControl is the fake for method WebSiteManagementClient.UpdateSourceControl + // HTTP status codes to indicate success: http.StatusOK + UpdateSourceControl func(ctx context.Context, sourceControlType string, requestMessage armappservice.SourceControl, options *armappservice.WebSiteManagementClientUpdateSourceControlOptions) (resp azfake.Responder[armappservice.WebSiteManagementClientUpdateSourceControlResponse], errResp azfake.ErrorResponder) + + // Validate is the fake for method WebSiteManagementClient.Validate + // HTTP status codes to indicate success: http.StatusOK + Validate func(ctx context.Context, resourceGroupName string, validateRequest armappservice.ValidateRequest, options *armappservice.WebSiteManagementClientValidateOptions) (resp azfake.Responder[armappservice.WebSiteManagementClientValidateResponse], errResp azfake.ErrorResponder) + + // ValidateMove is the fake for method WebSiteManagementClient.ValidateMove + // HTTP status codes to indicate success: http.StatusNoContent + ValidateMove func(ctx context.Context, resourceGroupName string, moveResourceEnvelope armappservice.CsmMoveResourceEnvelope, options *armappservice.WebSiteManagementClientValidateMoveOptions) (resp azfake.Responder[armappservice.WebSiteManagementClientValidateMoveResponse], errResp azfake.ErrorResponder) + + // VerifyHostingEnvironmentVnet is the fake for method WebSiteManagementClient.VerifyHostingEnvironmentVnet + // HTTP status codes to indicate success: http.StatusOK + VerifyHostingEnvironmentVnet func(ctx context.Context, parameters armappservice.VnetParameters, options *armappservice.WebSiteManagementClientVerifyHostingEnvironmentVnetOptions) (resp azfake.Responder[armappservice.WebSiteManagementClientVerifyHostingEnvironmentVnetResponse], errResp azfake.ErrorResponder) +} + +// NewWebSiteManagementServerTransport creates a new instance of WebSiteManagementServerTransport with the provided implementation. +// The returned WebSiteManagementServerTransport instance is connected to an instance of armappservice.WebSiteManagementClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewWebSiteManagementServerTransport(srv *WebSiteManagementServer) *WebSiteManagementServerTransport { + return &WebSiteManagementServerTransport{ + srv: srv, + newListAseRegionsPager: newTracker[azfake.PagerResponder[armappservice.WebSiteManagementClientListAseRegionsResponse]](), + newListBillingMetersPager: newTracker[azfake.PagerResponder[armappservice.WebSiteManagementClientListBillingMetersResponse]](), + newListCustomHostNameSitesPager: newTracker[azfake.PagerResponder[armappservice.WebSiteManagementClientListCustomHostNameSitesResponse]](), + newListGeoRegionsPager: newTracker[azfake.PagerResponder[armappservice.WebSiteManagementClientListGeoRegionsResponse]](), + newListPremierAddOnOffersPager: newTracker[azfake.PagerResponder[armappservice.WebSiteManagementClientListPremierAddOnOffersResponse]](), + newListSiteIdentifiersAssignedToHostNamePager: newTracker[azfake.PagerResponder[armappservice.WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse]](), + newListSourceControlsPager: newTracker[azfake.PagerResponder[armappservice.WebSiteManagementClientListSourceControlsResponse]](), + } +} + +// WebSiteManagementServerTransport connects instances of armappservice.WebSiteManagementClient to instances of WebSiteManagementServer. +// Don't use this type directly, use NewWebSiteManagementServerTransport instead. +type WebSiteManagementServerTransport struct { + srv *WebSiteManagementServer + newListAseRegionsPager *tracker[azfake.PagerResponder[armappservice.WebSiteManagementClientListAseRegionsResponse]] + newListBillingMetersPager *tracker[azfake.PagerResponder[armappservice.WebSiteManagementClientListBillingMetersResponse]] + newListCustomHostNameSitesPager *tracker[azfake.PagerResponder[armappservice.WebSiteManagementClientListCustomHostNameSitesResponse]] + newListGeoRegionsPager *tracker[azfake.PagerResponder[armappservice.WebSiteManagementClientListGeoRegionsResponse]] + newListPremierAddOnOffersPager *tracker[azfake.PagerResponder[armappservice.WebSiteManagementClientListPremierAddOnOffersResponse]] + newListSiteIdentifiersAssignedToHostNamePager *tracker[azfake.PagerResponder[armappservice.WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse]] + newListSourceControlsPager *tracker[azfake.PagerResponder[armappservice.WebSiteManagementClientListSourceControlsResponse]] +} + +// Do implements the policy.Transporter interface for WebSiteManagementServerTransport. +func (w *WebSiteManagementServerTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + var resp *http.Response + var err error + + switch method { + case "WebSiteManagementClient.CheckNameAvailability": + resp, err = w.dispatchCheckNameAvailability(req) + case "WebSiteManagementClient.GetPublishingUser": + resp, err = w.dispatchGetPublishingUser(req) + case "WebSiteManagementClient.GetSourceControl": + resp, err = w.dispatchGetSourceControl(req) + case "WebSiteManagementClient.GetSubscriptionDeploymentLocations": + resp, err = w.dispatchGetSubscriptionDeploymentLocations(req) + case "WebSiteManagementClient.NewListAseRegionsPager": + resp, err = w.dispatchNewListAseRegionsPager(req) + case "WebSiteManagementClient.NewListBillingMetersPager": + resp, err = w.dispatchNewListBillingMetersPager(req) + case "WebSiteManagementClient.NewListCustomHostNameSitesPager": + resp, err = w.dispatchNewListCustomHostNameSitesPager(req) + case "WebSiteManagementClient.NewListGeoRegionsPager": + resp, err = w.dispatchNewListGeoRegionsPager(req) + case "WebSiteManagementClient.NewListPremierAddOnOffersPager": + resp, err = w.dispatchNewListPremierAddOnOffersPager(req) + case "WebSiteManagementClient.ListSKUs": + resp, err = w.dispatchListSKUs(req) + case "WebSiteManagementClient.NewListSiteIdentifiersAssignedToHostNamePager": + resp, err = w.dispatchNewListSiteIdentifiersAssignedToHostNamePager(req) + case "WebSiteManagementClient.NewListSourceControlsPager": + resp, err = w.dispatchNewListSourceControlsPager(req) + case "WebSiteManagementClient.Move": + resp, err = w.dispatchMove(req) + case "WebSiteManagementClient.UpdatePublishingUser": + resp, err = w.dispatchUpdatePublishingUser(req) + case "WebSiteManagementClient.UpdateSourceControl": + resp, err = w.dispatchUpdateSourceControl(req) + case "WebSiteManagementClient.Validate": + resp, err = w.dispatchValidate(req) + case "WebSiteManagementClient.ValidateMove": + resp, err = w.dispatchValidateMove(req) + case "WebSiteManagementClient.VerifyHostingEnvironmentVnet": + resp, err = w.dispatchVerifyHostingEnvironmentVnet(req) + default: + err = fmt.Errorf("unhandled API %s", method) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func (w *WebSiteManagementServerTransport) dispatchCheckNameAvailability(req *http.Request) (*http.Response, error) { + if w.srv.CheckNameAvailability == nil { + return nil, &nonRetriableError{errors.New("fake for method CheckNameAvailability not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/checknameavailability` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 1 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.ResourceNameAvailabilityRequest](req) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.CheckNameAvailability(req.Context(), body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).ResourceNameAvailability, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebSiteManagementServerTransport) dispatchGetPublishingUser(req *http.Request) (*http.Response, error) { + if w.srv.GetPublishingUser == nil { + return nil, &nonRetriableError{errors.New("fake for method GetPublishingUser not implemented")} + } + respr, errRespr := w.srv.GetPublishingUser(req.Context(), nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).User, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebSiteManagementServerTransport) dispatchGetSourceControl(req *http.Request) (*http.Response, error) { + if w.srv.GetSourceControl == nil { + return nil, &nonRetriableError{errors.New("fake for method GetSourceControl not implemented")} + } + const regexStr = `/providers/Microsoft\.Web/sourcecontrols/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 1 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + sourceControlTypeParam, err := url.PathUnescape(matches[regex.SubexpIndex("sourceControlType")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetSourceControl(req.Context(), sourceControlTypeParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SourceControl, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebSiteManagementServerTransport) dispatchGetSubscriptionDeploymentLocations(req *http.Request) (*http.Response, error) { + if w.srv.GetSubscriptionDeploymentLocations == nil { + return nil, &nonRetriableError{errors.New("fake for method GetSubscriptionDeploymentLocations not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/deploymentLocations` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 1 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + respr, errRespr := w.srv.GetSubscriptionDeploymentLocations(req.Context(), nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).DeploymentLocations, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebSiteManagementServerTransport) dispatchNewListAseRegionsPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListAseRegionsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListAseRegionsPager not implemented")} + } + newListAseRegionsPager := w.newListAseRegionsPager.get(req) + if newListAseRegionsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/aseRegions` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 1 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resp := w.srv.NewListAseRegionsPager(nil) + newListAseRegionsPager = &resp + w.newListAseRegionsPager.add(req, newListAseRegionsPager) + server.PagerResponderInjectNextLinks(newListAseRegionsPager, req, func(page *armappservice.WebSiteManagementClientListAseRegionsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListAseRegionsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListAseRegionsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListAseRegionsPager) { + w.newListAseRegionsPager.remove(req) + } + return resp, nil +} + +func (w *WebSiteManagementServerTransport) dispatchNewListBillingMetersPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListBillingMetersPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListBillingMetersPager not implemented")} + } + newListBillingMetersPager := w.newListBillingMetersPager.get(req) + if newListBillingMetersPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/billingMeters` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 1 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + billingLocationUnescaped, err := url.QueryUnescape(qp.Get("billingLocation")) + if err != nil { + return nil, err + } + billingLocationParam := getOptional(billingLocationUnescaped) + oSTypeUnescaped, err := url.QueryUnescape(qp.Get("osType")) + if err != nil { + return nil, err + } + oSTypeParam := getOptional(oSTypeUnescaped) + var options *armappservice.WebSiteManagementClientListBillingMetersOptions + if billingLocationParam != nil || oSTypeParam != nil { + options = &armappservice.WebSiteManagementClientListBillingMetersOptions{ + BillingLocation: billingLocationParam, + OSType: oSTypeParam, + } + } + resp := w.srv.NewListBillingMetersPager(options) + newListBillingMetersPager = &resp + w.newListBillingMetersPager.add(req, newListBillingMetersPager) + server.PagerResponderInjectNextLinks(newListBillingMetersPager, req, func(page *armappservice.WebSiteManagementClientListBillingMetersResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListBillingMetersPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListBillingMetersPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListBillingMetersPager) { + w.newListBillingMetersPager.remove(req) + } + return resp, nil +} + +func (w *WebSiteManagementServerTransport) dispatchNewListCustomHostNameSitesPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListCustomHostNameSitesPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListCustomHostNameSitesPager not implemented")} + } + newListCustomHostNameSitesPager := w.newListCustomHostNameSitesPager.get(req) + if newListCustomHostNameSitesPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/customhostnameSites` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 1 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + hostnameUnescaped, err := url.QueryUnescape(qp.Get("hostname")) + if err != nil { + return nil, err + } + hostnameParam := getOptional(hostnameUnescaped) + var options *armappservice.WebSiteManagementClientListCustomHostNameSitesOptions + if hostnameParam != nil { + options = &armappservice.WebSiteManagementClientListCustomHostNameSitesOptions{ + Hostname: hostnameParam, + } + } + resp := w.srv.NewListCustomHostNameSitesPager(options) + newListCustomHostNameSitesPager = &resp + w.newListCustomHostNameSitesPager.add(req, newListCustomHostNameSitesPager) + server.PagerResponderInjectNextLinks(newListCustomHostNameSitesPager, req, func(page *armappservice.WebSiteManagementClientListCustomHostNameSitesResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListCustomHostNameSitesPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListCustomHostNameSitesPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListCustomHostNameSitesPager) { + w.newListCustomHostNameSitesPager.remove(req) + } + return resp, nil +} + +func (w *WebSiteManagementServerTransport) dispatchNewListGeoRegionsPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListGeoRegionsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListGeoRegionsPager not implemented")} + } + newListGeoRegionsPager := w.newListGeoRegionsPager.get(req) + if newListGeoRegionsPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/geoRegions` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 1 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + sKUUnescaped, err := url.QueryUnescape(qp.Get("sku")) + if err != nil { + return nil, err + } + sKUParam := getOptional(armappservice.SKUName(sKUUnescaped)) + linuxWorkersEnabledUnescaped, err := url.QueryUnescape(qp.Get("linuxWorkersEnabled")) + if err != nil { + return nil, err + } + linuxWorkersEnabledParam, err := parseOptional(linuxWorkersEnabledUnescaped, strconv.ParseBool) + if err != nil { + return nil, err + } + xenonWorkersEnabledUnescaped, err := url.QueryUnescape(qp.Get("xenonWorkersEnabled")) + if err != nil { + return nil, err + } + xenonWorkersEnabledParam, err := parseOptional(xenonWorkersEnabledUnescaped, strconv.ParseBool) + if err != nil { + return nil, err + } + linuxDynamicWorkersEnabledUnescaped, err := url.QueryUnescape(qp.Get("linuxDynamicWorkersEnabled")) + if err != nil { + return nil, err + } + linuxDynamicWorkersEnabledParam, err := parseOptional(linuxDynamicWorkersEnabledUnescaped, strconv.ParseBool) + if err != nil { + return nil, err + } + var options *armappservice.WebSiteManagementClientListGeoRegionsOptions + if sKUParam != nil || linuxWorkersEnabledParam != nil || xenonWorkersEnabledParam != nil || linuxDynamicWorkersEnabledParam != nil { + options = &armappservice.WebSiteManagementClientListGeoRegionsOptions{ + SKU: sKUParam, + LinuxWorkersEnabled: linuxWorkersEnabledParam, + XenonWorkersEnabled: xenonWorkersEnabledParam, + LinuxDynamicWorkersEnabled: linuxDynamicWorkersEnabledParam, + } + } + resp := w.srv.NewListGeoRegionsPager(options) + newListGeoRegionsPager = &resp + w.newListGeoRegionsPager.add(req, newListGeoRegionsPager) + server.PagerResponderInjectNextLinks(newListGeoRegionsPager, req, func(page *armappservice.WebSiteManagementClientListGeoRegionsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListGeoRegionsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListGeoRegionsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListGeoRegionsPager) { + w.newListGeoRegionsPager.remove(req) + } + return resp, nil +} + +func (w *WebSiteManagementServerTransport) dispatchNewListPremierAddOnOffersPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListPremierAddOnOffersPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListPremierAddOnOffersPager not implemented")} + } + newListPremierAddOnOffersPager := w.newListPremierAddOnOffersPager.get(req) + if newListPremierAddOnOffersPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/premieraddonoffers` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 1 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resp := w.srv.NewListPremierAddOnOffersPager(nil) + newListPremierAddOnOffersPager = &resp + w.newListPremierAddOnOffersPager.add(req, newListPremierAddOnOffersPager) + server.PagerResponderInjectNextLinks(newListPremierAddOnOffersPager, req, func(page *armappservice.WebSiteManagementClientListPremierAddOnOffersResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListPremierAddOnOffersPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListPremierAddOnOffersPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListPremierAddOnOffersPager) { + w.newListPremierAddOnOffersPager.remove(req) + } + return resp, nil +} + +func (w *WebSiteManagementServerTransport) dispatchListSKUs(req *http.Request) (*http.Response, error) { + if w.srv.ListSKUs == nil { + return nil, &nonRetriableError{errors.New("fake for method ListSKUs not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/skus` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 1 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + respr, errRespr := w.srv.ListSKUs(req.Context(), nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SKUInfos, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebSiteManagementServerTransport) dispatchNewListSiteIdentifiersAssignedToHostNamePager(req *http.Request) (*http.Response, error) { + if w.srv.NewListSiteIdentifiersAssignedToHostNamePager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListSiteIdentifiersAssignedToHostNamePager not implemented")} + } + newListSiteIdentifiersAssignedToHostNamePager := w.newListSiteIdentifiersAssignedToHostNamePager.get(req) + if newListSiteIdentifiersAssignedToHostNamePager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/listSitesAssignedToHostName` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 1 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.NameIdentifier](req) + if err != nil { + return nil, err + } + resp := w.srv.NewListSiteIdentifiersAssignedToHostNamePager(body, nil) + newListSiteIdentifiersAssignedToHostNamePager = &resp + w.newListSiteIdentifiersAssignedToHostNamePager.add(req, newListSiteIdentifiersAssignedToHostNamePager) + server.PagerResponderInjectNextLinks(newListSiteIdentifiersAssignedToHostNamePager, req, func(page *armappservice.WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListSiteIdentifiersAssignedToHostNamePager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListSiteIdentifiersAssignedToHostNamePager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListSiteIdentifiersAssignedToHostNamePager) { + w.newListSiteIdentifiersAssignedToHostNamePager.remove(req) + } + return resp, nil +} + +func (w *WebSiteManagementServerTransport) dispatchNewListSourceControlsPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListSourceControlsPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListSourceControlsPager not implemented")} + } + newListSourceControlsPager := w.newListSourceControlsPager.get(req) + if newListSourceControlsPager == nil { + resp := w.srv.NewListSourceControlsPager(nil) + newListSourceControlsPager = &resp + w.newListSourceControlsPager.add(req, newListSourceControlsPager) + server.PagerResponderInjectNextLinks(newListSourceControlsPager, req, func(page *armappservice.WebSiteManagementClientListSourceControlsResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListSourceControlsPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListSourceControlsPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListSourceControlsPager) { + w.newListSourceControlsPager.remove(req) + } + return resp, nil +} + +func (w *WebSiteManagementServerTransport) dispatchMove(req *http.Request) (*http.Response, error) { + if w.srv.Move == nil { + return nil, &nonRetriableError{errors.New("fake for method Move not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/moveResources` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 2 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.CsmMoveResourceEnvelope](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.Move(req.Context(), resourceGroupNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebSiteManagementServerTransport) dispatchUpdatePublishingUser(req *http.Request) (*http.Response, error) { + if w.srv.UpdatePublishingUser == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdatePublishingUser not implemented")} + } + body, err := server.UnmarshalRequestAsJSON[armappservice.User](req) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdatePublishingUser(req.Context(), body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).User, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebSiteManagementServerTransport) dispatchUpdateSourceControl(req *http.Request) (*http.Response, error) { + if w.srv.UpdateSourceControl == nil { + return nil, &nonRetriableError{errors.New("fake for method UpdateSourceControl not implemented")} + } + const regexStr = `/providers/Microsoft\.Web/sourcecontrols/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 1 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.SourceControl](req) + if err != nil { + return nil, err + } + sourceControlTypeParam, err := url.PathUnescape(matches[regex.SubexpIndex("sourceControlType")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.UpdateSourceControl(req.Context(), sourceControlTypeParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SourceControl, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebSiteManagementServerTransport) dispatchValidate(req *http.Request) (*http.Response, error) { + if w.srv.Validate == nil { + return nil, &nonRetriableError{errors.New("fake for method Validate not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/validate` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 2 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.ValidateRequest](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.Validate(req.Context(), resourceGroupNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).ValidateResponse, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebSiteManagementServerTransport) dispatchValidateMove(req *http.Request) (*http.Response, error) { + if w.srv.ValidateMove == nil { + return nil, &nonRetriableError{errors.New("fake for method ValidateMove not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/validateMoveResources` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 2 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.CsmMoveResourceEnvelope](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ValidateMove(req.Context(), resourceGroupNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusNoContent}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusNoContent", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WebSiteManagementServerTransport) dispatchVerifyHostingEnvironmentVnet(req *http.Request) (*http.Response, error) { + if w.srv.VerifyHostingEnvironmentVnet == nil { + return nil, &nonRetriableError{errors.New("fake for method VerifyHostingEnvironmentVnet not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/verifyHostingEnvironmentVnet` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 1 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.VnetParameters](req) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.VerifyHostingEnvironmentVnet(req.Context(), body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).VnetValidationFailureDetails, req) + if err != nil { + return nil, err + } + return resp, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/fake/workflowrunactionrepetitions_server.go b/sdk/resourcemanager/appservice/armappservice/fake/workflowrunactionrepetitions_server.go new file mode 100644 index 000000000000..e1cb099076ff --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/fake/workflowrunactionrepetitions_server.go @@ -0,0 +1,245 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "context" + "errors" + "fmt" + azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" + "net/http" + "net/url" + "regexp" +) + +// WorkflowRunActionRepetitionsServer is a fake server for instances of the armappservice.WorkflowRunActionRepetitionsClient type. +type WorkflowRunActionRepetitionsServer struct { + // Get is the fake for method WorkflowRunActionRepetitionsClient.Get + // HTTP status codes to indicate success: http.StatusOK + Get func(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, repetitionName string, options *armappservice.WorkflowRunActionRepetitionsClientGetOptions) (resp azfake.Responder[armappservice.WorkflowRunActionRepetitionsClientGetResponse], errResp azfake.ErrorResponder) + + // NewListPager is the fake for method WorkflowRunActionRepetitionsClient.NewListPager + // HTTP status codes to indicate success: http.StatusOK + NewListPager func(resourceGroupName string, name string, workflowName string, runName string, actionName string, options *armappservice.WorkflowRunActionRepetitionsClientListOptions) (resp azfake.PagerResponder[armappservice.WorkflowRunActionRepetitionsClientListResponse]) + + // NewListExpressionTracesPager is the fake for method WorkflowRunActionRepetitionsClient.NewListExpressionTracesPager + // HTTP status codes to indicate success: http.StatusOK + NewListExpressionTracesPager func(resourceGroupName string, name string, workflowName string, runName string, actionName string, repetitionName string, options *armappservice.WorkflowRunActionRepetitionsClientListExpressionTracesOptions) (resp azfake.PagerResponder[armappservice.WorkflowRunActionRepetitionsClientListExpressionTracesResponse]) +} + +// NewWorkflowRunActionRepetitionsServerTransport creates a new instance of WorkflowRunActionRepetitionsServerTransport with the provided implementation. +// The returned WorkflowRunActionRepetitionsServerTransport instance is connected to an instance of armappservice.WorkflowRunActionRepetitionsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewWorkflowRunActionRepetitionsServerTransport(srv *WorkflowRunActionRepetitionsServer) *WorkflowRunActionRepetitionsServerTransport { + return &WorkflowRunActionRepetitionsServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armappservice.WorkflowRunActionRepetitionsClientListResponse]](), + newListExpressionTracesPager: newTracker[azfake.PagerResponder[armappservice.WorkflowRunActionRepetitionsClientListExpressionTracesResponse]](), + } +} + +// WorkflowRunActionRepetitionsServerTransport connects instances of armappservice.WorkflowRunActionRepetitionsClient to instances of WorkflowRunActionRepetitionsServer. +// Don't use this type directly, use NewWorkflowRunActionRepetitionsServerTransport instead. +type WorkflowRunActionRepetitionsServerTransport struct { + srv *WorkflowRunActionRepetitionsServer + newListPager *tracker[azfake.PagerResponder[armappservice.WorkflowRunActionRepetitionsClientListResponse]] + newListExpressionTracesPager *tracker[azfake.PagerResponder[armappservice.WorkflowRunActionRepetitionsClientListExpressionTracesResponse]] +} + +// Do implements the policy.Transporter interface for WorkflowRunActionRepetitionsServerTransport. +func (w *WorkflowRunActionRepetitionsServerTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + var resp *http.Response + var err error + + switch method { + case "WorkflowRunActionRepetitionsClient.Get": + resp, err = w.dispatchGet(req) + case "WorkflowRunActionRepetitionsClient.NewListPager": + resp, err = w.dispatchNewListPager(req) + case "WorkflowRunActionRepetitionsClient.NewListExpressionTracesPager": + resp, err = w.dispatchNewListExpressionTracesPager(req) + default: + err = fmt.Errorf("unhandled API %s", method) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func (w *WorkflowRunActionRepetitionsServerTransport) dispatchGet(req *http.Request) (*http.Response, error) { + if w.srv.Get == nil { + return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hostruntime/runtime/webhooks/workflow/api/management/workflows/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/runs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/actions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/repetitions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 7 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + workflowNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("workflowName")]) + if err != nil { + return nil, err + } + runNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("runName")]) + if err != nil { + return nil, err + } + actionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("actionName")]) + if err != nil { + return nil, err + } + repetitionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("repetitionName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.Get(req.Context(), resourceGroupNameParam, nameParam, workflowNameParam, runNameParam, actionNameParam, repetitionNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).WorkflowRunActionRepetitionDefinition, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WorkflowRunActionRepetitionsServerTransport) dispatchNewListPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} + } + newListPager := w.newListPager.get(req) + if newListPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hostruntime/runtime/webhooks/workflow/api/management/workflows/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/runs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/actions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/repetitions` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 6 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + workflowNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("workflowName")]) + if err != nil { + return nil, err + } + runNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("runName")]) + if err != nil { + return nil, err + } + actionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("actionName")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListPager(resourceGroupNameParam, nameParam, workflowNameParam, runNameParam, actionNameParam, nil) + newListPager = &resp + w.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armappservice.WorkflowRunActionRepetitionsClientListResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListPager) { + w.newListPager.remove(req) + } + return resp, nil +} + +func (w *WorkflowRunActionRepetitionsServerTransport) dispatchNewListExpressionTracesPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListExpressionTracesPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListExpressionTracesPager not implemented")} + } + newListExpressionTracesPager := w.newListExpressionTracesPager.get(req) + if newListExpressionTracesPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hostruntime/runtime/webhooks/workflow/api/management/workflows/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/runs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/actions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/repetitions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listExpressionTraces` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 7 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + workflowNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("workflowName")]) + if err != nil { + return nil, err + } + runNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("runName")]) + if err != nil { + return nil, err + } + actionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("actionName")]) + if err != nil { + return nil, err + } + repetitionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("repetitionName")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListExpressionTracesPager(resourceGroupNameParam, nameParam, workflowNameParam, runNameParam, actionNameParam, repetitionNameParam, nil) + newListExpressionTracesPager = &resp + w.newListExpressionTracesPager.add(req, newListExpressionTracesPager) + server.PagerResponderInjectNextLinks(newListExpressionTracesPager, req, func(page *armappservice.WorkflowRunActionRepetitionsClientListExpressionTracesResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListExpressionTracesPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListExpressionTracesPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListExpressionTracesPager) { + w.newListExpressionTracesPager.remove(req) + } + return resp, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/fake/workflowrunactionrepetitionsrequesthistories_server.go b/sdk/resourcemanager/appservice/armappservice/fake/workflowrunactionrepetitionsrequesthistories_server.go new file mode 100644 index 000000000000..965a326b5f05 --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/fake/workflowrunactionrepetitionsrequesthistories_server.go @@ -0,0 +1,188 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "context" + "errors" + "fmt" + azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" + "net/http" + "net/url" + "regexp" +) + +// WorkflowRunActionRepetitionsRequestHistoriesServer is a fake server for instances of the armappservice.WorkflowRunActionRepetitionsRequestHistoriesClient type. +type WorkflowRunActionRepetitionsRequestHistoriesServer struct { + // Get is the fake for method WorkflowRunActionRepetitionsRequestHistoriesClient.Get + // HTTP status codes to indicate success: http.StatusOK + Get func(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, repetitionName string, requestHistoryName string, options *armappservice.WorkflowRunActionRepetitionsRequestHistoriesClientGetOptions) (resp azfake.Responder[armappservice.WorkflowRunActionRepetitionsRequestHistoriesClientGetResponse], errResp azfake.ErrorResponder) + + // NewListPager is the fake for method WorkflowRunActionRepetitionsRequestHistoriesClient.NewListPager + // HTTP status codes to indicate success: http.StatusOK + NewListPager func(resourceGroupName string, name string, workflowName string, runName string, actionName string, repetitionName string, options *armappservice.WorkflowRunActionRepetitionsRequestHistoriesClientListOptions) (resp azfake.PagerResponder[armappservice.WorkflowRunActionRepetitionsRequestHistoriesClientListResponse]) +} + +// NewWorkflowRunActionRepetitionsRequestHistoriesServerTransport creates a new instance of WorkflowRunActionRepetitionsRequestHistoriesServerTransport with the provided implementation. +// The returned WorkflowRunActionRepetitionsRequestHistoriesServerTransport instance is connected to an instance of armappservice.WorkflowRunActionRepetitionsRequestHistoriesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewWorkflowRunActionRepetitionsRequestHistoriesServerTransport(srv *WorkflowRunActionRepetitionsRequestHistoriesServer) *WorkflowRunActionRepetitionsRequestHistoriesServerTransport { + return &WorkflowRunActionRepetitionsRequestHistoriesServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armappservice.WorkflowRunActionRepetitionsRequestHistoriesClientListResponse]](), + } +} + +// WorkflowRunActionRepetitionsRequestHistoriesServerTransport connects instances of armappservice.WorkflowRunActionRepetitionsRequestHistoriesClient to instances of WorkflowRunActionRepetitionsRequestHistoriesServer. +// Don't use this type directly, use NewWorkflowRunActionRepetitionsRequestHistoriesServerTransport instead. +type WorkflowRunActionRepetitionsRequestHistoriesServerTransport struct { + srv *WorkflowRunActionRepetitionsRequestHistoriesServer + newListPager *tracker[azfake.PagerResponder[armappservice.WorkflowRunActionRepetitionsRequestHistoriesClientListResponse]] +} + +// Do implements the policy.Transporter interface for WorkflowRunActionRepetitionsRequestHistoriesServerTransport. +func (w *WorkflowRunActionRepetitionsRequestHistoriesServerTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + var resp *http.Response + var err error + + switch method { + case "WorkflowRunActionRepetitionsRequestHistoriesClient.Get": + resp, err = w.dispatchGet(req) + case "WorkflowRunActionRepetitionsRequestHistoriesClient.NewListPager": + resp, err = w.dispatchNewListPager(req) + default: + err = fmt.Errorf("unhandled API %s", method) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func (w *WorkflowRunActionRepetitionsRequestHistoriesServerTransport) dispatchGet(req *http.Request) (*http.Response, error) { + if w.srv.Get == nil { + return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hostruntime/runtime/webhooks/workflow/api/management/workflows/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/runs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/actions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/repetitions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/requestHistories/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 8 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + workflowNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("workflowName")]) + if err != nil { + return nil, err + } + runNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("runName")]) + if err != nil { + return nil, err + } + actionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("actionName")]) + if err != nil { + return nil, err + } + repetitionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("repetitionName")]) + if err != nil { + return nil, err + } + requestHistoryNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("requestHistoryName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.Get(req.Context(), resourceGroupNameParam, nameParam, workflowNameParam, runNameParam, actionNameParam, repetitionNameParam, requestHistoryNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).RequestHistory, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WorkflowRunActionRepetitionsRequestHistoriesServerTransport) dispatchNewListPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} + } + newListPager := w.newListPager.get(req) + if newListPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hostruntime/runtime/webhooks/workflow/api/management/workflows/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/runs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/actions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/repetitions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/requestHistories` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 7 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + workflowNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("workflowName")]) + if err != nil { + return nil, err + } + runNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("runName")]) + if err != nil { + return nil, err + } + actionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("actionName")]) + if err != nil { + return nil, err + } + repetitionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("repetitionName")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListPager(resourceGroupNameParam, nameParam, workflowNameParam, runNameParam, actionNameParam, repetitionNameParam, nil) + newListPager = &resp + w.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armappservice.WorkflowRunActionRepetitionsRequestHistoriesClientListResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListPager) { + w.newListPager.remove(req) + } + return resp, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/fake/workflowrunactions_server.go b/sdk/resourcemanager/appservice/armappservice/fake/workflowrunactions_server.go new file mode 100644 index 000000000000..cba1dccb5348 --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/fake/workflowrunactions_server.go @@ -0,0 +1,261 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "context" + "errors" + "fmt" + azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" + "net/http" + "net/url" + "regexp" + "strconv" +) + +// WorkflowRunActionsServer is a fake server for instances of the armappservice.WorkflowRunActionsClient type. +type WorkflowRunActionsServer struct { + // Get is the fake for method WorkflowRunActionsClient.Get + // HTTP status codes to indicate success: http.StatusOK + Get func(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, options *armappservice.WorkflowRunActionsClientGetOptions) (resp azfake.Responder[armappservice.WorkflowRunActionsClientGetResponse], errResp azfake.ErrorResponder) + + // NewListPager is the fake for method WorkflowRunActionsClient.NewListPager + // HTTP status codes to indicate success: http.StatusOK + NewListPager func(resourceGroupName string, name string, workflowName string, runName string, options *armappservice.WorkflowRunActionsClientListOptions) (resp azfake.PagerResponder[armappservice.WorkflowRunActionsClientListResponse]) + + // NewListExpressionTracesPager is the fake for method WorkflowRunActionsClient.NewListExpressionTracesPager + // HTTP status codes to indicate success: http.StatusOK + NewListExpressionTracesPager func(resourceGroupName string, name string, workflowName string, runName string, actionName string, options *armappservice.WorkflowRunActionsClientListExpressionTracesOptions) (resp azfake.PagerResponder[armappservice.WorkflowRunActionsClientListExpressionTracesResponse]) +} + +// NewWorkflowRunActionsServerTransport creates a new instance of WorkflowRunActionsServerTransport with the provided implementation. +// The returned WorkflowRunActionsServerTransport instance is connected to an instance of armappservice.WorkflowRunActionsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewWorkflowRunActionsServerTransport(srv *WorkflowRunActionsServer) *WorkflowRunActionsServerTransport { + return &WorkflowRunActionsServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armappservice.WorkflowRunActionsClientListResponse]](), + newListExpressionTracesPager: newTracker[azfake.PagerResponder[armappservice.WorkflowRunActionsClientListExpressionTracesResponse]](), + } +} + +// WorkflowRunActionsServerTransport connects instances of armappservice.WorkflowRunActionsClient to instances of WorkflowRunActionsServer. +// Don't use this type directly, use NewWorkflowRunActionsServerTransport instead. +type WorkflowRunActionsServerTransport struct { + srv *WorkflowRunActionsServer + newListPager *tracker[azfake.PagerResponder[armappservice.WorkflowRunActionsClientListResponse]] + newListExpressionTracesPager *tracker[azfake.PagerResponder[armappservice.WorkflowRunActionsClientListExpressionTracesResponse]] +} + +// Do implements the policy.Transporter interface for WorkflowRunActionsServerTransport. +func (w *WorkflowRunActionsServerTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + var resp *http.Response + var err error + + switch method { + case "WorkflowRunActionsClient.Get": + resp, err = w.dispatchGet(req) + case "WorkflowRunActionsClient.NewListPager": + resp, err = w.dispatchNewListPager(req) + case "WorkflowRunActionsClient.NewListExpressionTracesPager": + resp, err = w.dispatchNewListExpressionTracesPager(req) + default: + err = fmt.Errorf("unhandled API %s", method) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func (w *WorkflowRunActionsServerTransport) dispatchGet(req *http.Request) (*http.Response, error) { + if w.srv.Get == nil { + return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hostruntime/runtime/webhooks/workflow/api/management/workflows/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/runs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/actions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 6 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + workflowNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("workflowName")]) + if err != nil { + return nil, err + } + runNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("runName")]) + if err != nil { + return nil, err + } + actionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("actionName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.Get(req.Context(), resourceGroupNameParam, nameParam, workflowNameParam, runNameParam, actionNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).WorkflowRunAction, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WorkflowRunActionsServerTransport) dispatchNewListPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} + } + newListPager := w.newListPager.get(req) + if newListPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hostruntime/runtime/webhooks/workflow/api/management/workflows/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/runs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/actions` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + workflowNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("workflowName")]) + if err != nil { + return nil, err + } + runNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("runName")]) + if err != nil { + return nil, err + } + topUnescaped, err := url.QueryUnescape(qp.Get("$top")) + if err != nil { + return nil, err + } + topParam, err := parseOptional(topUnescaped, func(v string) (int32, error) { + p, parseErr := strconv.ParseInt(v, 10, 32) + if parseErr != nil { + return 0, parseErr + } + return int32(p), nil + }) + if err != nil { + return nil, err + } + filterUnescaped, err := url.QueryUnescape(qp.Get("$filter")) + if err != nil { + return nil, err + } + filterParam := getOptional(filterUnescaped) + var options *armappservice.WorkflowRunActionsClientListOptions + if topParam != nil || filterParam != nil { + options = &armappservice.WorkflowRunActionsClientListOptions{ + Top: topParam, + Filter: filterParam, + } + } + resp := w.srv.NewListPager(resourceGroupNameParam, nameParam, workflowNameParam, runNameParam, options) + newListPager = &resp + w.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armappservice.WorkflowRunActionsClientListResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListPager) { + w.newListPager.remove(req) + } + return resp, nil +} + +func (w *WorkflowRunActionsServerTransport) dispatchNewListExpressionTracesPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListExpressionTracesPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListExpressionTracesPager not implemented")} + } + newListExpressionTracesPager := w.newListExpressionTracesPager.get(req) + if newListExpressionTracesPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hostruntime/runtime/webhooks/workflow/api/management/workflows/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/runs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/actions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listExpressionTraces` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 6 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + workflowNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("workflowName")]) + if err != nil { + return nil, err + } + runNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("runName")]) + if err != nil { + return nil, err + } + actionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("actionName")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListExpressionTracesPager(resourceGroupNameParam, nameParam, workflowNameParam, runNameParam, actionNameParam, nil) + newListExpressionTracesPager = &resp + w.newListExpressionTracesPager.add(req, newListExpressionTracesPager) + server.PagerResponderInjectNextLinks(newListExpressionTracesPager, req, func(page *armappservice.WorkflowRunActionsClientListExpressionTracesResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListExpressionTracesPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListExpressionTracesPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListExpressionTracesPager) { + w.newListExpressionTracesPager.remove(req) + } + return resp, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/fake/workflowrunactionscoperepetitions_server.go b/sdk/resourcemanager/appservice/armappservice/fake/workflowrunactionscoperepetitions_server.go new file mode 100644 index 000000000000..00850b8171c2 --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/fake/workflowrunactionscoperepetitions_server.go @@ -0,0 +1,180 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "context" + "errors" + "fmt" + azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" + "net/http" + "net/url" + "regexp" +) + +// WorkflowRunActionScopeRepetitionsServer is a fake server for instances of the armappservice.WorkflowRunActionScopeRepetitionsClient type. +type WorkflowRunActionScopeRepetitionsServer struct { + // Get is the fake for method WorkflowRunActionScopeRepetitionsClient.Get + // HTTP status codes to indicate success: http.StatusOK + Get func(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, repetitionName string, options *armappservice.WorkflowRunActionScopeRepetitionsClientGetOptions) (resp azfake.Responder[armappservice.WorkflowRunActionScopeRepetitionsClientGetResponse], errResp azfake.ErrorResponder) + + // NewListPager is the fake for method WorkflowRunActionScopeRepetitionsClient.NewListPager + // HTTP status codes to indicate success: http.StatusOK + NewListPager func(resourceGroupName string, name string, workflowName string, runName string, actionName string, options *armappservice.WorkflowRunActionScopeRepetitionsClientListOptions) (resp azfake.PagerResponder[armappservice.WorkflowRunActionScopeRepetitionsClientListResponse]) +} + +// NewWorkflowRunActionScopeRepetitionsServerTransport creates a new instance of WorkflowRunActionScopeRepetitionsServerTransport with the provided implementation. +// The returned WorkflowRunActionScopeRepetitionsServerTransport instance is connected to an instance of armappservice.WorkflowRunActionScopeRepetitionsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewWorkflowRunActionScopeRepetitionsServerTransport(srv *WorkflowRunActionScopeRepetitionsServer) *WorkflowRunActionScopeRepetitionsServerTransport { + return &WorkflowRunActionScopeRepetitionsServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armappservice.WorkflowRunActionScopeRepetitionsClientListResponse]](), + } +} + +// WorkflowRunActionScopeRepetitionsServerTransport connects instances of armappservice.WorkflowRunActionScopeRepetitionsClient to instances of WorkflowRunActionScopeRepetitionsServer. +// Don't use this type directly, use NewWorkflowRunActionScopeRepetitionsServerTransport instead. +type WorkflowRunActionScopeRepetitionsServerTransport struct { + srv *WorkflowRunActionScopeRepetitionsServer + newListPager *tracker[azfake.PagerResponder[armappservice.WorkflowRunActionScopeRepetitionsClientListResponse]] +} + +// Do implements the policy.Transporter interface for WorkflowRunActionScopeRepetitionsServerTransport. +func (w *WorkflowRunActionScopeRepetitionsServerTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + var resp *http.Response + var err error + + switch method { + case "WorkflowRunActionScopeRepetitionsClient.Get": + resp, err = w.dispatchGet(req) + case "WorkflowRunActionScopeRepetitionsClient.NewListPager": + resp, err = w.dispatchNewListPager(req) + default: + err = fmt.Errorf("unhandled API %s", method) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func (w *WorkflowRunActionScopeRepetitionsServerTransport) dispatchGet(req *http.Request) (*http.Response, error) { + if w.srv.Get == nil { + return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hostruntime/runtime/webhooks/workflow/api/management/workflows/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/runs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/actions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/scopeRepetitions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 7 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + workflowNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("workflowName")]) + if err != nil { + return nil, err + } + runNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("runName")]) + if err != nil { + return nil, err + } + actionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("actionName")]) + if err != nil { + return nil, err + } + repetitionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("repetitionName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.Get(req.Context(), resourceGroupNameParam, nameParam, workflowNameParam, runNameParam, actionNameParam, repetitionNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).WorkflowRunActionRepetitionDefinition, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WorkflowRunActionScopeRepetitionsServerTransport) dispatchNewListPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} + } + newListPager := w.newListPager.get(req) + if newListPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hostruntime/runtime/webhooks/workflow/api/management/workflows/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/runs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/actions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/scopeRepetitions` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 6 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + workflowNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("workflowName")]) + if err != nil { + return nil, err + } + runNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("runName")]) + if err != nil { + return nil, err + } + actionNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("actionName")]) + if err != nil { + return nil, err + } + resp := w.srv.NewListPager(resourceGroupNameParam, nameParam, workflowNameParam, runNameParam, actionNameParam, nil) + newListPager = &resp + w.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armappservice.WorkflowRunActionScopeRepetitionsClientListResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListPager) { + w.newListPager.remove(req) + } + return resp, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/fake/workflowruns_server.go b/sdk/resourcemanager/appservice/armappservice/fake/workflowruns_server.go new file mode 100644 index 000000000000..feee30378a4e --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/fake/workflowruns_server.go @@ -0,0 +1,239 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "context" + "errors" + "fmt" + azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" + "net/http" + "net/url" + "regexp" + "strconv" +) + +// WorkflowRunsServer is a fake server for instances of the armappservice.WorkflowRunsClient type. +type WorkflowRunsServer struct { + // Cancel is the fake for method WorkflowRunsClient.Cancel + // HTTP status codes to indicate success: http.StatusOK + Cancel func(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, options *armappservice.WorkflowRunsClientCancelOptions) (resp azfake.Responder[armappservice.WorkflowRunsClientCancelResponse], errResp azfake.ErrorResponder) + + // Get is the fake for method WorkflowRunsClient.Get + // HTTP status codes to indicate success: http.StatusOK + Get func(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, options *armappservice.WorkflowRunsClientGetOptions) (resp azfake.Responder[armappservice.WorkflowRunsClientGetResponse], errResp azfake.ErrorResponder) + + // NewListPager is the fake for method WorkflowRunsClient.NewListPager + // HTTP status codes to indicate success: http.StatusOK + NewListPager func(resourceGroupName string, name string, workflowName string, options *armappservice.WorkflowRunsClientListOptions) (resp azfake.PagerResponder[armappservice.WorkflowRunsClientListResponse]) +} + +// NewWorkflowRunsServerTransport creates a new instance of WorkflowRunsServerTransport with the provided implementation. +// The returned WorkflowRunsServerTransport instance is connected to an instance of armappservice.WorkflowRunsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewWorkflowRunsServerTransport(srv *WorkflowRunsServer) *WorkflowRunsServerTransport { + return &WorkflowRunsServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armappservice.WorkflowRunsClientListResponse]](), + } +} + +// WorkflowRunsServerTransport connects instances of armappservice.WorkflowRunsClient to instances of WorkflowRunsServer. +// Don't use this type directly, use NewWorkflowRunsServerTransport instead. +type WorkflowRunsServerTransport struct { + srv *WorkflowRunsServer + newListPager *tracker[azfake.PagerResponder[armappservice.WorkflowRunsClientListResponse]] +} + +// Do implements the policy.Transporter interface for WorkflowRunsServerTransport. +func (w *WorkflowRunsServerTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + var resp *http.Response + var err error + + switch method { + case "WorkflowRunsClient.Cancel": + resp, err = w.dispatchCancel(req) + case "WorkflowRunsClient.Get": + resp, err = w.dispatchGet(req) + case "WorkflowRunsClient.NewListPager": + resp, err = w.dispatchNewListPager(req) + default: + err = fmt.Errorf("unhandled API %s", method) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func (w *WorkflowRunsServerTransport) dispatchCancel(req *http.Request) (*http.Response, error) { + if w.srv.Cancel == nil { + return nil, &nonRetriableError{errors.New("fake for method Cancel not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hostruntime/runtime/webhooks/workflow/api/management/workflows/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/runs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/cancel` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + workflowNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("workflowName")]) + if err != nil { + return nil, err + } + runNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("runName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.Cancel(req.Context(), resourceGroupNameParam, nameParam, workflowNameParam, runNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WorkflowRunsServerTransport) dispatchGet(req *http.Request) (*http.Response, error) { + if w.srv.Get == nil { + return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hostruntime/runtime/webhooks/workflow/api/management/workflows/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/runs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + workflowNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("workflowName")]) + if err != nil { + return nil, err + } + runNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("runName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.Get(req.Context(), resourceGroupNameParam, nameParam, workflowNameParam, runNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).WorkflowRun, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WorkflowRunsServerTransport) dispatchNewListPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} + } + newListPager := w.newListPager.get(req) + if newListPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hostruntime/runtime/webhooks/workflow/api/management/workflows/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/runs` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + workflowNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("workflowName")]) + if err != nil { + return nil, err + } + topUnescaped, err := url.QueryUnescape(qp.Get("$top")) + if err != nil { + return nil, err + } + topParam, err := parseOptional(topUnescaped, func(v string) (int32, error) { + p, parseErr := strconv.ParseInt(v, 10, 32) + if parseErr != nil { + return 0, parseErr + } + return int32(p), nil + }) + if err != nil { + return nil, err + } + filterUnescaped, err := url.QueryUnescape(qp.Get("$filter")) + if err != nil { + return nil, err + } + filterParam := getOptional(filterUnescaped) + var options *armappservice.WorkflowRunsClientListOptions + if topParam != nil || filterParam != nil { + options = &armappservice.WorkflowRunsClientListOptions{ + Top: topParam, + Filter: filterParam, + } + } + resp := w.srv.NewListPager(resourceGroupNameParam, nameParam, workflowNameParam, options) + newListPager = &resp + w.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armappservice.WorkflowRunsClientListResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListPager) { + w.newListPager.remove(req) + } + return resp, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/fake/workflows_server.go b/sdk/resourcemanager/appservice/armappservice/fake/workflows_server.go new file mode 100644 index 000000000000..9573d055f07b --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/fake/workflows_server.go @@ -0,0 +1,155 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "context" + "errors" + "fmt" + azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" + "net/http" + "net/url" + "regexp" +) + +// WorkflowsServer is a fake server for instances of the armappservice.WorkflowsClient type. +type WorkflowsServer struct { + // RegenerateAccessKey is the fake for method WorkflowsClient.RegenerateAccessKey + // HTTP status codes to indicate success: http.StatusOK + RegenerateAccessKey func(ctx context.Context, resourceGroupName string, name string, workflowName string, keyType armappservice.RegenerateActionParameter, options *armappservice.WorkflowsClientRegenerateAccessKeyOptions) (resp azfake.Responder[armappservice.WorkflowsClientRegenerateAccessKeyResponse], errResp azfake.ErrorResponder) + + // Validate is the fake for method WorkflowsClient.Validate + // HTTP status codes to indicate success: http.StatusOK + Validate func(ctx context.Context, resourceGroupName string, name string, workflowName string, validate armappservice.Workflow, options *armappservice.WorkflowsClientValidateOptions) (resp azfake.Responder[armappservice.WorkflowsClientValidateResponse], errResp azfake.ErrorResponder) +} + +// NewWorkflowsServerTransport creates a new instance of WorkflowsServerTransport with the provided implementation. +// The returned WorkflowsServerTransport instance is connected to an instance of armappservice.WorkflowsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewWorkflowsServerTransport(srv *WorkflowsServer) *WorkflowsServerTransport { + return &WorkflowsServerTransport{srv: srv} +} + +// WorkflowsServerTransport connects instances of armappservice.WorkflowsClient to instances of WorkflowsServer. +// Don't use this type directly, use NewWorkflowsServerTransport instead. +type WorkflowsServerTransport struct { + srv *WorkflowsServer +} + +// Do implements the policy.Transporter interface for WorkflowsServerTransport. +func (w *WorkflowsServerTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + var resp *http.Response + var err error + + switch method { + case "WorkflowsClient.RegenerateAccessKey": + resp, err = w.dispatchRegenerateAccessKey(req) + case "WorkflowsClient.Validate": + resp, err = w.dispatchValidate(req) + default: + err = fmt.Errorf("unhandled API %s", method) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func (w *WorkflowsServerTransport) dispatchRegenerateAccessKey(req *http.Request) (*http.Response, error) { + if w.srv.RegenerateAccessKey == nil { + return nil, &nonRetriableError{errors.New("fake for method RegenerateAccessKey not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hostruntime/runtime/webhooks/workflow/api/management/workflows/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/regenerateAccessKey` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.RegenerateActionParameter](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + workflowNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("workflowName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.RegenerateAccessKey(req.Context(), resourceGroupNameParam, nameParam, workflowNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WorkflowsServerTransport) dispatchValidate(req *http.Request) (*http.Response, error) { + if w.srv.Validate == nil { + return nil, &nonRetriableError{errors.New("fake for method Validate not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hostruntime/runtime/webhooks/workflow/api/management/workflows/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/validate` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + body, err := server.UnmarshalRequestAsJSON[armappservice.Workflow](req) + if err != nil { + return nil, err + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + workflowNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("workflowName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.Validate(req.Context(), resourceGroupNameParam, nameParam, workflowNameParam, body, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.NewResponse(respContent, req, nil) + if err != nil { + return nil, err + } + return resp, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/fake/workflowtriggerhistories_server.go b/sdk/resourcemanager/appservice/armappservice/fake/workflowtriggerhistories_server.go new file mode 100644 index 000000000000..b79d23c0a21b --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/fake/workflowtriggerhistories_server.go @@ -0,0 +1,264 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "context" + "errors" + "fmt" + azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" + "net/http" + "net/url" + "regexp" + "strconv" +) + +// WorkflowTriggerHistoriesServer is a fake server for instances of the armappservice.WorkflowTriggerHistoriesClient type. +type WorkflowTriggerHistoriesServer struct { + // Get is the fake for method WorkflowTriggerHistoriesClient.Get + // HTTP status codes to indicate success: http.StatusOK + Get func(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, historyName string, options *armappservice.WorkflowTriggerHistoriesClientGetOptions) (resp azfake.Responder[armappservice.WorkflowTriggerHistoriesClientGetResponse], errResp azfake.ErrorResponder) + + // NewListPager is the fake for method WorkflowTriggerHistoriesClient.NewListPager + // HTTP status codes to indicate success: http.StatusOK + NewListPager func(resourceGroupName string, name string, workflowName string, triggerName string, options *armappservice.WorkflowTriggerHistoriesClientListOptions) (resp azfake.PagerResponder[armappservice.WorkflowTriggerHistoriesClientListResponse]) + + // BeginResubmit is the fake for method WorkflowTriggerHistoriesClient.BeginResubmit + // HTTP status codes to indicate success: http.StatusAccepted + BeginResubmit func(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, historyName string, options *armappservice.WorkflowTriggerHistoriesClientBeginResubmitOptions) (resp azfake.PollerResponder[armappservice.WorkflowTriggerHistoriesClientResubmitResponse], errResp azfake.ErrorResponder) +} + +// NewWorkflowTriggerHistoriesServerTransport creates a new instance of WorkflowTriggerHistoriesServerTransport with the provided implementation. +// The returned WorkflowTriggerHistoriesServerTransport instance is connected to an instance of armappservice.WorkflowTriggerHistoriesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewWorkflowTriggerHistoriesServerTransport(srv *WorkflowTriggerHistoriesServer) *WorkflowTriggerHistoriesServerTransport { + return &WorkflowTriggerHistoriesServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armappservice.WorkflowTriggerHistoriesClientListResponse]](), + beginResubmit: newTracker[azfake.PollerResponder[armappservice.WorkflowTriggerHistoriesClientResubmitResponse]](), + } +} + +// WorkflowTriggerHistoriesServerTransport connects instances of armappservice.WorkflowTriggerHistoriesClient to instances of WorkflowTriggerHistoriesServer. +// Don't use this type directly, use NewWorkflowTriggerHistoriesServerTransport instead. +type WorkflowTriggerHistoriesServerTransport struct { + srv *WorkflowTriggerHistoriesServer + newListPager *tracker[azfake.PagerResponder[armappservice.WorkflowTriggerHistoriesClientListResponse]] + beginResubmit *tracker[azfake.PollerResponder[armappservice.WorkflowTriggerHistoriesClientResubmitResponse]] +} + +// Do implements the policy.Transporter interface for WorkflowTriggerHistoriesServerTransport. +func (w *WorkflowTriggerHistoriesServerTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + var resp *http.Response + var err error + + switch method { + case "WorkflowTriggerHistoriesClient.Get": + resp, err = w.dispatchGet(req) + case "WorkflowTriggerHistoriesClient.NewListPager": + resp, err = w.dispatchNewListPager(req) + case "WorkflowTriggerHistoriesClient.BeginResubmit": + resp, err = w.dispatchBeginResubmit(req) + default: + err = fmt.Errorf("unhandled API %s", method) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func (w *WorkflowTriggerHistoriesServerTransport) dispatchGet(req *http.Request) (*http.Response, error) { + if w.srv.Get == nil { + return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hostruntime/runtime/webhooks/workflow/api/management/workflows/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/triggers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/histories/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 6 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + workflowNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("workflowName")]) + if err != nil { + return nil, err + } + triggerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("triggerName")]) + if err != nil { + return nil, err + } + historyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("historyName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.Get(req.Context(), resourceGroupNameParam, nameParam, workflowNameParam, triggerNameParam, historyNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).WorkflowTriggerHistory, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WorkflowTriggerHistoriesServerTransport) dispatchNewListPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} + } + newListPager := w.newListPager.get(req) + if newListPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hostruntime/runtime/webhooks/workflow/api/management/workflows/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/triggers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/histories` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + workflowNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("workflowName")]) + if err != nil { + return nil, err + } + triggerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("triggerName")]) + if err != nil { + return nil, err + } + topUnescaped, err := url.QueryUnescape(qp.Get("$top")) + if err != nil { + return nil, err + } + topParam, err := parseOptional(topUnescaped, func(v string) (int32, error) { + p, parseErr := strconv.ParseInt(v, 10, 32) + if parseErr != nil { + return 0, parseErr + } + return int32(p), nil + }) + if err != nil { + return nil, err + } + filterUnescaped, err := url.QueryUnescape(qp.Get("$filter")) + if err != nil { + return nil, err + } + filterParam := getOptional(filterUnescaped) + var options *armappservice.WorkflowTriggerHistoriesClientListOptions + if topParam != nil || filterParam != nil { + options = &armappservice.WorkflowTriggerHistoriesClientListOptions{ + Top: topParam, + Filter: filterParam, + } + } + resp := w.srv.NewListPager(resourceGroupNameParam, nameParam, workflowNameParam, triggerNameParam, options) + newListPager = &resp + w.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armappservice.WorkflowTriggerHistoriesClientListResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListPager) { + w.newListPager.remove(req) + } + return resp, nil +} + +func (w *WorkflowTriggerHistoriesServerTransport) dispatchBeginResubmit(req *http.Request) (*http.Response, error) { + if w.srv.BeginResubmit == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginResubmit not implemented")} + } + beginResubmit := w.beginResubmit.get(req) + if beginResubmit == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hostruntime/runtime/webhooks/workflow/api/management/workflows/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/triggers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/histories/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resubmit` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 6 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + workflowNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("workflowName")]) + if err != nil { + return nil, err + } + triggerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("triggerName")]) + if err != nil { + return nil, err + } + historyNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("historyName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.BeginResubmit(req.Context(), resourceGroupNameParam, nameParam, workflowNameParam, triggerNameParam, historyNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginResubmit = &respr + w.beginResubmit.add(req, beginResubmit) + } + + resp, err := server.PollerResponderNext(beginResubmit, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusAccepted}, resp.StatusCode) { + w.beginResubmit.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginResubmit) { + w.beginResubmit.remove(req) + } + + return resp, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/fake/workflowtriggers_server.go b/sdk/resourcemanager/appservice/armappservice/fake/workflowtriggers_server.go new file mode 100644 index 000000000000..31c1280d6033 --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/fake/workflowtriggers_server.go @@ -0,0 +1,346 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "context" + "errors" + "fmt" + azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" + "net/http" + "net/url" + "regexp" + "strconv" +) + +// WorkflowTriggersServer is a fake server for instances of the armappservice.WorkflowTriggersClient type. +type WorkflowTriggersServer struct { + // Get is the fake for method WorkflowTriggersClient.Get + // HTTP status codes to indicate success: http.StatusOK + Get func(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, options *armappservice.WorkflowTriggersClientGetOptions) (resp azfake.Responder[armappservice.WorkflowTriggersClientGetResponse], errResp azfake.ErrorResponder) + + // GetSchemaJSON is the fake for method WorkflowTriggersClient.GetSchemaJSON + // HTTP status codes to indicate success: http.StatusOK + GetSchemaJSON func(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, options *armappservice.WorkflowTriggersClientGetSchemaJSONOptions) (resp azfake.Responder[armappservice.WorkflowTriggersClientGetSchemaJSONResponse], errResp azfake.ErrorResponder) + + // NewListPager is the fake for method WorkflowTriggersClient.NewListPager + // HTTP status codes to indicate success: http.StatusOK + NewListPager func(resourceGroupName string, name string, workflowName string, options *armappservice.WorkflowTriggersClientListOptions) (resp azfake.PagerResponder[armappservice.WorkflowTriggersClientListResponse]) + + // ListCallbackURL is the fake for method WorkflowTriggersClient.ListCallbackURL + // HTTP status codes to indicate success: http.StatusOK + ListCallbackURL func(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, options *armappservice.WorkflowTriggersClientListCallbackURLOptions) (resp azfake.Responder[armappservice.WorkflowTriggersClientListCallbackURLResponse], errResp azfake.ErrorResponder) + + // BeginRun is the fake for method WorkflowTriggersClient.BeginRun + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted + BeginRun func(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, options *armappservice.WorkflowTriggersClientBeginRunOptions) (resp azfake.PollerResponder[armappservice.WorkflowTriggersClientRunResponse], errResp azfake.ErrorResponder) +} + +// NewWorkflowTriggersServerTransport creates a new instance of WorkflowTriggersServerTransport with the provided implementation. +// The returned WorkflowTriggersServerTransport instance is connected to an instance of armappservice.WorkflowTriggersClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewWorkflowTriggersServerTransport(srv *WorkflowTriggersServer) *WorkflowTriggersServerTransport { + return &WorkflowTriggersServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armappservice.WorkflowTriggersClientListResponse]](), + beginRun: newTracker[azfake.PollerResponder[armappservice.WorkflowTriggersClientRunResponse]](), + } +} + +// WorkflowTriggersServerTransport connects instances of armappservice.WorkflowTriggersClient to instances of WorkflowTriggersServer. +// Don't use this type directly, use NewWorkflowTriggersServerTransport instead. +type WorkflowTriggersServerTransport struct { + srv *WorkflowTriggersServer + newListPager *tracker[azfake.PagerResponder[armappservice.WorkflowTriggersClientListResponse]] + beginRun *tracker[azfake.PollerResponder[armappservice.WorkflowTriggersClientRunResponse]] +} + +// Do implements the policy.Transporter interface for WorkflowTriggersServerTransport. +func (w *WorkflowTriggersServerTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + var resp *http.Response + var err error + + switch method { + case "WorkflowTriggersClient.Get": + resp, err = w.dispatchGet(req) + case "WorkflowTriggersClient.GetSchemaJSON": + resp, err = w.dispatchGetSchemaJSON(req) + case "WorkflowTriggersClient.NewListPager": + resp, err = w.dispatchNewListPager(req) + case "WorkflowTriggersClient.ListCallbackURL": + resp, err = w.dispatchListCallbackURL(req) + case "WorkflowTriggersClient.BeginRun": + resp, err = w.dispatchBeginRun(req) + default: + err = fmt.Errorf("unhandled API %s", method) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func (w *WorkflowTriggersServerTransport) dispatchGet(req *http.Request) (*http.Response, error) { + if w.srv.Get == nil { + return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hostruntime/runtime/webhooks/workflow/api/management/workflows/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/triggers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + workflowNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("workflowName")]) + if err != nil { + return nil, err + } + triggerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("triggerName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.Get(req.Context(), resourceGroupNameParam, nameParam, workflowNameParam, triggerNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).WorkflowTrigger, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WorkflowTriggersServerTransport) dispatchGetSchemaJSON(req *http.Request) (*http.Response, error) { + if w.srv.GetSchemaJSON == nil { + return nil, &nonRetriableError{errors.New("fake for method GetSchemaJSON not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hostruntime/runtime/webhooks/workflow/api/management/workflows/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/triggers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/schemas/json` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + workflowNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("workflowName")]) + if err != nil { + return nil, err + } + triggerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("triggerName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.GetSchemaJSON(req.Context(), resourceGroupNameParam, nameParam, workflowNameParam, triggerNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).JSONSchema, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WorkflowTriggersServerTransport) dispatchNewListPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} + } + newListPager := w.newListPager.get(req) + if newListPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hostruntime/runtime/webhooks/workflow/api/management/workflows/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/triggers` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + workflowNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("workflowName")]) + if err != nil { + return nil, err + } + topUnescaped, err := url.QueryUnescape(qp.Get("$top")) + if err != nil { + return nil, err + } + topParam, err := parseOptional(topUnescaped, func(v string) (int32, error) { + p, parseErr := strconv.ParseInt(v, 10, 32) + if parseErr != nil { + return 0, parseErr + } + return int32(p), nil + }) + if err != nil { + return nil, err + } + filterUnescaped, err := url.QueryUnescape(qp.Get("$filter")) + if err != nil { + return nil, err + } + filterParam := getOptional(filterUnescaped) + var options *armappservice.WorkflowTriggersClientListOptions + if topParam != nil || filterParam != nil { + options = &armappservice.WorkflowTriggersClientListOptions{ + Top: topParam, + Filter: filterParam, + } + } + resp := w.srv.NewListPager(resourceGroupNameParam, nameParam, workflowNameParam, options) + newListPager = &resp + w.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armappservice.WorkflowTriggersClientListResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListPager) { + w.newListPager.remove(req) + } + return resp, nil +} + +func (w *WorkflowTriggersServerTransport) dispatchListCallbackURL(req *http.Request) (*http.Response, error) { + if w.srv.ListCallbackURL == nil { + return nil, &nonRetriableError{errors.New("fake for method ListCallbackURL not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hostruntime/runtime/webhooks/workflow/api/management/workflows/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/triggers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/listCallbackUrl` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + workflowNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("workflowName")]) + if err != nil { + return nil, err + } + triggerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("triggerName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.ListCallbackURL(req.Context(), resourceGroupNameParam, nameParam, workflowNameParam, triggerNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).WorkflowTriggerCallbackURL, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WorkflowTriggersServerTransport) dispatchBeginRun(req *http.Request) (*http.Response, error) { + if w.srv.BeginRun == nil { + return nil, &nonRetriableError{errors.New("fake for method BeginRun not implemented")} + } + beginRun := w.beginRun.get(req) + if beginRun == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hostruntime/runtime/webhooks/workflow/api/management/workflows/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/triggers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/run` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + workflowNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("workflowName")]) + if err != nil { + return nil, err + } + triggerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("triggerName")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.BeginRun(req.Context(), resourceGroupNameParam, nameParam, workflowNameParam, triggerNameParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + beginRun = &respr + w.beginRun.add(req, beginRun) + } + + resp, err := server.PollerResponderNext(beginRun, req) + if err != nil { + return nil, err + } + + if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + w.beginRun.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + } + if !server.PollerResponderMore(beginRun) { + w.beginRun.remove(req) + } + + return resp, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/fake/workflowversions_server.go b/sdk/resourcemanager/appservice/armappservice/fake/workflowversions_server.go new file mode 100644 index 000000000000..ffd1ef65499d --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/fake/workflowversions_server.go @@ -0,0 +1,186 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package fake + +import ( + "context" + "errors" + "fmt" + azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" + "net/http" + "net/url" + "regexp" + "strconv" +) + +// WorkflowVersionsServer is a fake server for instances of the armappservice.WorkflowVersionsClient type. +type WorkflowVersionsServer struct { + // Get is the fake for method WorkflowVersionsClient.Get + // HTTP status codes to indicate success: http.StatusOK + Get func(ctx context.Context, resourceGroupName string, name string, workflowName string, versionID string, options *armappservice.WorkflowVersionsClientGetOptions) (resp azfake.Responder[armappservice.WorkflowVersionsClientGetResponse], errResp azfake.ErrorResponder) + + // NewListPager is the fake for method WorkflowVersionsClient.NewListPager + // HTTP status codes to indicate success: http.StatusOK + NewListPager func(resourceGroupName string, name string, workflowName string, options *armappservice.WorkflowVersionsClientListOptions) (resp azfake.PagerResponder[armappservice.WorkflowVersionsClientListResponse]) +} + +// NewWorkflowVersionsServerTransport creates a new instance of WorkflowVersionsServerTransport with the provided implementation. +// The returned WorkflowVersionsServerTransport instance is connected to an instance of armappservice.WorkflowVersionsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewWorkflowVersionsServerTransport(srv *WorkflowVersionsServer) *WorkflowVersionsServerTransport { + return &WorkflowVersionsServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armappservice.WorkflowVersionsClientListResponse]](), + } +} + +// WorkflowVersionsServerTransport connects instances of armappservice.WorkflowVersionsClient to instances of WorkflowVersionsServer. +// Don't use this type directly, use NewWorkflowVersionsServerTransport instead. +type WorkflowVersionsServerTransport struct { + srv *WorkflowVersionsServer + newListPager *tracker[azfake.PagerResponder[armappservice.WorkflowVersionsClientListResponse]] +} + +// Do implements the policy.Transporter interface for WorkflowVersionsServerTransport. +func (w *WorkflowVersionsServerTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + var resp *http.Response + var err error + + switch method { + case "WorkflowVersionsClient.Get": + resp, err = w.dispatchGet(req) + case "WorkflowVersionsClient.NewListPager": + resp, err = w.dispatchNewListPager(req) + default: + err = fmt.Errorf("unhandled API %s", method) + } + + if err != nil { + return nil, err + } + + return resp, nil +} + +func (w *WorkflowVersionsServerTransport) dispatchGet(req *http.Request) (*http.Response, error) { + if w.srv.Get == nil { + return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} + } + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hostruntime/runtime/webhooks/workflow/api/management/workflows/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/versions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + workflowNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("workflowName")]) + if err != nil { + return nil, err + } + versionIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("versionId")]) + if err != nil { + return nil, err + } + respr, errRespr := w.srv.Get(req.Context(), resourceGroupNameParam, nameParam, workflowNameParam, versionIDParam, nil) + if respErr := server.GetError(errRespr, req); respErr != nil { + return nil, respErr + } + respContent := server.GetResponseContent(respr) + if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} + } + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).WorkflowVersion, req) + if err != nil { + return nil, err + } + return resp, nil +} + +func (w *WorkflowVersionsServerTransport) dispatchNewListPager(req *http.Request) (*http.Response, error) { + if w.srv.NewListPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} + } + newListPager := w.newListPager.get(req) + if newListPager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.Web/sites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hostruntime/runtime/webhooks/workflow/api/management/workflows/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/versions` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if matches == nil || len(matches) < 4 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + qp := req.URL.Query() + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + nameParam, err := url.PathUnescape(matches[regex.SubexpIndex("name")]) + if err != nil { + return nil, err + } + workflowNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("workflowName")]) + if err != nil { + return nil, err + } + topUnescaped, err := url.QueryUnescape(qp.Get("$top")) + if err != nil { + return nil, err + } + topParam, err := parseOptional(topUnescaped, func(v string) (int32, error) { + p, parseErr := strconv.ParseInt(v, 10, 32) + if parseErr != nil { + return 0, parseErr + } + return int32(p), nil + }) + if err != nil { + return nil, err + } + var options *armappservice.WorkflowVersionsClientListOptions + if topParam != nil { + options = &armappservice.WorkflowVersionsClientListOptions{ + Top: topParam, + } + } + resp := w.srv.NewListPager(resourceGroupNameParam, nameParam, workflowNameParam, options) + newListPager = &resp + w.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armappservice.WorkflowVersionsClientListResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListPager, req) + if err != nil { + return nil, err + } + if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListPager) { + w.newListPager.remove(req) + } + return resp, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/getusagesinlocation_client.go b/sdk/resourcemanager/appservice/armappservice/getusagesinlocation_client.go new file mode 100644 index 000000000000..2eebfc6cdb73 --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/getusagesinlocation_client.go @@ -0,0 +1,104 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// GetUsagesInLocationClient contains the methods for the GetUsagesInLocation group. +// Don't use this type directly, use NewGetUsagesInLocationClient() instead. +type GetUsagesInLocationClient struct { + internal *arm.Client + subscriptionID string +} + +// NewGetUsagesInLocationClient creates a new instance of GetUsagesInLocationClient with the specified values. +// - subscriptionID - Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewGetUsagesInLocationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GetUsagesInLocationClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &GetUsagesInLocationClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - List usages in cores for all skus used by a subscription in a given location, for a specific quota type. +// +// Generated from API version 2023-01-01 +// - location - The name of the Azure region. +// - options - GetUsagesInLocationClientListOptions contains the optional parameters for the GetUsagesInLocationClient.NewListPager +// method. +func (client *GetUsagesInLocationClient) NewListPager(location string, options *GetUsagesInLocationClientListOptions) *runtime.Pager[GetUsagesInLocationClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[GetUsagesInLocationClientListResponse]{ + More: func(page GetUsagesInLocationClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *GetUsagesInLocationClientListResponse) (GetUsagesInLocationClientListResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "GetUsagesInLocationClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, location, options) + }, nil) + if err != nil { + return GetUsagesInLocationClientListResponse{}, err + } + return client.listHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listCreateRequest creates the List request. +func (client *GetUsagesInLocationClient) listCreateRequest(ctx context.Context, location string, options *GetUsagesInLocationClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/usages" + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *GetUsagesInLocationClient) listHandleResponse(resp *http.Response) (GetUsagesInLocationClientListResponse, error) { + result := GetUsagesInLocationClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CsmUsageQuotaCollection); err != nil { + return GetUsagesInLocationClientListResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/appservice/armappservice/global_client.go b/sdk/resourcemanager/appservice/armappservice/global_client.go index ef1923df054a..a9a93a0752ff 100644 --- a/sdk/resourcemanager/appservice/armappservice/global_client.go +++ b/sdk/resourcemanager/appservice/armappservice/global_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappservice @@ -33,7 +32,7 @@ type GlobalClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewGlobalClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GlobalClient, error) { - cl, err := arm.NewClient(moduleName+".GlobalClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,22 +46,29 @@ func NewGlobalClient(subscriptionID string, credential azcore.TokenCredential, o // GetDeletedWebApp - Description for Get deleted app for a subscription. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - deletedSiteID - The numeric ID of the deleted app, e.g. 12345 // - options - GlobalClientGetDeletedWebAppOptions contains the optional parameters for the GlobalClient.GetDeletedWebApp method. func (client *GlobalClient) GetDeletedWebApp(ctx context.Context, deletedSiteID string, options *GlobalClientGetDeletedWebAppOptions) (GlobalClientGetDeletedWebAppResponse, error) { + var err error + const operationName = "GlobalClient.GetDeletedWebApp" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getDeletedWebAppCreateRequest(ctx, deletedSiteID, options) if err != nil { return GlobalClientGetDeletedWebAppResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GlobalClientGetDeletedWebAppResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GlobalClientGetDeletedWebAppResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GlobalClientGetDeletedWebAppResponse{}, err } - return client.getDeletedWebAppHandleResponse(resp) + resp, err := client.getDeletedWebAppHandleResponse(httpResp) + return resp, err } // getDeletedWebAppCreateRequest creates the GetDeletedWebApp request. @@ -81,7 +87,7 @@ func (client *GlobalClient) getDeletedWebAppCreateRequest(ctx context.Context, d return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -99,23 +105,30 @@ func (client *GlobalClient) getDeletedWebAppHandleResponse(resp *http.Response) // GetDeletedWebAppSnapshots - Description for Get all deleted apps for a subscription. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - deletedSiteID - The numeric ID of the deleted app, e.g. 12345 // - options - GlobalClientGetDeletedWebAppSnapshotsOptions contains the optional parameters for the GlobalClient.GetDeletedWebAppSnapshots // method. func (client *GlobalClient) GetDeletedWebAppSnapshots(ctx context.Context, deletedSiteID string, options *GlobalClientGetDeletedWebAppSnapshotsOptions) (GlobalClientGetDeletedWebAppSnapshotsResponse, error) { + var err error + const operationName = "GlobalClient.GetDeletedWebAppSnapshots" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getDeletedWebAppSnapshotsCreateRequest(ctx, deletedSiteID, options) if err != nil { return GlobalClientGetDeletedWebAppSnapshotsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GlobalClientGetDeletedWebAppSnapshotsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return GlobalClientGetDeletedWebAppSnapshotsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return GlobalClientGetDeletedWebAppSnapshotsResponse{}, err } - return client.getDeletedWebAppSnapshotsHandleResponse(resp) + resp, err := client.getDeletedWebAppSnapshotsHandleResponse(httpResp) + return resp, err } // getDeletedWebAppSnapshotsCreateRequest creates the GetDeletedWebAppSnapshots request. @@ -134,7 +147,7 @@ func (client *GlobalClient) getDeletedWebAppSnapshotsCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -152,22 +165,28 @@ func (client *GlobalClient) getDeletedWebAppSnapshotsHandleResponse(resp *http.R // GetSubscriptionOperationWithAsyncResponse - Description for Gets an operation in a subscription and given region // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - location - Location name // - operationID - Operation Id // - options - GlobalClientGetSubscriptionOperationWithAsyncResponseOptions contains the optional parameters for the GlobalClient.GetSubscriptionOperationWithAsyncResponse // method. func (client *GlobalClient) GetSubscriptionOperationWithAsyncResponse(ctx context.Context, location string, operationID string, options *GlobalClientGetSubscriptionOperationWithAsyncResponseOptions) (GlobalClientGetSubscriptionOperationWithAsyncResponseResponse, error) { + var err error + const operationName = "GlobalClient.GetSubscriptionOperationWithAsyncResponse" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getSubscriptionOperationWithAsyncResponseCreateRequest(ctx, location, operationID, options) if err != nil { return GlobalClientGetSubscriptionOperationWithAsyncResponseResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return GlobalClientGetSubscriptionOperationWithAsyncResponseResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return GlobalClientGetSubscriptionOperationWithAsyncResponseResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return GlobalClientGetSubscriptionOperationWithAsyncResponseResponse{}, err } return GlobalClientGetSubscriptionOperationWithAsyncResponseResponse{}, nil } @@ -192,7 +211,7 @@ func (client *GlobalClient) getSubscriptionOperationWithAsyncResponseCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/global_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/global_client_example_test.go deleted file mode 100644 index a7985e1f98ca..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/global_client_example_test.go +++ /dev/null @@ -1,99 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetDeletedWebApp.json -func ExampleGlobalClient_GetDeletedWebApp() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewGlobalClient().GetDeletedWebApp(ctx, "9", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DeletedSite = armappservice.DeletedSite{ - // Name: to.Ptr("wussite6"), - // Type: to.Ptr("Microsoft.Web/deletedSites"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg1/providers/Microsoft.Web/locations/West US 2/deletedwebapps/wussite6"), - // Properties: &armappservice.DeletedSiteProperties{ - // DeletedSiteID: to.Ptr[int32](9), - // DeletedSiteName: to.Ptr("wussite6"), - // DeletedTimestamp: to.Ptr("2019-05-09T22:29:05.1337007"), - // GeoRegionName: to.Ptr("West US 2"), - // Kind: to.Ptr("app"), - // ResourceGroup: to.Ptr("rg1"), - // Slot: to.Ptr("Production"), - // Subscription: to.Ptr("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetDeletedWebAppSnapshots.json -func ExampleGlobalClient_GetDeletedWebAppSnapshots() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewGlobalClient().GetDeletedWebAppSnapshots(ctx, "9", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SnapshotArray = []*armappservice.Snapshot{ - // { - // Name: to.Ptr("wussite6"), - // Type: to.Ptr("Microsoft.Web/locations/deletedSites"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg1/providers/Microsoft.Web/locations/West US 2/deletedwebapps/wussite6/snapshots/9"), - // Properties: &armappservice.SnapshotProperties{ - // Time: to.Ptr("2019-05-09T22:29:05.1337007"), - // }, - // }} -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetSubscriptionOperationWithAsyncResponse.json -func ExampleGlobalClient_GetSubscriptionOperationWithAsyncResponse() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewGlobalClient().GetSubscriptionOperationWithAsyncResponse(ctx, "West US", "34adfa4f-cedf-4dc0-ba29-b6d1a69ab5d5", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/appservice/armappservice/go.mod b/sdk/resourcemanager/appservice/armappservice/go.mod index 8358b6589c98..2ded6c67ae4d 100644 --- a/sdk/resourcemanager/appservice/armappservice/go.mod +++ b/sdk/resourcemanager/appservice/armappservice/go.mod @@ -1,21 +1,11 @@ -module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2 +module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v3 go 1.18 -require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 -) +require github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.0 require ( - github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0 // indirect - github.com/golang-jwt/jwt/v4 v4.5.0 // indirect - github.com/google/uuid v1.3.0 // indirect - github.com/kylelemons/godebug v1.1.0 // indirect - github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect - golang.org/x/crypto v0.6.0 // indirect - golang.org/x/net v0.7.0 // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.0 // indirect + golang.org/x/net v0.17.0 // indirect + golang.org/x/text v0.13.0 // indirect ) diff --git a/sdk/resourcemanager/appservice/armappservice/go.sum b/sdk/resourcemanager/appservice/armappservice/go.sum index 8ba445a8c4da..428cd71de305 100644 --- a/sdk/resourcemanager/appservice/armappservice/go.sum +++ b/sdk/resourcemanager/appservice/armappservice/go.sum @@ -1,31 +1,12 @@ -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 h1:rTnT/Jrcm+figWlYz4Ixzt0SJVR2cMC8lvZcimipiEY= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0/go.mod h1:ON4tFdPTwRcgWEaVDrN3584Ef+b7GgSJaXxe5fW9t4M= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 h1:uqM+VoHjVH6zdlkLF2b6O0ZANcHoj3rO0PoQ3jglUJA= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2/go.mod h1:twTKAa1E6hLmSDjLhaCkbTMQKc7p/rNLU40rLxGEOCI= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0 h1:leh5DwKv6Ihwi+h60uHtn6UWAxBbZ0q8DwQVMzf61zw= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.2.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= -github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0 h1:UE9n9rkJF62ArLb1F3DEjRt8O3jLwMWdSoypKV4f3MU= -github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.0 h1:fb8kj/Dh4CSwgsOzHeZY4Xh68cFVbzXx+ONXGMY//4w= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.0/go.mod h1:uReU2sSxZExRPBAg3qKzmAucSi51+SP1OhohieR821Q= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.0 h1:d81/ng9rET2YqdVkVwkb6EXeRrLJIwyGnJcAlAWKwhs= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.0/go.mod h1:s4kgfzA0covAXNicZHDMN58jExvcng2mC/DepXiF1EI= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= -github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= -github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= -github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc= -golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/sdk/resourcemanager/appservice/armappservice/kubeenvironments_client.go b/sdk/resourcemanager/appservice/armappservice/kubeenvironments_client.go index 66176a092e9b..8c2d5276681e 100644 --- a/sdk/resourcemanager/appservice/armappservice/kubeenvironments_client.go +++ b/sdk/resourcemanager/appservice/armappservice/kubeenvironments_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappservice @@ -33,7 +32,7 @@ type KubeEnvironmentsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewKubeEnvironmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*KubeEnvironmentsClient, error) { - cl, err := arm.NewClient(moduleName+".KubeEnvironmentsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,7 +46,7 @@ func NewKubeEnvironmentsClient(subscriptionID string, credential azcore.TokenCre // BeginCreateOrUpdate - Description for Creates or updates a Kubernetes Environment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the Kubernetes Environment. // - kubeEnvironmentEnvelope - Configuration details of the Kubernetes Environment. @@ -59,29 +58,40 @@ func (client *KubeEnvironmentsClient) BeginCreateOrUpdate(ctx context.Context, r if err != nil { return nil, err } - return runtime.NewPoller[KubeEnvironmentsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[KubeEnvironmentsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[KubeEnvironmentsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[KubeEnvironmentsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateOrUpdate - Description for Creates or updates a Kubernetes Environment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *KubeEnvironmentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, name string, kubeEnvironmentEnvelope KubeEnvironment, options *KubeEnvironmentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "KubeEnvironmentsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, name, kubeEnvironmentEnvelope, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -104,16 +114,19 @@ func (client *KubeEnvironmentsClient) createOrUpdateCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, kubeEnvironmentEnvelope) + if err := runtime.MarshalAsJSON(req, kubeEnvironmentEnvelope); err != nil { + return nil, err + } + return req, nil } // BeginDelete - Description for Delete a Kubernetes Environment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the Kubernetes Environment. // - options - KubeEnvironmentsClientBeginDeleteOptions contains the optional parameters for the KubeEnvironmentsClient.BeginDelete @@ -124,29 +137,40 @@ func (client *KubeEnvironmentsClient) BeginDelete(ctx context.Context, resourceG if err != nil { return nil, err } - return runtime.NewPoller[KubeEnvironmentsClientDeleteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[KubeEnvironmentsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[KubeEnvironmentsClientDeleteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[KubeEnvironmentsClientDeleteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Delete - Description for Delete a Kubernetes Environment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *KubeEnvironmentsClient) deleteOperation(ctx context.Context, resourceGroupName string, name string, options *KubeEnvironmentsClientBeginDeleteOptions) (*http.Response, error) { + var err error + const operationName = "KubeEnvironmentsClient.BeginDelete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteCreateRequest creates the Delete request. @@ -169,7 +193,7 @@ func (client *KubeEnvironmentsClient) deleteCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -178,23 +202,30 @@ func (client *KubeEnvironmentsClient) deleteCreateRequest(ctx context.Context, r // Get - Description for Get the properties of a Kubernetes Environment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the Kubernetes Environment. // - options - KubeEnvironmentsClientGetOptions contains the optional parameters for the KubeEnvironmentsClient.Get method. func (client *KubeEnvironmentsClient) Get(ctx context.Context, resourceGroupName string, name string, options *KubeEnvironmentsClientGetOptions) (KubeEnvironmentsClientGetResponse, error) { + var err error + const operationName = "KubeEnvironmentsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return KubeEnvironmentsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return KubeEnvironmentsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return KubeEnvironmentsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return KubeEnvironmentsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -217,7 +248,7 @@ func (client *KubeEnvironmentsClient) getCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -234,7 +265,7 @@ func (client *KubeEnvironmentsClient) getHandleResponse(resp *http.Response) (Ku // NewListByResourceGroupPager - Description for Get all the Kubernetes Environments in a resource group. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - options - KubeEnvironmentsClientListByResourceGroupOptions contains the optional parameters for the KubeEnvironmentsClient.NewListByResourceGroupPager // method. @@ -244,25 +275,20 @@ func (client *KubeEnvironmentsClient) NewListByResourceGroupPager(resourceGroupN return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *KubeEnvironmentsClientListByResourceGroupResponse) (KubeEnvironmentsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return KubeEnvironmentsClientListByResourceGroupResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "KubeEnvironmentsClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return KubeEnvironmentsClientListByResourceGroupResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return KubeEnvironmentsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -282,7 +308,7 @@ func (client *KubeEnvironmentsClient) listByResourceGroupCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -299,7 +325,7 @@ func (client *KubeEnvironmentsClient) listByResourceGroupHandleResponse(resp *ht // NewListBySubscriptionPager - Description for Get all Kubernetes Environments for a subscription. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - options - KubeEnvironmentsClientListBySubscriptionOptions contains the optional parameters for the KubeEnvironmentsClient.NewListBySubscriptionPager // method. func (client *KubeEnvironmentsClient) NewListBySubscriptionPager(options *KubeEnvironmentsClientListBySubscriptionOptions) *runtime.Pager[KubeEnvironmentsClientListBySubscriptionResponse] { @@ -308,25 +334,20 @@ func (client *KubeEnvironmentsClient) NewListBySubscriptionPager(options *KubeEn return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *KubeEnvironmentsClientListBySubscriptionResponse) (KubeEnvironmentsClientListBySubscriptionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySubscriptionCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "KubeEnvironmentsClient.NewListBySubscriptionPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBySubscriptionCreateRequest(ctx, options) + }, nil) if err != nil { return KubeEnvironmentsClientListBySubscriptionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return KubeEnvironmentsClientListBySubscriptionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return KubeEnvironmentsClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) - } return client.listBySubscriptionHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -342,7 +363,7 @@ func (client *KubeEnvironmentsClient) listBySubscriptionCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -360,24 +381,31 @@ func (client *KubeEnvironmentsClient) listBySubscriptionHandleResponse(resp *htt // Update - Description for Creates or updates a Kubernetes Environment. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the Kubernetes Environment. // - kubeEnvironmentEnvelope - Configuration details of the Kubernetes Environment. // - options - KubeEnvironmentsClientUpdateOptions contains the optional parameters for the KubeEnvironmentsClient.Update method. func (client *KubeEnvironmentsClient) Update(ctx context.Context, resourceGroupName string, name string, kubeEnvironmentEnvelope KubeEnvironmentPatchResource, options *KubeEnvironmentsClientUpdateOptions) (KubeEnvironmentsClientUpdateResponse, error) { + var err error + const operationName = "KubeEnvironmentsClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, name, kubeEnvironmentEnvelope, options) if err != nil { return KubeEnvironmentsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return KubeEnvironmentsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return KubeEnvironmentsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return KubeEnvironmentsClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -400,10 +428,13 @@ func (client *KubeEnvironmentsClient) updateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, kubeEnvironmentEnvelope) + if err := runtime.MarshalAsJSON(req, kubeEnvironmentEnvelope); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. diff --git a/sdk/resourcemanager/appservice/armappservice/kubeenvironments_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/kubeenvironments_client_example_test.go deleted file mode 100644 index d3bb5befbc4a..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/kubeenvironments_client_example_test.go +++ /dev/null @@ -1,290 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/KubeEnvironments_ListBySubscription.json -func ExampleKubeEnvironmentsClient_NewListBySubscriptionPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewKubeEnvironmentsClient().NewListBySubscriptionPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.KubeEnvironmentCollection = armappservice.KubeEnvironmentCollection{ - // Value: []*armappservice.KubeEnvironment{ - // { - // Name: to.Ptr("jlaw-demo1"), - // Type: to.Ptr("Microsoft.Web/kubeEnvironments"), - // ID: to.Ptr("/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.Web/kubeEnvironments/jlaw-demo1"), - // Location: to.Ptr("North Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armappservice.KubeEnvironmentProperties{ - // DefaultDomain: to.Ptr("jlaw-demo1.k4apps.io"), - // InternalLoadBalancerEnabled: to.Ptr(false), - // ProvisioningState: to.Ptr(armappservice.KubeEnvironmentProvisioningStateSucceeded), - // StaticIP: to.Ptr("20.42.33.145"), - // }, - // }, - // { - // Name: to.Ptr("demo1"), - // Type: to.Ptr("Microsoft.Web/kubeEnvironments"), - // ID: to.Ptr("/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/DemoRG/providers/Microsoft.Web/kubeEnvironments/demo1"), - // Location: to.Ptr("North Central US"), - // Tags: map[string]*string{ - // }, - // Properties: &armappservice.KubeEnvironmentProperties{ - // DefaultDomain: to.Ptr("demo1.k4apps.io"), - // InternalLoadBalancerEnabled: to.Ptr(false), - // ProvisioningState: to.Ptr(armappservice.KubeEnvironmentProvisioningStateSucceeded), - // StaticIP: to.Ptr("52.142.21.61"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/KubeEnvironments_ListByResourceGroup.json -func ExampleKubeEnvironmentsClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewKubeEnvironmentsClient().NewListByResourceGroupPager("examplerg", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.KubeEnvironmentCollection = armappservice.KubeEnvironmentCollection{ - // Value: []*armappservice.KubeEnvironment{ - // { - // Name: to.Ptr("jlaw-demo1"), - // Type: to.Ptr("Microsoft.Web/kubeEnvironments"), - // ID: to.Ptr("/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.Web/kubeEnvironments/jlaw-demo1"), - // Location: to.Ptr("North Central US"), - // Tags: map[string]*string{ - // }, - // ExtendedLocation: &armappservice.ExtendedLocation{ - // Name: to.Ptr("/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation"), - // Type: to.Ptr("customLocation"), - // }, - // Properties: &armappservice.KubeEnvironmentProperties{ - // DefaultDomain: to.Ptr("jlaw-demo1.k4apps.io"), - // InternalLoadBalancerEnabled: to.Ptr(false), - // ProvisioningState: to.Ptr(armappservice.KubeEnvironmentProvisioningStateSucceeded), - // StaticIP: to.Ptr("20.42.33.145"), - // }, - // }, - // { - // Name: to.Ptr("demo1"), - // Type: to.Ptr("Microsoft.Web/kubeEnvironments"), - // ID: to.Ptr("/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.Web/kubeEnvironments/demo1"), - // Location: to.Ptr("North Central US"), - // Tags: map[string]*string{ - // }, - // ExtendedLocation: &armappservice.ExtendedLocation{ - // Name: to.Ptr("/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation"), - // Type: to.Ptr("customLocation"), - // }, - // Properties: &armappservice.KubeEnvironmentProperties{ - // DefaultDomain: to.Ptr("demo1.k4apps.io"), - // InternalLoadBalancerEnabled: to.Ptr(false), - // ProvisioningState: to.Ptr(armappservice.KubeEnvironmentProvisioningStateSucceeded), - // StaticIP: to.Ptr("52.142.21.61"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/KubeEnvironments_Get.json -func ExampleKubeEnvironmentsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewKubeEnvironmentsClient().Get(ctx, "examplerg", "jlaw-demo1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.KubeEnvironment = armappservice.KubeEnvironment{ - // Name: to.Ptr("jlaw-demo1"), - // Type: to.Ptr("Microsoft.Web/kubeEnvironments"), - // ID: to.Ptr("/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.Web/kubeEnvironments/jlaw-demo1"), - // Location: to.Ptr("North Central US"), - // Tags: map[string]*string{ - // }, - // ExtendedLocation: &armappservice.ExtendedLocation{ - // Name: to.Ptr("/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation"), - // Type: to.Ptr("customLocation"), - // }, - // Properties: &armappservice.KubeEnvironmentProperties{ - // AksResourceID: to.Ptr("/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.ContainerService/managedClusters/jlaw-demo1"), - // DefaultDomain: to.Ptr("jlaw-demo1.k4apps.io"), - // InternalLoadBalancerEnabled: to.Ptr(false), - // ProvisioningState: to.Ptr(armappservice.KubeEnvironmentProvisioningStateSucceeded), - // StaticIP: to.Ptr("20.42.33.145"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/KubeEnvironments_CreateOrUpdate.json -func ExampleKubeEnvironmentsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewKubeEnvironmentsClient().BeginCreateOrUpdate(ctx, "examplerg", "testkubeenv", armappservice.KubeEnvironment{ - Location: to.Ptr("East US"), - Properties: &armappservice.KubeEnvironmentProperties{ - StaticIP: to.Ptr("1.2.3.4"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.KubeEnvironment = armappservice.KubeEnvironment{ - // Name: to.Ptr("testkubeenv"), - // Type: to.Ptr("Microsoft.Web/kubeEnvironments"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.Web/kubeEnvironments/testkubeenv"), - // Location: to.Ptr("East US"), - // Tags: map[string]*string{ - // }, - // ExtendedLocation: &armappservice.ExtendedLocation{ - // Name: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation"), - // Type: to.Ptr("customLocation"), - // }, - // Properties: &armappservice.KubeEnvironmentProperties{ - // AksResourceID: to.Ptr("test"), - // DefaultDomain: to.Ptr("testkubeenv.k4apps.io"), - // InternalLoadBalancerEnabled: to.Ptr(false), - // ProvisioningState: to.Ptr(armappservice.KubeEnvironmentProvisioningStateSucceeded), - // StaticIP: to.Ptr("1.2.3.4"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/KubeEnvironments_Delete.json -func ExampleKubeEnvironmentsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewKubeEnvironmentsClient().BeginDelete(ctx, "examplerg", "examplekenv", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/KubeEnvironments_Update.json -func ExampleKubeEnvironmentsClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewKubeEnvironmentsClient().Update(ctx, "examplerg", "testkubeenv", armappservice.KubeEnvironmentPatchResource{ - Properties: &armappservice.KubeEnvironmentPatchResourceProperties{ - StaticIP: to.Ptr("1.2.3.4"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.KubeEnvironment = armappservice.KubeEnvironment{ - // Name: to.Ptr("testkubeenv"), - // Type: to.Ptr("Microsoft.Web/kubeEnvironments"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.Web/kubeEnvironments/testkubeenv"), - // Location: to.Ptr("East US"), - // Tags: map[string]*string{ - // }, - // ExtendedLocation: &armappservice.ExtendedLocation{ - // Name: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation"), - // Type: to.Ptr("customLocation"), - // }, - // Properties: &armappservice.KubeEnvironmentProperties{ - // AksResourceID: to.Ptr("test"), - // DefaultDomain: to.Ptr("testkubeenv.k4apps.io"), - // InternalLoadBalancerEnabled: to.Ptr(false), - // ProvisioningState: to.Ptr(armappservice.KubeEnvironmentProvisioningStateSucceeded), - // StaticIP: to.Ptr("1.2.3.4"), - // }, - // } -} diff --git a/sdk/resourcemanager/appservice/armappservice/models.go b/sdk/resourcemanager/appservice/armappservice/models.go index 4165fe42dff0..5bea5d3d87b9 100644 --- a/sdk/resourcemanager/appservice/armappservice/models.go +++ b/sdk/resourcemanager/appservice/armappservice/models.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappservice @@ -511,6 +510,54 @@ type ArmPlan struct { Version *string } +// AseRegion - ASE region. +type AseRegion struct { + // Kind of resource. + Kind *string + + // ASE region resource specific properties + Properties *AseRegionProperties + + // READ-ONLY; Resource Id. + ID *string + + // READ-ONLY; Resource Name. + Name *string + + // READ-ONLY; Resource type. + Type *string +} + +// AseRegionCollection - Collection of ASE regions. +type AseRegionCollection struct { + // REQUIRED; Collection of resources. + Value []*AseRegion + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// AseRegionProperties - ASE region resource specific properties +type AseRegionProperties struct { + // Available OSs in region. + AvailableOS []*string + + // Available Skus in region. + AvailableSKU []*string + + // READ-ONLY; Dedicated host enabled. + DedicatedHost *bool + + // READ-ONLY; Display name for region. + DisplayName *string + + // READ-ONLY; Is region standard. + Standard *bool + + // READ-ONLY; Zone redundant deployment enabled. + ZoneRedundant *bool +} + // AseV3NetworkingConfiguration - Full view of networking configuration for an ASE. type AseV3NetworkingConfiguration struct { // Kind of resource. @@ -1251,139 +1298,6 @@ type CertificateOrderProperties struct { Status *CertificateOrderStatus } -// CertificateOrdersClientBeginCreateOrUpdateCertificateOptions contains the optional parameters for the CertificateOrdersClient.BeginCreateOrUpdateCertificate -// method. -type CertificateOrdersClientBeginCreateOrUpdateCertificateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// CertificateOrdersClientBeginCreateOrUpdateOptions contains the optional parameters for the CertificateOrdersClient.BeginCreateOrUpdate -// method. -type CertificateOrdersClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// CertificateOrdersClientDeleteCertificateOptions contains the optional parameters for the CertificateOrdersClient.DeleteCertificate -// method. -type CertificateOrdersClientDeleteCertificateOptions struct { - // placeholder for future optional parameters -} - -// CertificateOrdersClientDeleteOptions contains the optional parameters for the CertificateOrdersClient.Delete method. -type CertificateOrdersClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// CertificateOrdersClientGetCertificateOptions contains the optional parameters for the CertificateOrdersClient.GetCertificate -// method. -type CertificateOrdersClientGetCertificateOptions struct { - // placeholder for future optional parameters -} - -// CertificateOrdersClientGetOptions contains the optional parameters for the CertificateOrdersClient.Get method. -type CertificateOrdersClientGetOptions struct { - // placeholder for future optional parameters -} - -// CertificateOrdersClientListByResourceGroupOptions contains the optional parameters for the CertificateOrdersClient.NewListByResourceGroupPager -// method. -type CertificateOrdersClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// CertificateOrdersClientListCertificatesOptions contains the optional parameters for the CertificateOrdersClient.NewListCertificatesPager -// method. -type CertificateOrdersClientListCertificatesOptions struct { - // placeholder for future optional parameters -} - -// CertificateOrdersClientListOptions contains the optional parameters for the CertificateOrdersClient.NewListPager method. -type CertificateOrdersClientListOptions struct { - // placeholder for future optional parameters -} - -// CertificateOrdersClientReissueOptions contains the optional parameters for the CertificateOrdersClient.Reissue method. -type CertificateOrdersClientReissueOptions struct { - // placeholder for future optional parameters -} - -// CertificateOrdersClientRenewOptions contains the optional parameters for the CertificateOrdersClient.Renew method. -type CertificateOrdersClientRenewOptions struct { - // placeholder for future optional parameters -} - -// CertificateOrdersClientResendEmailOptions contains the optional parameters for the CertificateOrdersClient.ResendEmail -// method. -type CertificateOrdersClientResendEmailOptions struct { - // placeholder for future optional parameters -} - -// CertificateOrdersClientResendRequestEmailsOptions contains the optional parameters for the CertificateOrdersClient.ResendRequestEmails -// method. -type CertificateOrdersClientResendRequestEmailsOptions struct { - // placeholder for future optional parameters -} - -// CertificateOrdersClientRetrieveCertificateActionsOptions contains the optional parameters for the CertificateOrdersClient.RetrieveCertificateActions -// method. -type CertificateOrdersClientRetrieveCertificateActionsOptions struct { - // placeholder for future optional parameters -} - -// CertificateOrdersClientRetrieveCertificateEmailHistoryOptions contains the optional parameters for the CertificateOrdersClient.RetrieveCertificateEmailHistory -// method. -type CertificateOrdersClientRetrieveCertificateEmailHistoryOptions struct { - // placeholder for future optional parameters -} - -// CertificateOrdersClientRetrieveSiteSealOptions contains the optional parameters for the CertificateOrdersClient.RetrieveSiteSeal -// method. -type CertificateOrdersClientRetrieveSiteSealOptions struct { - // placeholder for future optional parameters -} - -// CertificateOrdersClientUpdateCertificateOptions contains the optional parameters for the CertificateOrdersClient.UpdateCertificate -// method. -type CertificateOrdersClientUpdateCertificateOptions struct { - // placeholder for future optional parameters -} - -// CertificateOrdersClientUpdateOptions contains the optional parameters for the CertificateOrdersClient.Update method. -type CertificateOrdersClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// CertificateOrdersClientValidatePurchaseInformationOptions contains the optional parameters for the CertificateOrdersClient.ValidatePurchaseInformation -// method. -type CertificateOrdersClientValidatePurchaseInformationOptions struct { - // placeholder for future optional parameters -} - -// CertificateOrdersClientVerifyDomainOwnershipOptions contains the optional parameters for the CertificateOrdersClient.VerifyDomainOwnership -// method. -type CertificateOrdersClientVerifyDomainOwnershipOptions struct { - // placeholder for future optional parameters -} - -// CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseOptions contains the optional parameters -// for the CertificateOrdersDiagnosticsClient.GetAppServiceCertificateOrderDetectorResponse method. -type CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseOptions struct { - // The end time for the detector response. - EndTime *time.Time - // The start time for detector response. - StartTime *time.Time - // The time grain for the detector response. - TimeGrain *string -} - -// CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseOptions contains the optional parameters -// for the CertificateOrdersDiagnosticsClient.NewListAppServiceCertificateOrderDetectorResponsePager method. -type CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseOptions struct { - // placeholder for future optional parameters -} - // CertificatePatchResource - Key Vault container ARM resource for a certificate that is purchased through Azure. type CertificatePatchResource struct { // Kind of resource. @@ -1402,12 +1316,6 @@ type CertificatePatchResource struct { Type *string } -// CertificateRegistrationProviderClientListOperationsOptions contains the optional parameters for the CertificateRegistrationProviderClient.NewListOperationsPager -// method. -type CertificateRegistrationProviderClientListOperationsOptions struct { - // placeholder for future optional parameters -} - // CertificateResource - Key Vault container ARM resource for a certificate that is purchased through Azure. type CertificateResource struct { // REQUIRED; Resource Location. @@ -1432,38 +1340,6 @@ type CertificateResource struct { Type *string } -// CertificatesClientCreateOrUpdateOptions contains the optional parameters for the CertificatesClient.CreateOrUpdate method. -type CertificatesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// CertificatesClientDeleteOptions contains the optional parameters for the CertificatesClient.Delete method. -type CertificatesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// CertificatesClientGetOptions contains the optional parameters for the CertificatesClient.Get method. -type CertificatesClientGetOptions struct { - // placeholder for future optional parameters -} - -// CertificatesClientListByResourceGroupOptions contains the optional parameters for the CertificatesClient.NewListByResourceGroupPager -// method. -type CertificatesClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// CertificatesClientListOptions contains the optional parameters for the CertificatesClient.NewListPager method. -type CertificatesClientListOptions struct { - // Return only information specified in the filter (using OData syntax). For example: $filter=KeyVaultId eq 'KeyVaultId' - Filter *string -} - -// CertificatesClientUpdateOptions contains the optional parameters for the CertificatesClient.Update method. -type CertificatesClientUpdateOptions struct { - // placeholder for future optional parameters -} - // ClientRegistration - The configuration settings of the app registration for providers that have client ids and client secrets type ClientRegistration struct { // The Client ID of the app used for login. @@ -1685,41 +1561,6 @@ type ContainerAppSecret struct { Value *string } -// ContainerAppsClientBeginCreateOrUpdateOptions contains the optional parameters for the ContainerAppsClient.BeginCreateOrUpdate -// method. -type ContainerAppsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ContainerAppsClientBeginDeleteOptions contains the optional parameters for the ContainerAppsClient.BeginDelete method. -type ContainerAppsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ContainerAppsClientGetOptions contains the optional parameters for the ContainerAppsClient.Get method. -type ContainerAppsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ContainerAppsClientListByResourceGroupOptions contains the optional parameters for the ContainerAppsClient.NewListByResourceGroupPager -// method. -type ContainerAppsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ContainerAppsClientListBySubscriptionOptions contains the optional parameters for the ContainerAppsClient.NewListBySubscriptionPager -// method. -type ContainerAppsClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - -// ContainerAppsClientListSecretsOptions contains the optional parameters for the ContainerAppsClient.ListSecrets method. -type ContainerAppsClientListSecretsOptions struct { - // placeholder for future optional parameters -} - type ContainerAppsConfiguration struct { // Resource ID of a subnet for control plane infrastructure components. This subnet must be in the same VNET as the subnet // defined in appSubnetResourceId. Must not overlap with the IP range defined in @@ -1746,36 +1587,6 @@ type ContainerAppsConfiguration struct { PlatformReservedDNSIP *string } -// ContainerAppsRevisionsClientActivateRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.ActivateRevision -// method. -type ContainerAppsRevisionsClientActivateRevisionOptions struct { - // placeholder for future optional parameters -} - -// ContainerAppsRevisionsClientDeactivateRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.DeactivateRevision -// method. -type ContainerAppsRevisionsClientDeactivateRevisionOptions struct { - // placeholder for future optional parameters -} - -// ContainerAppsRevisionsClientGetRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.GetRevision -// method. -type ContainerAppsRevisionsClientGetRevisionOptions struct { - // placeholder for future optional parameters -} - -// ContainerAppsRevisionsClientListRevisionsOptions contains the optional parameters for the ContainerAppsRevisionsClient.NewListRevisionsPager -// method. -type ContainerAppsRevisionsClientListRevisionsOptions struct { - // placeholder for future optional parameters -} - -// ContainerAppsRevisionsClientRestartRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.RestartRevision -// method. -type ContainerAppsRevisionsClientRestartRevisionOptions struct { - // placeholder for future optional parameters -} - type ContainerCPUStatistics struct { CPUUsage *ContainerCPUUsage OnlineCPUCount *int32 @@ -2288,6 +2099,30 @@ type DaprComponent struct { Version *string } +// DaprConfig - App Dapr configuration. +type DaprConfig struct { + // Dapr application identifier + AppID *string + + // Tells Dapr which port your application is listening on + AppPort *int32 + + // Enables API logging for the Dapr sidecar + EnableAPILogging *bool + + // Boolean indicating if the Dapr side car is enabled + Enabled *bool + + // Increasing max size of request body http servers parameter in MB to handle uploading of big files. Default is 4 MB. + HTTPMaxRequestSize *int32 + + // Dapr max size of http header read buffer in KB to handle when sending multi-KB headers. Default is 65KB. + HTTPReadBufferSize *int32 + + // Sets the log level for the Dapr sidecar. Allowed values are debug, info, warn, error. Default is info. + LogLevel *DaprLogLevel +} + // DaprMetadata - Container App Dapr component metadata. type DaprMetadata struct { // Metadata property name. @@ -2578,23 +2413,6 @@ type DeletedWebAppCollection struct { NextLink *string } -// DeletedWebAppsClientGetDeletedWebAppByLocationOptions contains the optional parameters for the DeletedWebAppsClient.GetDeletedWebAppByLocation -// method. -type DeletedWebAppsClientGetDeletedWebAppByLocationOptions struct { - // placeholder for future optional parameters -} - -// DeletedWebAppsClientListByLocationOptions contains the optional parameters for the DeletedWebAppsClient.NewListByLocationPager -// method. -type DeletedWebAppsClientListByLocationOptions struct { - // placeholder for future optional parameters -} - -// DeletedWebAppsClientListOptions contains the optional parameters for the DeletedWebAppsClient.NewListPager method. -type DeletedWebAppsClientListOptions struct { - // placeholder for future optional parameters -} - // Deployment - User credentials used for publishing activity. type Deployment struct { // Kind of resource. @@ -2984,171 +2802,6 @@ type DiagnosticMetricSet struct { Values []*DiagnosticMetricSample } -// DiagnosticsClientExecuteSiteAnalysisOptions contains the optional parameters for the DiagnosticsClient.ExecuteSiteAnalysis -// method. -type DiagnosticsClientExecuteSiteAnalysisOptions struct { - // End Time - EndTime *time.Time - // Start Time - StartTime *time.Time - // Time Grain - TimeGrain *string -} - -// DiagnosticsClientExecuteSiteAnalysisSlotOptions contains the optional parameters for the DiagnosticsClient.ExecuteSiteAnalysisSlot -// method. -type DiagnosticsClientExecuteSiteAnalysisSlotOptions struct { - // End Time - EndTime *time.Time - // Start Time - StartTime *time.Time - // Time Grain - TimeGrain *string -} - -// DiagnosticsClientExecuteSiteDetectorOptions contains the optional parameters for the DiagnosticsClient.ExecuteSiteDetector -// method. -type DiagnosticsClientExecuteSiteDetectorOptions struct { - // End Time - EndTime *time.Time - // Start Time - StartTime *time.Time - // Time Grain - TimeGrain *string -} - -// DiagnosticsClientExecuteSiteDetectorSlotOptions contains the optional parameters for the DiagnosticsClient.ExecuteSiteDetectorSlot -// method. -type DiagnosticsClientExecuteSiteDetectorSlotOptions struct { - // End Time - EndTime *time.Time - // Start Time - StartTime *time.Time - // Time Grain - TimeGrain *string -} - -// DiagnosticsClientGetHostingEnvironmentDetectorResponseOptions contains the optional parameters for the DiagnosticsClient.GetHostingEnvironmentDetectorResponse -// method. -type DiagnosticsClientGetHostingEnvironmentDetectorResponseOptions struct { - // End Time - EndTime *time.Time - // Start Time - StartTime *time.Time - // Time Grain - TimeGrain *string -} - -// DiagnosticsClientGetSiteAnalysisOptions contains the optional parameters for the DiagnosticsClient.GetSiteAnalysis method. -type DiagnosticsClientGetSiteAnalysisOptions struct { - // placeholder for future optional parameters -} - -// DiagnosticsClientGetSiteAnalysisSlotOptions contains the optional parameters for the DiagnosticsClient.GetSiteAnalysisSlot -// method. -type DiagnosticsClientGetSiteAnalysisSlotOptions struct { - // placeholder for future optional parameters -} - -// DiagnosticsClientGetSiteDetectorOptions contains the optional parameters for the DiagnosticsClient.GetSiteDetector method. -type DiagnosticsClientGetSiteDetectorOptions struct { - // placeholder for future optional parameters -} - -// DiagnosticsClientGetSiteDetectorResponseOptions contains the optional parameters for the DiagnosticsClient.GetSiteDetectorResponse -// method. -type DiagnosticsClientGetSiteDetectorResponseOptions struct { - // End Time - EndTime *time.Time - // Start Time - StartTime *time.Time - // Time Grain - TimeGrain *string -} - -// DiagnosticsClientGetSiteDetectorResponseSlotOptions contains the optional parameters for the DiagnosticsClient.GetSiteDetectorResponseSlot -// method. -type DiagnosticsClientGetSiteDetectorResponseSlotOptions struct { - // End Time - EndTime *time.Time - // Start Time - StartTime *time.Time - // Time Grain - TimeGrain *string -} - -// DiagnosticsClientGetSiteDetectorSlotOptions contains the optional parameters for the DiagnosticsClient.GetSiteDetectorSlot -// method. -type DiagnosticsClientGetSiteDetectorSlotOptions struct { - // placeholder for future optional parameters -} - -// DiagnosticsClientGetSiteDiagnosticCategoryOptions contains the optional parameters for the DiagnosticsClient.GetSiteDiagnosticCategory -// method. -type DiagnosticsClientGetSiteDiagnosticCategoryOptions struct { - // placeholder for future optional parameters -} - -// DiagnosticsClientGetSiteDiagnosticCategorySlotOptions contains the optional parameters for the DiagnosticsClient.GetSiteDiagnosticCategorySlot -// method. -type DiagnosticsClientGetSiteDiagnosticCategorySlotOptions struct { - // placeholder for future optional parameters -} - -// DiagnosticsClientListHostingEnvironmentDetectorResponsesOptions contains the optional parameters for the DiagnosticsClient.NewListHostingEnvironmentDetectorResponsesPager -// method. -type DiagnosticsClientListHostingEnvironmentDetectorResponsesOptions struct { - // placeholder for future optional parameters -} - -// DiagnosticsClientListSiteAnalysesOptions contains the optional parameters for the DiagnosticsClient.NewListSiteAnalysesPager -// method. -type DiagnosticsClientListSiteAnalysesOptions struct { - // placeholder for future optional parameters -} - -// DiagnosticsClientListSiteAnalysesSlotOptions contains the optional parameters for the DiagnosticsClient.NewListSiteAnalysesSlotPager -// method. -type DiagnosticsClientListSiteAnalysesSlotOptions struct { - // placeholder for future optional parameters -} - -// DiagnosticsClientListSiteDetectorResponsesOptions contains the optional parameters for the DiagnosticsClient.NewListSiteDetectorResponsesPager -// method. -type DiagnosticsClientListSiteDetectorResponsesOptions struct { - // placeholder for future optional parameters -} - -// DiagnosticsClientListSiteDetectorResponsesSlotOptions contains the optional parameters for the DiagnosticsClient.NewListSiteDetectorResponsesSlotPager -// method. -type DiagnosticsClientListSiteDetectorResponsesSlotOptions struct { - // placeholder for future optional parameters -} - -// DiagnosticsClientListSiteDetectorsOptions contains the optional parameters for the DiagnosticsClient.NewListSiteDetectorsPager -// method. -type DiagnosticsClientListSiteDetectorsOptions struct { - // placeholder for future optional parameters -} - -// DiagnosticsClientListSiteDetectorsSlotOptions contains the optional parameters for the DiagnosticsClient.NewListSiteDetectorsSlotPager -// method. -type DiagnosticsClientListSiteDetectorsSlotOptions struct { - // placeholder for future optional parameters -} - -// DiagnosticsClientListSiteDiagnosticCategoriesOptions contains the optional parameters for the DiagnosticsClient.NewListSiteDiagnosticCategoriesPager -// method. -type DiagnosticsClientListSiteDiagnosticCategoriesOptions struct { - // placeholder for future optional parameters -} - -// DiagnosticsClientListSiteDiagnosticCategoriesSlotOptions contains the optional parameters for the DiagnosticsClient.NewListSiteDiagnosticCategoriesSlotPager -// method. -type DiagnosticsClientListSiteDiagnosticCategoriesSlotOptions struct { - // placeholder for future optional parameters -} - // Dimension of a resource metric. For e.g. instance specific HTTP requests for a web app, where instance name is dimension // of the metric HTTP request type Dimension struct { @@ -3415,102 +3068,6 @@ type DomainRecommendationSearchParameters struct { MaxDomainRecommendations *int32 } -// DomainRegistrationProviderClientListOperationsOptions contains the optional parameters for the DomainRegistrationProviderClient.NewListOperationsPager -// method. -type DomainRegistrationProviderClientListOperationsOptions struct { - // placeholder for future optional parameters -} - -// DomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the DomainsClient.BeginCreateOrUpdate method. -type DomainsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DomainsClientCheckAvailabilityOptions contains the optional parameters for the DomainsClient.CheckAvailability method. -type DomainsClientCheckAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// DomainsClientCreateOrUpdateOwnershipIdentifierOptions contains the optional parameters for the DomainsClient.CreateOrUpdateOwnershipIdentifier -// method. -type DomainsClientCreateOrUpdateOwnershipIdentifierOptions struct { - // placeholder for future optional parameters -} - -// DomainsClientDeleteOptions contains the optional parameters for the DomainsClient.Delete method. -type DomainsClientDeleteOptions struct { - // Specify true to delete the domain immediately. The default is false which deletes the domain after 24 hours. - ForceHardDeleteDomain *bool -} - -// DomainsClientDeleteOwnershipIdentifierOptions contains the optional parameters for the DomainsClient.DeleteOwnershipIdentifier -// method. -type DomainsClientDeleteOwnershipIdentifierOptions struct { - // placeholder for future optional parameters -} - -// DomainsClientGetControlCenterSsoRequestOptions contains the optional parameters for the DomainsClient.GetControlCenterSsoRequest -// method. -type DomainsClientGetControlCenterSsoRequestOptions struct { - // placeholder for future optional parameters -} - -// DomainsClientGetOptions contains the optional parameters for the DomainsClient.Get method. -type DomainsClientGetOptions struct { - // placeholder for future optional parameters -} - -// DomainsClientGetOwnershipIdentifierOptions contains the optional parameters for the DomainsClient.GetOwnershipIdentifier -// method. -type DomainsClientGetOwnershipIdentifierOptions struct { - // placeholder for future optional parameters -} - -// DomainsClientListByResourceGroupOptions contains the optional parameters for the DomainsClient.NewListByResourceGroupPager -// method. -type DomainsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// DomainsClientListOptions contains the optional parameters for the DomainsClient.NewListPager method. -type DomainsClientListOptions struct { - // placeholder for future optional parameters -} - -// DomainsClientListOwnershipIdentifiersOptions contains the optional parameters for the DomainsClient.NewListOwnershipIdentifiersPager -// method. -type DomainsClientListOwnershipIdentifiersOptions struct { - // placeholder for future optional parameters -} - -// DomainsClientListRecommendationsOptions contains the optional parameters for the DomainsClient.NewListRecommendationsPager -// method. -type DomainsClientListRecommendationsOptions struct { - // placeholder for future optional parameters -} - -// DomainsClientRenewOptions contains the optional parameters for the DomainsClient.Renew method. -type DomainsClientRenewOptions struct { - // placeholder for future optional parameters -} - -// DomainsClientTransferOutOptions contains the optional parameters for the DomainsClient.TransferOut method. -type DomainsClientTransferOutOptions struct { - // placeholder for future optional parameters -} - -// DomainsClientUpdateOptions contains the optional parameters for the DomainsClient.Update method. -type DomainsClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// DomainsClientUpdateOwnershipIdentifierOptions contains the optional parameters for the DomainsClient.UpdateOwnershipIdentifier -// method. -type DomainsClientUpdateOwnershipIdentifierOptions struct { - // placeholder for future optional parameters -} - // EnabledConfig - Enabled configuration. type EnabledConfig struct { // True if configuration is enabled, false if it is disabled and null if configuration is not set. @@ -3670,320 +3227,31 @@ type EnvironmentVar struct { Value *string } -// EnvironmentsClientBeginApproveOrRejectPrivateEndpointConnectionOptions contains the optional parameters for the EnvironmentsClient.BeginApproveOrRejectPrivateEndpointConnection -// method. -type EnvironmentsClientBeginApproveOrRejectPrivateEndpointConnectionOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} +// ErrorEntity - Body of the error response returned from the API. +type ErrorEntity struct { + // Basic error code. + Code *string -// EnvironmentsClientBeginChangeVnetOptions contains the optional parameters for the EnvironmentsClient.BeginChangeVnet method. -type EnvironmentsClientBeginChangeVnetOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} + // Error Details. + Details []*ErrorEntity -// EnvironmentsClientBeginCreateOrUpdateMultiRolePoolOptions contains the optional parameters for the EnvironmentsClient.BeginCreateOrUpdateMultiRolePool -// method. -type EnvironmentsClientBeginCreateOrUpdateMultiRolePoolOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} + // Type of error. + ExtendedCode *string -// EnvironmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the EnvironmentsClient.BeginCreateOrUpdate -// method. -type EnvironmentsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} + // Inner errors. + InnerErrors []*ErrorEntity -// EnvironmentsClientBeginCreateOrUpdateWorkerPoolOptions contains the optional parameters for the EnvironmentsClient.BeginCreateOrUpdateWorkerPool -// method. -type EnvironmentsClientBeginCreateOrUpdateWorkerPoolOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} + // Any details of the error. + Message *string -// EnvironmentsClientBeginDeleteOptions contains the optional parameters for the EnvironmentsClient.BeginDelete method. -type EnvironmentsClientBeginDeleteOptions struct { - // Specify true to force the deletion even if the App Service Environment contains resources. The default is false. - ForceDelete *bool - // Resumes the LRO from the provided token. - ResumeToken string -} + // Message template. + MessageTemplate *string -// EnvironmentsClientBeginDeletePrivateEndpointConnectionOptions contains the optional parameters for the EnvironmentsClient.BeginDeletePrivateEndpointConnection -// method. -type EnvironmentsClientBeginDeletePrivateEndpointConnectionOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} + // Parameters for the template. + Parameters []*string -// EnvironmentsClientBeginResumeOptions contains the optional parameters for the EnvironmentsClient.BeginResume method. -type EnvironmentsClientBeginResumeOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// EnvironmentsClientBeginSuspendOptions contains the optional parameters for the EnvironmentsClient.BeginSuspend method. -type EnvironmentsClientBeginSuspendOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// EnvironmentsClientBeginUpgradeOptions contains the optional parameters for the EnvironmentsClient.BeginUpgrade method. -type EnvironmentsClientBeginUpgradeOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationOptions contains the optional parameters for the EnvironmentsClient.DeleteAseCustomDNSSuffixConfiguration -// method. -type EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientGetAseCustomDNSSuffixConfigurationOptions contains the optional parameters for the EnvironmentsClient.GetAseCustomDNSSuffixConfiguration -// method. -type EnvironmentsClientGetAseCustomDNSSuffixConfigurationOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientGetAseV3NetworkingConfigurationOptions contains the optional parameters for the EnvironmentsClient.GetAseV3NetworkingConfiguration -// method. -type EnvironmentsClientGetAseV3NetworkingConfigurationOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientGetDiagnosticsItemOptions contains the optional parameters for the EnvironmentsClient.GetDiagnosticsItem -// method. -type EnvironmentsClientGetDiagnosticsItemOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientGetInboundNetworkDependenciesEndpointsOptions contains the optional parameters for the EnvironmentsClient.NewGetInboundNetworkDependenciesEndpointsPager -// method. -type EnvironmentsClientGetInboundNetworkDependenciesEndpointsOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientGetMultiRolePoolOptions contains the optional parameters for the EnvironmentsClient.GetMultiRolePool -// method. -type EnvironmentsClientGetMultiRolePoolOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientGetOptions contains the optional parameters for the EnvironmentsClient.Get method. -type EnvironmentsClientGetOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientGetOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the EnvironmentsClient.NewGetOutboundNetworkDependenciesEndpointsPager -// method. -type EnvironmentsClientGetOutboundNetworkDependenciesEndpointsOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientGetPrivateEndpointConnectionListOptions contains the optional parameters for the EnvironmentsClient.NewGetPrivateEndpointConnectionListPager -// method. -type EnvironmentsClientGetPrivateEndpointConnectionListOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientGetPrivateEndpointConnectionOptions contains the optional parameters for the EnvironmentsClient.GetPrivateEndpointConnection -// method. -type EnvironmentsClientGetPrivateEndpointConnectionOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientGetPrivateLinkResourcesOptions contains the optional parameters for the EnvironmentsClient.GetPrivateLinkResources -// method. -type EnvironmentsClientGetPrivateLinkResourcesOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientGetVipInfoOptions contains the optional parameters for the EnvironmentsClient.GetVipInfo method. -type EnvironmentsClientGetVipInfoOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientGetWorkerPoolOptions contains the optional parameters for the EnvironmentsClient.GetWorkerPool method. -type EnvironmentsClientGetWorkerPoolOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientListAppServicePlansOptions contains the optional parameters for the EnvironmentsClient.NewListAppServicePlansPager -// method. -type EnvironmentsClientListAppServicePlansOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientListByResourceGroupOptions contains the optional parameters for the EnvironmentsClient.NewListByResourceGroupPager -// method. -type EnvironmentsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientListCapacitiesOptions contains the optional parameters for the EnvironmentsClient.NewListCapacitiesPager -// method. -type EnvironmentsClientListCapacitiesOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientListDiagnosticsOptions contains the optional parameters for the EnvironmentsClient.ListDiagnostics method. -type EnvironmentsClientListDiagnosticsOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientListMultiRoleMetricDefinitionsOptions contains the optional parameters for the EnvironmentsClient.NewListMultiRoleMetricDefinitionsPager -// method. -type EnvironmentsClientListMultiRoleMetricDefinitionsOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsOptions contains the optional parameters for the EnvironmentsClient.NewListMultiRolePoolInstanceMetricDefinitionsPager -// method. -type EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientListMultiRolePoolSKUsOptions contains the optional parameters for the EnvironmentsClient.NewListMultiRolePoolSKUsPager -// method. -type EnvironmentsClientListMultiRolePoolSKUsOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientListMultiRolePoolsOptions contains the optional parameters for the EnvironmentsClient.NewListMultiRolePoolsPager -// method. -type EnvironmentsClientListMultiRolePoolsOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientListMultiRoleUsagesOptions contains the optional parameters for the EnvironmentsClient.NewListMultiRoleUsagesPager -// method. -type EnvironmentsClientListMultiRoleUsagesOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientListOperationsOptions contains the optional parameters for the EnvironmentsClient.ListOperations method. -type EnvironmentsClientListOperationsOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientListOptions contains the optional parameters for the EnvironmentsClient.NewListPager method. -type EnvironmentsClientListOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientListUsagesOptions contains the optional parameters for the EnvironmentsClient.NewListUsagesPager method. -type EnvironmentsClientListUsagesOptions struct { - // Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' - // or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and - // endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. - Filter *string -} - -// EnvironmentsClientListWebAppsOptions contains the optional parameters for the EnvironmentsClient.NewListWebAppsPager method. -type EnvironmentsClientListWebAppsOptions struct { - // Comma separated list of app properties to include. - PropertiesToInclude *string -} - -// EnvironmentsClientListWebWorkerMetricDefinitionsOptions contains the optional parameters for the EnvironmentsClient.NewListWebWorkerMetricDefinitionsPager -// method. -type EnvironmentsClientListWebWorkerMetricDefinitionsOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientListWebWorkerUsagesOptions contains the optional parameters for the EnvironmentsClient.NewListWebWorkerUsagesPager -// method. -type EnvironmentsClientListWebWorkerUsagesOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsOptions contains the optional parameters for the EnvironmentsClient.NewListWorkerPoolInstanceMetricDefinitionsPager -// method. -type EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientListWorkerPoolSKUsOptions contains the optional parameters for the EnvironmentsClient.NewListWorkerPoolSKUsPager -// method. -type EnvironmentsClientListWorkerPoolSKUsOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientListWorkerPoolsOptions contains the optional parameters for the EnvironmentsClient.NewListWorkerPoolsPager -// method. -type EnvironmentsClientListWorkerPoolsOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientRebootOptions contains the optional parameters for the EnvironmentsClient.Reboot method. -type EnvironmentsClientRebootOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientTestUpgradeAvailableNotificationOptions contains the optional parameters for the EnvironmentsClient.TestUpgradeAvailableNotification -// method. -type EnvironmentsClientTestUpgradeAvailableNotificationOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationOptions contains the optional parameters for the EnvironmentsClient.UpdateAseCustomDNSSuffixConfiguration -// method. -type EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientUpdateAseNetworkingConfigurationOptions contains the optional parameters for the EnvironmentsClient.UpdateAseNetworkingConfiguration -// method. -type EnvironmentsClientUpdateAseNetworkingConfigurationOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientUpdateMultiRolePoolOptions contains the optional parameters for the EnvironmentsClient.UpdateMultiRolePool -// method. -type EnvironmentsClientUpdateMultiRolePoolOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientUpdateOptions contains the optional parameters for the EnvironmentsClient.Update method. -type EnvironmentsClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// EnvironmentsClientUpdateWorkerPoolOptions contains the optional parameters for the EnvironmentsClient.UpdateWorkerPool -// method. -type EnvironmentsClientUpdateWorkerPoolOptions struct { - // placeholder for future optional parameters -} - -// ErrorEntity - Body of the error response returned from the API. -type ErrorEntity struct { - // Basic error code. - Code *string - - // Error Details. - Details []*ErrorEntity - - // Type of error. - ExtendedCode *string - - // Inner errors. - InnerErrors []*ErrorEntity - - // Any details of the error. - Message *string - - // Message template. - MessageTemplate *string - - // Parameters for the template. - Parameters []*string - - // The error target. - Target *string + // The error target. + Target *string } // ErrorInfo - The error info. @@ -4493,23 +3761,6 @@ type GithubTokenRequest struct { State *string } -// GlobalClientGetDeletedWebAppOptions contains the optional parameters for the GlobalClient.GetDeletedWebApp method. -type GlobalClientGetDeletedWebAppOptions struct { - // placeholder for future optional parameters -} - -// GlobalClientGetDeletedWebAppSnapshotsOptions contains the optional parameters for the GlobalClient.GetDeletedWebAppSnapshots -// method. -type GlobalClientGetDeletedWebAppSnapshotsOptions struct { - // placeholder for future optional parameters -} - -// GlobalClientGetSubscriptionOperationWithAsyncResponseOptions contains the optional parameters for the GlobalClient.GetSubscriptionOperationWithAsyncResponse -// method. -type GlobalClientGetSubscriptionOperationWithAsyncResponseOptions struct { - // placeholder for future optional parameters -} - // GlobalCsmSKUDescription - A Global SKU Description. type GlobalCsmSKUDescription struct { // Capabilities of the SKU, e.g., is traffic manager enabled? @@ -5203,41 +4454,6 @@ type KubeEnvironmentProperties struct { ProvisioningState *KubeEnvironmentProvisioningState } -// KubeEnvironmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the KubeEnvironmentsClient.BeginCreateOrUpdate -// method. -type KubeEnvironmentsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// KubeEnvironmentsClientBeginDeleteOptions contains the optional parameters for the KubeEnvironmentsClient.BeginDelete method. -type KubeEnvironmentsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// KubeEnvironmentsClientGetOptions contains the optional parameters for the KubeEnvironmentsClient.Get method. -type KubeEnvironmentsClientGetOptions struct { - // placeholder for future optional parameters -} - -// KubeEnvironmentsClientListByResourceGroupOptions contains the optional parameters for the KubeEnvironmentsClient.NewListByResourceGroupPager -// method. -type KubeEnvironmentsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// KubeEnvironmentsClientListBySubscriptionOptions contains the optional parameters for the KubeEnvironmentsClient.NewListBySubscriptionPager -// method. -type KubeEnvironmentsClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - -// KubeEnvironmentsClientUpdateOptions contains the optional parameters for the KubeEnvironmentsClient.Update method. -type KubeEnvironmentsClientUpdateOptions struct { - // placeholder for future optional parameters -} - // LegacyMicrosoftAccount - The configuration settings of the legacy Microsoft Account provider. type LegacyMicrosoftAccount struct { // false if the legacy Microsoft Account provider should not be enabled despite the set registration; otherwise, true. @@ -6071,161 +5287,6 @@ type PlanProperties struct { Subscription *string } -// PlansClientBeginCreateOrUpdateOptions contains the optional parameters for the PlansClient.BeginCreateOrUpdate method. -type PlansClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PlansClientCreateOrUpdateVnetRouteOptions contains the optional parameters for the PlansClient.CreateOrUpdateVnetRoute -// method. -type PlansClientCreateOrUpdateVnetRouteOptions struct { - // placeholder for future optional parameters -} - -// PlansClientDeleteHybridConnectionOptions contains the optional parameters for the PlansClient.DeleteHybridConnection method. -type PlansClientDeleteHybridConnectionOptions struct { - // placeholder for future optional parameters -} - -// PlansClientDeleteOptions contains the optional parameters for the PlansClient.Delete method. -type PlansClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// PlansClientDeleteVnetRouteOptions contains the optional parameters for the PlansClient.DeleteVnetRoute method. -type PlansClientDeleteVnetRouteOptions struct { - // placeholder for future optional parameters -} - -// PlansClientGetHybridConnectionOptions contains the optional parameters for the PlansClient.GetHybridConnection method. -type PlansClientGetHybridConnectionOptions struct { - // placeholder for future optional parameters -} - -// PlansClientGetHybridConnectionPlanLimitOptions contains the optional parameters for the PlansClient.GetHybridConnectionPlanLimit -// method. -type PlansClientGetHybridConnectionPlanLimitOptions struct { - // placeholder for future optional parameters -} - -// PlansClientGetOptions contains the optional parameters for the PlansClient.Get method. -type PlansClientGetOptions struct { - // placeholder for future optional parameters -} - -// PlansClientGetRouteForVnetOptions contains the optional parameters for the PlansClient.GetRouteForVnet method. -type PlansClientGetRouteForVnetOptions struct { - // placeholder for future optional parameters -} - -// PlansClientGetServerFarmSKUsOptions contains the optional parameters for the PlansClient.GetServerFarmSKUs method. -type PlansClientGetServerFarmSKUsOptions struct { - // placeholder for future optional parameters -} - -// PlansClientGetVnetFromServerFarmOptions contains the optional parameters for the PlansClient.GetVnetFromServerFarm method. -type PlansClientGetVnetFromServerFarmOptions struct { - // placeholder for future optional parameters -} - -// PlansClientGetVnetGatewayOptions contains the optional parameters for the PlansClient.GetVnetGateway method. -type PlansClientGetVnetGatewayOptions struct { - // placeholder for future optional parameters -} - -// PlansClientListByResourceGroupOptions contains the optional parameters for the PlansClient.NewListByResourceGroupPager -// method. -type PlansClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// PlansClientListCapabilitiesOptions contains the optional parameters for the PlansClient.ListCapabilities method. -type PlansClientListCapabilitiesOptions struct { - // placeholder for future optional parameters -} - -// PlansClientListHybridConnectionKeysOptions contains the optional parameters for the PlansClient.ListHybridConnectionKeys -// method. -type PlansClientListHybridConnectionKeysOptions struct { - // placeholder for future optional parameters -} - -// PlansClientListHybridConnectionsOptions contains the optional parameters for the PlansClient.NewListHybridConnectionsPager -// method. -type PlansClientListHybridConnectionsOptions struct { - // placeholder for future optional parameters -} - -// PlansClientListOptions contains the optional parameters for the PlansClient.NewListPager method. -type PlansClientListOptions struct { - // Specify true to return all App Service plan properties. The default is false, which returns a subset of the properties. - // Retrieval of all properties may increase the API latency. - Detailed *bool -} - -// PlansClientListRoutesForVnetOptions contains the optional parameters for the PlansClient.ListRoutesForVnet method. -type PlansClientListRoutesForVnetOptions struct { - // placeholder for future optional parameters -} - -// PlansClientListUsagesOptions contains the optional parameters for the PlansClient.NewListUsagesPager method. -type PlansClientListUsagesOptions struct { - // Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' - // or name.value eq 'Metric2'). - Filter *string -} - -// PlansClientListVnetsOptions contains the optional parameters for the PlansClient.ListVnets method. -type PlansClientListVnetsOptions struct { - // placeholder for future optional parameters -} - -// PlansClientListWebAppsByHybridConnectionOptions contains the optional parameters for the PlansClient.NewListWebAppsByHybridConnectionPager -// method. -type PlansClientListWebAppsByHybridConnectionOptions struct { - // placeholder for future optional parameters -} - -// PlansClientListWebAppsOptions contains the optional parameters for the PlansClient.NewListWebAppsPager method. -type PlansClientListWebAppsOptions struct { - // Supported filter: $filter=state eq running. Returns only web apps that are currently running - Filter *string - // Skip to a web app in the list of webapps associated with app service plan. If specified, the resulting list will contain - // web apps starting from (including) the skipToken. Otherwise, the resulting list - // contains web apps from the start of the list - SkipToken *string - // List page size. If specified, results are paged. - Top *string -} - -// PlansClientRebootWorkerOptions contains the optional parameters for the PlansClient.RebootWorker method. -type PlansClientRebootWorkerOptions struct { - // placeholder for future optional parameters -} - -// PlansClientRestartWebAppsOptions contains the optional parameters for the PlansClient.RestartWebApps method. -type PlansClientRestartWebAppsOptions struct { - // Specify true to perform a soft restart, applies the configuration settings and restarts the apps if necessary. The default - // is false, which always restarts and reprovisions the apps - SoftRestart *bool -} - -// PlansClientUpdateOptions contains the optional parameters for the PlansClient.Update method. -type PlansClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// PlansClientUpdateVnetGatewayOptions contains the optional parameters for the PlansClient.UpdateVnetGateway method. -type PlansClientUpdateVnetGatewayOptions struct { - // placeholder for future optional parameters -} - -// PlansClientUpdateVnetRouteOptions contains the optional parameters for the PlansClient.UpdateVnetRoute method. -type PlansClientUpdateVnetRouteOptions struct { - // placeholder for future optional parameters -} - // PremierAddOn - Premier add-on. type PremierAddOn struct { // REQUIRED; Resource Location. @@ -6760,50 +5821,6 @@ type ProcessThreadInfoProperties struct { Identifier *int32 } -// ProviderClientGetAvailableStacksOnPremOptions contains the optional parameters for the ProviderClient.NewGetAvailableStacksOnPremPager -// method. -type ProviderClientGetAvailableStacksOnPremOptions struct { - OSTypeSelected *ProviderOsTypeSelected -} - -// ProviderClientGetAvailableStacksOptions contains the optional parameters for the ProviderClient.NewGetAvailableStacksPager -// method. -type ProviderClientGetAvailableStacksOptions struct { - OSTypeSelected *ProviderOsTypeSelected -} - -// ProviderClientGetFunctionAppStacksForLocationOptions contains the optional parameters for the ProviderClient.NewGetFunctionAppStacksForLocationPager -// method. -type ProviderClientGetFunctionAppStacksForLocationOptions struct { - // Stack OS Type - StackOsType *ProviderStackOsType -} - -// ProviderClientGetFunctionAppStacksOptions contains the optional parameters for the ProviderClient.NewGetFunctionAppStacksPager -// method. -type ProviderClientGetFunctionAppStacksOptions struct { - // Stack OS Type - StackOsType *ProviderStackOsType -} - -// ProviderClientGetWebAppStacksForLocationOptions contains the optional parameters for the ProviderClient.NewGetWebAppStacksForLocationPager -// method. -type ProviderClientGetWebAppStacksForLocationOptions struct { - // Stack OS Type - StackOsType *ProviderStackOsType -} - -// ProviderClientGetWebAppStacksOptions contains the optional parameters for the ProviderClient.NewGetWebAppStacksPager method. -type ProviderClientGetWebAppStacksOptions struct { - // Stack OS Type - StackOsType *ProviderStackOsType -} - -// ProviderClientListOperationsOptions contains the optional parameters for the ProviderClient.NewListOperationsPager method. -type ProviderClientListOperationsOptions struct { - // placeholder for future optional parameters -} - // ProxyOnlyResource - Azure proxy only resource. This resource is not tracked by Azure Resource Manager. type ProxyOnlyResource struct { // Kind of resource. @@ -7126,124 +6143,6 @@ type RecommendationRuleProperties struct { CategoryTags []*string } -// RecommendationsClientDisableAllForHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.DisableAllForHostingEnvironment -// method. -type RecommendationsClientDisableAllForHostingEnvironmentOptions struct { - // placeholder for future optional parameters -} - -// RecommendationsClientDisableAllForWebAppOptions contains the optional parameters for the RecommendationsClient.DisableAllForWebApp -// method. -type RecommendationsClientDisableAllForWebAppOptions struct { - // placeholder for future optional parameters -} - -// RecommendationsClientDisableRecommendationForHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.DisableRecommendationForHostingEnvironment -// method. -type RecommendationsClientDisableRecommendationForHostingEnvironmentOptions struct { - // placeholder for future optional parameters -} - -// RecommendationsClientDisableRecommendationForSiteOptions contains the optional parameters for the RecommendationsClient.DisableRecommendationForSite -// method. -type RecommendationsClientDisableRecommendationForSiteOptions struct { - // placeholder for future optional parameters -} - -// RecommendationsClientDisableRecommendationForSubscriptionOptions contains the optional parameters for the RecommendationsClient.DisableRecommendationForSubscription -// method. -type RecommendationsClientDisableRecommendationForSubscriptionOptions struct { - // placeholder for future optional parameters -} - -// RecommendationsClientGetRuleDetailsByHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.GetRuleDetailsByHostingEnvironment -// method. -type RecommendationsClientGetRuleDetailsByHostingEnvironmentOptions struct { - // The GUID of the recommendation object if you query an expired one. You don't need to specify it to query an active entry. - RecommendationID *string - // Specify true to update the last-seen timestamp of the recommendation object. - UpdateSeen *bool -} - -// RecommendationsClientGetRuleDetailsByWebAppOptions contains the optional parameters for the RecommendationsClient.GetRuleDetailsByWebApp -// method. -type RecommendationsClientGetRuleDetailsByWebAppOptions struct { - // The GUID of the recommendation object if you query an expired one. You don't need to specify it to query an active entry. - RecommendationID *string - // Specify true to update the last-seen timestamp of the recommendation object. - UpdateSeen *bool -} - -// RecommendationsClientListHistoryForHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.NewListHistoryForHostingEnvironmentPager -// method. -type RecommendationsClientListHistoryForHostingEnvironmentOptions struct { - // Specify false to return all recommendations. The default is true, which returns only expired recommendations. - ExpiredOnly *bool - // Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification' and startTime - // eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq - // duration'[PT1H|PT1M|P1D] - Filter *string -} - -// RecommendationsClientListHistoryForWebAppOptions contains the optional parameters for the RecommendationsClient.NewListHistoryForWebAppPager -// method. -type RecommendationsClientListHistoryForWebAppOptions struct { - // Specify false to return all recommendations. The default is true, which returns only expired recommendations. - ExpiredOnly *bool - // Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification' and startTime - // eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq - // duration'[PT1H|PT1M|P1D] - Filter *string -} - -// RecommendationsClientListOptions contains the optional parameters for the RecommendationsClient.NewListPager method. -type RecommendationsClientListOptions struct { - // Specify true to return only the most critical recommendations. The default is false, which returns all recommendations. - Featured *bool - // Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification' and startTime - // eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq - // duration'[PT1H|PT1M|P1D] - Filter *string -} - -// RecommendationsClientListRecommendedRulesForHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.NewListRecommendedRulesForHostingEnvironmentPager -// method. -type RecommendationsClientListRecommendedRulesForHostingEnvironmentOptions struct { - // Specify true to return only the most critical recommendations. The default is false, which returns all recommendations. - Featured *bool - // Return only channels specified in the filter. Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' - // or channel eq 'Notification' - Filter *string -} - -// RecommendationsClientListRecommendedRulesForWebAppOptions contains the optional parameters for the RecommendationsClient.NewListRecommendedRulesForWebAppPager -// method. -type RecommendationsClientListRecommendedRulesForWebAppOptions struct { - // Specify true to return only the most critical recommendations. The default is false, which returns all recommendations. - Featured *bool - // Return only channels specified in the filter. Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' - // or channel eq 'Notification' - Filter *string -} - -// RecommendationsClientResetAllFiltersForHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.ResetAllFiltersForHostingEnvironment -// method. -type RecommendationsClientResetAllFiltersForHostingEnvironmentOptions struct { - // placeholder for future optional parameters -} - -// RecommendationsClientResetAllFiltersForWebAppOptions contains the optional parameters for the RecommendationsClient.ResetAllFiltersForWebApp -// method. -type RecommendationsClientResetAllFiltersForWebAppOptions struct { - // placeholder for future optional parameters -} - -// RecommendationsClientResetAllFiltersOptions contains the optional parameters for the RecommendationsClient.ResetAllFilters -// method. -type RecommendationsClientResetAllFiltersOptions struct { - // placeholder for future optional parameters -} - // RecurrenceSchedule - The recurrence schedule. type RecurrenceSchedule struct { // The hours. @@ -7564,6 +6463,15 @@ type ResourceCollection struct { NextLink *string } +// ResourceConfig - Function app resource requirements. +type ResourceConfig struct { + // Required CPU in cores, e.g. 0.5 + CPU *float64 + + // Required memory, e.g. "1Gi" + Memory *string +} + // ResourceHealthMetadata - Used for getting ResourceHealthCheck settings. type ResourceHealthMetadata struct { // Kind of resource. @@ -7582,42 +6490,6 @@ type ResourceHealthMetadata struct { Type *string } -// ResourceHealthMetadataClientGetBySiteOptions contains the optional parameters for the ResourceHealthMetadataClient.GetBySite -// method. -type ResourceHealthMetadataClientGetBySiteOptions struct { - // placeholder for future optional parameters -} - -// ResourceHealthMetadataClientGetBySiteSlotOptions contains the optional parameters for the ResourceHealthMetadataClient.GetBySiteSlot -// method. -type ResourceHealthMetadataClientGetBySiteSlotOptions struct { - // placeholder for future optional parameters -} - -// ResourceHealthMetadataClientListByResourceGroupOptions contains the optional parameters for the ResourceHealthMetadataClient.NewListByResourceGroupPager -// method. -type ResourceHealthMetadataClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ResourceHealthMetadataClientListBySiteOptions contains the optional parameters for the ResourceHealthMetadataClient.NewListBySitePager -// method. -type ResourceHealthMetadataClientListBySiteOptions struct { - // placeholder for future optional parameters -} - -// ResourceHealthMetadataClientListBySiteSlotOptions contains the optional parameters for the ResourceHealthMetadataClient.NewListBySiteSlotPager -// method. -type ResourceHealthMetadataClientListBySiteSlotOptions struct { - // placeholder for future optional parameters -} - -// ResourceHealthMetadataClientListOptions contains the optional parameters for the ResourceHealthMetadataClient.NewListPager -// method. -type ResourceHealthMetadataClientListOptions struct { - // placeholder for future optional parameters -} - // ResourceHealthMetadataCollection - Collection of resource health metadata. type ResourceHealthMetadataCollection struct { // REQUIRED; Collection of resources. @@ -7713,6 +6585,11 @@ type ResourceNameAvailabilityRequest struct { // REQUIRED; Resource type used for verification. Type *CheckNameResourceTypes + // Azure Resource Manager ID of the customer's selected Container Apps Environment on which to host the Function app. This + // must be of the form + // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName} + EnvironmentID *string + // Is fully qualified domain name. IsFqdn *bool } @@ -8482,6 +7359,9 @@ type SiteConfig struct { // Application metadata. This property cannot be retrieved, since it may contain secrets. Metadata []*NameValuePair + // The minimum strength TLS cipher suite allowed for an application + MinTLSCipherSuite *TLSCipherSuites + // MinTlsVersion: configures the minimum version of TLS required for SSL requests MinTLSVersion *SupportedTLSVersions @@ -9030,6 +7910,9 @@ type SiteProperties struct { // Maximum allowed daily memory-time quota (applicable on dynamic apps only). DailyMemoryTimeQuota *int32 + // Dapr configuration of the app. + DaprConfig *DaprConfig + // true if the app is enabled; otherwise, false. Setting this value to false disables the app (takes the app offline). Enabled *bool @@ -9069,6 +7952,9 @@ type SiteProperties struct { // true if reserved; otherwise, false. Reserved *bool + // Function app resource requirements. + ResourceConfig *ResourceConfig + // true to stop SCM (KUDU) site when the app is stopped; otherwise, false. The default is false. ScmSiteAlsoStopped *bool @@ -9096,6 +7982,9 @@ type SiteProperties struct { // Routes applied. VnetRouteAllEnabled *bool + // Workload profile name for function app to execute on. + WorkloadProfileName *string + // READ-ONLY; Management information availability state for the app. AvailabilityState *SiteAvailabilityState @@ -10245,477 +9134,10 @@ type StaticSiteZipDeploymentARMResource struct { Type *string } -// StaticSitesClientBeginApproveOrRejectPrivateEndpointConnectionOptions contains the optional parameters for the StaticSitesClient.BeginApproveOrRejectPrivateEndpointConnection -// method. -type StaticSitesClientBeginApproveOrRejectPrivateEndpointConnectionOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StaticSitesClientBeginCreateOrUpdateStaticSiteCustomDomainOptions contains the optional parameters for the StaticSitesClient.BeginCreateOrUpdateStaticSiteCustomDomain -// method. -type StaticSitesClientBeginCreateOrUpdateStaticSiteCustomDomainOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StaticSitesClientBeginCreateOrUpdateStaticSiteOptions contains the optional parameters for the StaticSitesClient.BeginCreateOrUpdateStaticSite -// method. -type StaticSitesClientBeginCreateOrUpdateStaticSiteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StaticSitesClientBeginCreateZipDeploymentForStaticSiteBuildOptions contains the optional parameters for the StaticSitesClient.BeginCreateZipDeploymentForStaticSiteBuild -// method. -type StaticSitesClientBeginCreateZipDeploymentForStaticSiteBuildOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StaticSitesClientBeginCreateZipDeploymentForStaticSiteOptions contains the optional parameters for the StaticSitesClient.BeginCreateZipDeploymentForStaticSite -// method. -type StaticSitesClientBeginCreateZipDeploymentForStaticSiteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StaticSitesClientBeginDeletePrivateEndpointConnectionOptions contains the optional parameters for the StaticSitesClient.BeginDeletePrivateEndpointConnection -// method. -type StaticSitesClientBeginDeletePrivateEndpointConnectionOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StaticSitesClientBeginDeleteStaticSiteBuildOptions contains the optional parameters for the StaticSitesClient.BeginDeleteStaticSiteBuild -// method. -type StaticSitesClientBeginDeleteStaticSiteBuildOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StaticSitesClientBeginDeleteStaticSiteCustomDomainOptions contains the optional parameters for the StaticSitesClient.BeginDeleteStaticSiteCustomDomain -// method. -type StaticSitesClientBeginDeleteStaticSiteCustomDomainOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StaticSitesClientBeginDeleteStaticSiteOptions contains the optional parameters for the StaticSitesClient.BeginDeleteStaticSite -// method. -type StaticSitesClientBeginDeleteStaticSiteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StaticSitesClientBeginDetachStaticSiteOptions contains the optional parameters for the StaticSitesClient.BeginDetachStaticSite -// method. -type StaticSitesClientBeginDetachStaticSiteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StaticSitesClientBeginLinkBackendOptions contains the optional parameters for the StaticSitesClient.BeginLinkBackend method. -type StaticSitesClientBeginLinkBackendOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StaticSitesClientBeginLinkBackendToBuildOptions contains the optional parameters for the StaticSitesClient.BeginLinkBackendToBuild -// method. -type StaticSitesClientBeginLinkBackendToBuildOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteBuildOptions contains the optional parameters for the -// StaticSitesClient.BeginRegisterUserProvidedFunctionAppWithStaticSiteBuild method. -type StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteBuildOptions struct { - // Specify true to force the update of the auth configuration on the function app even if an AzureStaticWebApps provider is - // already configured on the function app. The default is false. - IsForced *bool - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteOptions contains the optional parameters for the StaticSitesClient.BeginRegisterUserProvidedFunctionAppWithStaticSite -// method. -type StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteOptions struct { - // Specify true to force the update of the auth configuration on the function app even if an AzureStaticWebApps provider is - // already configured on the function app. The default is false. - IsForced *bool - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StaticSitesClientBeginValidateBackendForBuildOptions contains the optional parameters for the StaticSitesClient.BeginValidateBackendForBuild -// method. -type StaticSitesClientBeginValidateBackendForBuildOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StaticSitesClientBeginValidateBackendOptions contains the optional parameters for the StaticSitesClient.BeginValidateBackend -// method. -type StaticSitesClientBeginValidateBackendOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StaticSitesClientBeginValidateCustomDomainCanBeAddedToStaticSiteOptions contains the optional parameters for the StaticSitesClient.BeginValidateCustomDomainCanBeAddedToStaticSite -// method. -type StaticSitesClientBeginValidateCustomDomainCanBeAddedToStaticSiteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// StaticSitesClientCreateOrUpdateBasicAuthOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateBasicAuth -// method. -type StaticSitesClientCreateOrUpdateBasicAuthOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientCreateOrUpdateBuildDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateBuildDatabaseConnection -// method. -type StaticSitesClientCreateOrUpdateBuildDatabaseConnectionOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientCreateOrUpdateDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateDatabaseConnection -// method. -type StaticSitesClientCreateOrUpdateDatabaseConnectionOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientCreateOrUpdateStaticSiteAppSettingsOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateStaticSiteAppSettings -// method. -type StaticSitesClientCreateOrUpdateStaticSiteAppSettingsOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateStaticSiteBuildAppSettings -// method. -type StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateStaticSiteBuildFunctionAppSettings -// method. -type StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateStaticSiteFunctionAppSettings -// method. -type StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientCreateUserRolesInvitationLinkOptions contains the optional parameters for the StaticSitesClient.CreateUserRolesInvitationLink -// method. -type StaticSitesClientCreateUserRolesInvitationLinkOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientDeleteBuildDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.DeleteBuildDatabaseConnection -// method. -type StaticSitesClientDeleteBuildDatabaseConnectionOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientDeleteDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.DeleteDatabaseConnection -// method. -type StaticSitesClientDeleteDatabaseConnectionOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientDeleteStaticSiteUserOptions contains the optional parameters for the StaticSitesClient.DeleteStaticSiteUser -// method. -type StaticSitesClientDeleteStaticSiteUserOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildOptions contains the optional parameters for the StaticSitesClient.DetachUserProvidedFunctionAppFromStaticSiteBuild -// method. -type StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteOptions contains the optional parameters for the StaticSitesClient.DetachUserProvidedFunctionAppFromStaticSite -// method. -type StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientGetBasicAuthOptions contains the optional parameters for the StaticSitesClient.GetBasicAuth method. -type StaticSitesClientGetBasicAuthOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientGetBuildDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.GetBuildDatabaseConnection -// method. -type StaticSitesClientGetBuildDatabaseConnectionOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientGetBuildDatabaseConnectionWithDetailsOptions contains the optional parameters for the StaticSitesClient.GetBuildDatabaseConnectionWithDetails -// method. -type StaticSitesClientGetBuildDatabaseConnectionWithDetailsOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientGetBuildDatabaseConnectionsOptions contains the optional parameters for the StaticSitesClient.NewGetBuildDatabaseConnectionsPager -// method. -type StaticSitesClientGetBuildDatabaseConnectionsOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientGetBuildDatabaseConnectionsWithDetailsOptions contains the optional parameters for the StaticSitesClient.NewGetBuildDatabaseConnectionsWithDetailsPager -// method. -type StaticSitesClientGetBuildDatabaseConnectionsWithDetailsOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientGetDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.GetDatabaseConnection -// method. -type StaticSitesClientGetDatabaseConnectionOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientGetDatabaseConnectionWithDetailsOptions contains the optional parameters for the StaticSitesClient.GetDatabaseConnectionWithDetails -// method. -type StaticSitesClientGetDatabaseConnectionWithDetailsOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientGetDatabaseConnectionsOptions contains the optional parameters for the StaticSitesClient.NewGetDatabaseConnectionsPager -// method. -type StaticSitesClientGetDatabaseConnectionsOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientGetDatabaseConnectionsWithDetailsOptions contains the optional parameters for the StaticSitesClient.NewGetDatabaseConnectionsWithDetailsPager -// method. -type StaticSitesClientGetDatabaseConnectionsWithDetailsOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientGetLinkedBackendForBuildOptions contains the optional parameters for the StaticSitesClient.GetLinkedBackendForBuild -// method. -type StaticSitesClientGetLinkedBackendForBuildOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientGetLinkedBackendOptions contains the optional parameters for the StaticSitesClient.GetLinkedBackend method. -type StaticSitesClientGetLinkedBackendOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientGetLinkedBackendsForBuildOptions contains the optional parameters for the StaticSitesClient.NewGetLinkedBackendsForBuildPager -// method. -type StaticSitesClientGetLinkedBackendsForBuildOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientGetLinkedBackendsOptions contains the optional parameters for the StaticSitesClient.NewGetLinkedBackendsPager -// method. -type StaticSitesClientGetLinkedBackendsOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientGetPrivateEndpointConnectionListOptions contains the optional parameters for the StaticSitesClient.NewGetPrivateEndpointConnectionListPager -// method. -type StaticSitesClientGetPrivateEndpointConnectionListOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientGetPrivateEndpointConnectionOptions contains the optional parameters for the StaticSitesClient.GetPrivateEndpointConnection -// method. -type StaticSitesClientGetPrivateEndpointConnectionOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientGetPrivateLinkResourcesOptions contains the optional parameters for the StaticSitesClient.GetPrivateLinkResources -// method. -type StaticSitesClientGetPrivateLinkResourcesOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientGetStaticSiteBuildOptions contains the optional parameters for the StaticSitesClient.GetStaticSiteBuild -// method. -type StaticSitesClientGetStaticSiteBuildOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientGetStaticSiteBuildsOptions contains the optional parameters for the StaticSitesClient.NewGetStaticSiteBuildsPager -// method. -type StaticSitesClientGetStaticSiteBuildsOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientGetStaticSiteCustomDomainOptions contains the optional parameters for the StaticSitesClient.GetStaticSiteCustomDomain -// method. -type StaticSitesClientGetStaticSiteCustomDomainOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientGetStaticSiteOptions contains the optional parameters for the StaticSitesClient.GetStaticSite method. -type StaticSitesClientGetStaticSiteOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientGetStaticSitesByResourceGroupOptions contains the optional parameters for the StaticSitesClient.NewGetStaticSitesByResourceGroupPager -// method. -type StaticSitesClientGetStaticSitesByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildOptions contains the optional parameters for the StaticSitesClient.GetUserProvidedFunctionAppForStaticSiteBuild -// method. -type StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientGetUserProvidedFunctionAppForStaticSiteOptions contains the optional parameters for the StaticSitesClient.GetUserProvidedFunctionAppForStaticSite -// method. -type StaticSitesClientGetUserProvidedFunctionAppForStaticSiteOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildOptions contains the optional parameters for the StaticSitesClient.NewGetUserProvidedFunctionAppsForStaticSiteBuildPager -// method. -type StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteOptions contains the optional parameters for the StaticSitesClient.NewGetUserProvidedFunctionAppsForStaticSitePager -// method. -type StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientListBasicAuthOptions contains the optional parameters for the StaticSitesClient.NewListBasicAuthPager -// method. -type StaticSitesClientListBasicAuthOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientListOptions contains the optional parameters for the StaticSitesClient.NewListPager method. -type StaticSitesClientListOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientListStaticSiteAppSettingsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteAppSettings -// method. -type StaticSitesClientListStaticSiteAppSettingsOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientListStaticSiteBuildAppSettingsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteBuildAppSettings -// method. -type StaticSitesClientListStaticSiteBuildAppSettingsOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientListStaticSiteBuildFunctionAppSettingsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteBuildFunctionAppSettings -// method. -type StaticSitesClientListStaticSiteBuildFunctionAppSettingsOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientListStaticSiteBuildFunctionsOptions contains the optional parameters for the StaticSitesClient.NewListStaticSiteBuildFunctionsPager -// method. -type StaticSitesClientListStaticSiteBuildFunctionsOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientListStaticSiteConfiguredRolesOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteConfiguredRoles -// method. -type StaticSitesClientListStaticSiteConfiguredRolesOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientListStaticSiteCustomDomainsOptions contains the optional parameters for the StaticSitesClient.NewListStaticSiteCustomDomainsPager -// method. -type StaticSitesClientListStaticSiteCustomDomainsOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientListStaticSiteFunctionAppSettingsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteFunctionAppSettings -// method. -type StaticSitesClientListStaticSiteFunctionAppSettingsOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientListStaticSiteFunctionsOptions contains the optional parameters for the StaticSitesClient.NewListStaticSiteFunctionsPager -// method. -type StaticSitesClientListStaticSiteFunctionsOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientListStaticSiteSecretsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteSecrets -// method. -type StaticSitesClientListStaticSiteSecretsOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientListStaticSiteUsersOptions contains the optional parameters for the StaticSitesClient.NewListStaticSiteUsersPager -// method. -type StaticSitesClientListStaticSiteUsersOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientPreviewWorkflowOptions contains the optional parameters for the StaticSitesClient.PreviewWorkflow method. -type StaticSitesClientPreviewWorkflowOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientResetStaticSiteAPIKeyOptions contains the optional parameters for the StaticSitesClient.ResetStaticSiteAPIKey -// method. -type StaticSitesClientResetStaticSiteAPIKeyOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientUnlinkBackendFromBuildOptions contains the optional parameters for the StaticSitesClient.UnlinkBackendFromBuild -// method. -type StaticSitesClientUnlinkBackendFromBuildOptions struct { - // Decides if auth will be removed from backend configuration - IsCleaningAuthConfig *bool -} - -// StaticSitesClientUnlinkBackendOptions contains the optional parameters for the StaticSitesClient.UnlinkBackend method. -type StaticSitesClientUnlinkBackendOptions struct { - // Decides if Easy Auth configuration will be removed from backend configuration - IsCleaningAuthConfig *bool -} - -// StaticSitesClientUpdateBuildDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.UpdateBuildDatabaseConnection -// method. -type StaticSitesClientUpdateBuildDatabaseConnectionOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientUpdateDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.UpdateDatabaseConnection -// method. -type StaticSitesClientUpdateDatabaseConnectionOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientUpdateStaticSiteOptions contains the optional parameters for the StaticSitesClient.UpdateStaticSite method. -type StaticSitesClientUpdateStaticSiteOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesClientUpdateStaticSiteUserOptions contains the optional parameters for the StaticSitesClient.UpdateStaticSiteUser -// method. -type StaticSitesClientUpdateStaticSiteUserOptions struct { - // placeholder for future optional parameters -} - -// StaticSitesWorkflowPreview - Preview for the Static Site Workflow to be generated -type StaticSitesWorkflowPreview struct { - // Kind of resource. - Kind *string +// StaticSitesWorkflowPreview - Preview for the Static Site Workflow to be generated +type StaticSitesWorkflowPreview struct { + // Kind of resource. + Kind *string // StaticSitesWorkflowPreview resource specific properties Properties *StaticSitesWorkflowPreviewProperties @@ -11049,22 +9471,6 @@ type TopLevelDomainProperties struct { Privacy *bool } -// TopLevelDomainsClientGetOptions contains the optional parameters for the TopLevelDomainsClient.Get method. -type TopLevelDomainsClientGetOptions struct { - // placeholder for future optional parameters -} - -// TopLevelDomainsClientListAgreementsOptions contains the optional parameters for the TopLevelDomainsClient.NewListAgreementsPager -// method. -type TopLevelDomainsClientListAgreementsOptions struct { - // placeholder for future optional parameters -} - -// TopLevelDomainsClientListOptions contains the optional parameters for the TopLevelDomainsClient.NewListPager method. -type TopLevelDomainsClientListOptions struct { - // placeholder for future optional parameters -} - // TrafficWeight - Traffic weight assigned to a revision type TrafficWeight struct { // Indicates that the traffic weight belongs to a latest stable revision @@ -11796,2624 +10202,112 @@ type WebAppStackProperties struct { Value *string } -// WebAppsClientAddPremierAddOnOptions contains the optional parameters for the WebAppsClient.AddPremierAddOn method. -type WebAppsClientAddPremierAddOnOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientAddPremierAddOnSlotOptions contains the optional parameters for the WebAppsClient.AddPremierAddOnSlot method. -type WebAppsClientAddPremierAddOnSlotOptions struct { - // placeholder for future optional parameters -} +// WebJob - Web Job Information. +type WebJob struct { + // Kind of resource. + Kind *string -// WebAppsClientAnalyzeCustomHostnameOptions contains the optional parameters for the WebAppsClient.AnalyzeCustomHostname -// method. -type WebAppsClientAnalyzeCustomHostnameOptions struct { - // Custom hostname. - HostName *string -} + // WebJob resource specific properties + Properties *WebJobProperties -// WebAppsClientAnalyzeCustomHostnameSlotOptions contains the optional parameters for the WebAppsClient.AnalyzeCustomHostnameSlot -// method. -type WebAppsClientAnalyzeCustomHostnameSlotOptions struct { - // Custom hostname. - HostName *string -} + // READ-ONLY; Resource Id. + ID *string -// WebAppsClientApplySlotConfigToProductionOptions contains the optional parameters for the WebAppsClient.ApplySlotConfigToProduction -// method. -type WebAppsClientApplySlotConfigToProductionOptions struct { - // placeholder for future optional parameters -} + // READ-ONLY; Resource Name. + Name *string -// WebAppsClientApplySlotConfigurationSlotOptions contains the optional parameters for the WebAppsClient.ApplySlotConfigurationSlot -// method. -type WebAppsClientApplySlotConfigurationSlotOptions struct { - // placeholder for future optional parameters + // READ-ONLY; Resource type. + Type *string } -// WebAppsClientBackupOptions contains the optional parameters for the WebAppsClient.Backup method. -type WebAppsClientBackupOptions struct { - // placeholder for future optional parameters -} +// WebJobCollection - Collection of Kudu web job information elements. +type WebJobCollection struct { + // REQUIRED; Collection of resources. + Value []*WebJob -// WebAppsClientBackupSlotOptions contains the optional parameters for the WebAppsClient.BackupSlot method. -type WebAppsClientBackupSlotOptions struct { - // placeholder for future optional parameters + // READ-ONLY; Link to next page of resources. + NextLink *string } -// WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionOptions contains the optional parameters for the WebAppsClient.BeginApproveOrRejectPrivateEndpointConnection -// method. -type WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} +// WebJobProperties - WebJob resource specific properties +type WebJobProperties struct { + // Error information. + Error *string -// WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionSlotOptions contains the optional parameters for the WebAppsClient.BeginApproveOrRejectPrivateEndpointConnectionSlot -// method. -type WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionSlotOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} + // Extra Info URL. + ExtraInfoURL *string -// WebAppsClientBeginCreateFunctionOptions contains the optional parameters for the WebAppsClient.BeginCreateFunction method. -type WebAppsClientBeginCreateFunctionOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} + // Run command. + RunCommand *string -// WebAppsClientBeginCreateInstanceFunctionSlotOptions contains the optional parameters for the WebAppsClient.BeginCreateInstanceFunctionSlot -// method. -type WebAppsClientBeginCreateInstanceFunctionSlotOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} + // Job settings. + Settings map[string]any -// WebAppsClientBeginCreateInstanceMSDeployOperationOptions contains the optional parameters for the WebAppsClient.BeginCreateInstanceMSDeployOperation -// method. -type WebAppsClientBeginCreateInstanceMSDeployOperationOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} + // Job URL. + URL *string -// WebAppsClientBeginCreateInstanceMSDeployOperationSlotOptions contains the optional parameters for the WebAppsClient.BeginCreateInstanceMSDeployOperationSlot -// method. -type WebAppsClientBeginCreateInstanceMSDeployOperationSlotOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} + // Using SDK? + UsingSdk *bool -// WebAppsClientBeginCreateMSDeployOperationOptions contains the optional parameters for the WebAppsClient.BeginCreateMSDeployOperation -// method. -type WebAppsClientBeginCreateMSDeployOperationOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string + // Job type. + WebJobType *WebJobType } -// WebAppsClientBeginCreateMSDeployOperationSlotOptions contains the optional parameters for the WebAppsClient.BeginCreateMSDeployOperationSlot -// method. -type WebAppsClientBeginCreateMSDeployOperationSlotOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} +type WebSiteInstanceStatus struct { + // Kind of resource. + Kind *string -// WebAppsClientBeginCreateOrUpdateOptions contains the optional parameters for the WebAppsClient.BeginCreateOrUpdate method. -type WebAppsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} + // WebSiteInstanceStatus resource specific properties + Properties *WebSiteInstanceStatusProperties -// WebAppsClientBeginCreateOrUpdateSlotOptions contains the optional parameters for the WebAppsClient.BeginCreateOrUpdateSlot -// method. -type WebAppsClientBeginCreateOrUpdateSlotOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} + // READ-ONLY; Resource Id. + ID *string -// WebAppsClientBeginCreateOrUpdateSourceControlOptions contains the optional parameters for the WebAppsClient.BeginCreateOrUpdateSourceControl -// method. -type WebAppsClientBeginCreateOrUpdateSourceControlOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} + // READ-ONLY; Resource Name. + Name *string -// WebAppsClientBeginCreateOrUpdateSourceControlSlotOptions contains the optional parameters for the WebAppsClient.BeginCreateOrUpdateSourceControlSlot -// method. -type WebAppsClientBeginCreateOrUpdateSourceControlSlotOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string + // READ-ONLY; Resource type. + Type *string } -// WebAppsClientBeginDeletePrivateEndpointConnectionOptions contains the optional parameters for the WebAppsClient.BeginDeletePrivateEndpointConnection -// method. -type WebAppsClientBeginDeletePrivateEndpointConnectionOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} +// WebSiteInstanceStatusProperties - WebSiteInstanceStatus resource specific properties +type WebSiteInstanceStatusProperties struct { + // Link to the console to web app instance + ConsoleURL *string -// WebAppsClientBeginDeletePrivateEndpointConnectionSlotOptions contains the optional parameters for the WebAppsClient.BeginDeletePrivateEndpointConnectionSlot -// method. -type WebAppsClientBeginDeletePrivateEndpointConnectionSlotOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} + // Dictionary of + Containers map[string]*ContainerInfo -// WebAppsClientBeginGetProductionSiteDeploymentStatusOptions contains the optional parameters for the WebAppsClient.BeginGetProductionSiteDeploymentStatus -// method. -type WebAppsClientBeginGetProductionSiteDeploymentStatusOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} + // Link to the Diagnose and Solve Portal + DetectorURL *string -// WebAppsClientBeginGetSlotSiteDeploymentStatusSlotOptions contains the optional parameters for the WebAppsClient.BeginGetSlotSiteDeploymentStatusSlot -// method. -type WebAppsClientBeginGetSlotSiteDeploymentStatusSlotOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} + // Link to the console to web app instance + HealthCheckURL *string + State *SiteRuntimeState -// WebAppsClientBeginInstallSiteExtensionOptions contains the optional parameters for the WebAppsClient.BeginInstallSiteExtension -// method. -type WebAppsClientBeginInstallSiteExtensionOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string + // Link to the GetStatusApi in Kudu + StatusURL *string } -// WebAppsClientBeginInstallSiteExtensionSlotOptions contains the optional parameters for the WebAppsClient.BeginInstallSiteExtensionSlot -// method. -type WebAppsClientBeginInstallSiteExtensionSlotOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} +// WindowsJavaContainerSettings - Windows Java Container settings. +type WindowsJavaContainerSettings struct { + // READ-ONLY; End-of-life date for the minor version. + EndOfLifeDate *time.Time -// WebAppsClientBeginListPublishingCredentialsOptions contains the optional parameters for the WebAppsClient.BeginListPublishingCredentials -// method. -type WebAppsClientBeginListPublishingCredentialsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} + // READ-ONLY; true if the stack version is auto-updated; otherwise, false. + IsAutoUpdate *bool -// WebAppsClientBeginListPublishingCredentialsSlotOptions contains the optional parameters for the WebAppsClient.BeginListPublishingCredentialsSlot -// method. -type WebAppsClientBeginListPublishingCredentialsSlotOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} + // READ-ONLY; true if the stack is deprecated; otherwise, false. + IsDeprecated *bool -// WebAppsClientBeginMigrateMySQLOptions contains the optional parameters for the WebAppsClient.BeginMigrateMySQL method. -type WebAppsClientBeginMigrateMySQLOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} + // READ-ONLY; true if the minor version is early-access; otherwise, false. + IsEarlyAccess *bool -// WebAppsClientBeginMigrateStorageOptions contains the optional parameters for the WebAppsClient.BeginMigrateStorage method. -type WebAppsClientBeginMigrateStorageOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} + // READ-ONLY; true if the stack should be hidden; otherwise, false. + IsHidden *bool -// WebAppsClientBeginRestoreFromBackupBlobOptions contains the optional parameters for the WebAppsClient.BeginRestoreFromBackupBlob -// method. -type WebAppsClientBeginRestoreFromBackupBlobOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientBeginRestoreFromBackupBlobSlotOptions contains the optional parameters for the WebAppsClient.BeginRestoreFromBackupBlobSlot -// method. -type WebAppsClientBeginRestoreFromBackupBlobSlotOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientBeginRestoreFromDeletedAppOptions contains the optional parameters for the WebAppsClient.BeginRestoreFromDeletedApp -// method. -type WebAppsClientBeginRestoreFromDeletedAppOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientBeginRestoreFromDeletedAppSlotOptions contains the optional parameters for the WebAppsClient.BeginRestoreFromDeletedAppSlot -// method. -type WebAppsClientBeginRestoreFromDeletedAppSlotOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientBeginRestoreOptions contains the optional parameters for the WebAppsClient.BeginRestore method. -type WebAppsClientBeginRestoreOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientBeginRestoreSlotOptions contains the optional parameters for the WebAppsClient.BeginRestoreSlot method. -type WebAppsClientBeginRestoreSlotOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientBeginRestoreSnapshotOptions contains the optional parameters for the WebAppsClient.BeginRestoreSnapshot method. -type WebAppsClientBeginRestoreSnapshotOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientBeginRestoreSnapshotSlotOptions contains the optional parameters for the WebAppsClient.BeginRestoreSnapshotSlot -// method. -type WebAppsClientBeginRestoreSnapshotSlotOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientBeginStartNetworkTraceOptions contains the optional parameters for the WebAppsClient.BeginStartNetworkTrace -// method. -type WebAppsClientBeginStartNetworkTraceOptions struct { - // The duration to keep capturing in seconds. - DurationInSeconds *int32 - // The maximum frame length in bytes (Optional). - MaxFrameLength *int32 - // Resumes the LRO from the provided token. - ResumeToken string - // The Blob URL to store capture file. - SasURL *string -} - -// WebAppsClientBeginStartNetworkTraceSlotOptions contains the optional parameters for the WebAppsClient.BeginStartNetworkTraceSlot -// method. -type WebAppsClientBeginStartNetworkTraceSlotOptions struct { - // The duration to keep capturing in seconds. - DurationInSeconds *int32 - // The maximum frame length in bytes (Optional). - MaxFrameLength *int32 - // Resumes the LRO from the provided token. - ResumeToken string - // The Blob URL to store capture file. - SasURL *string -} - -// WebAppsClientBeginStartWebSiteNetworkTraceOperationOptions contains the optional parameters for the WebAppsClient.BeginStartWebSiteNetworkTraceOperation -// method. -type WebAppsClientBeginStartWebSiteNetworkTraceOperationOptions struct { - // The duration to keep capturing in seconds. - DurationInSeconds *int32 - // The maximum frame length in bytes (Optional). - MaxFrameLength *int32 - // Resumes the LRO from the provided token. - ResumeToken string - // The Blob URL to store capture file. - SasURL *string -} - -// WebAppsClientBeginStartWebSiteNetworkTraceOperationSlotOptions contains the optional parameters for the WebAppsClient.BeginStartWebSiteNetworkTraceOperationSlot -// method. -type WebAppsClientBeginStartWebSiteNetworkTraceOperationSlotOptions struct { - // The duration to keep capturing in seconds. - DurationInSeconds *int32 - // The maximum frame length in bytes (Optional). - MaxFrameLength *int32 - // Resumes the LRO from the provided token. - ResumeToken string - // The Blob URL to store capture file. - SasURL *string -} - -// WebAppsClientBeginSwapSlotOptions contains the optional parameters for the WebAppsClient.BeginSwapSlot method. -type WebAppsClientBeginSwapSlotOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientBeginSwapSlotWithProductionOptions contains the optional parameters for the WebAppsClient.BeginSwapSlotWithProduction -// method. -type WebAppsClientBeginSwapSlotWithProductionOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebAppsClientCreateDeploymentOptions contains the optional parameters for the WebAppsClient.CreateDeployment method. -type WebAppsClientCreateDeploymentOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateDeploymentSlotOptions contains the optional parameters for the WebAppsClient.CreateDeploymentSlot method. -type WebAppsClientCreateDeploymentSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOneDeployOperationOptions contains the optional parameters for the WebAppsClient.CreateOneDeployOperation -// method. -type WebAppsClientCreateOneDeployOperationOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateConfigurationOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateConfiguration -// method. -type WebAppsClientCreateOrUpdateConfigurationOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateConfigurationSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateConfigurationSlot -// method. -type WebAppsClientCreateOrUpdateConfigurationSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateDomainOwnershipIdentifierOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateDomainOwnershipIdentifier -// method. -type WebAppsClientCreateOrUpdateDomainOwnershipIdentifierOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateDomainOwnershipIdentifierSlot -// method. -type WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateFunctionSecretOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateFunctionSecret -// method. -type WebAppsClientCreateOrUpdateFunctionSecretOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateFunctionSecretSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateFunctionSecretSlot -// method. -type WebAppsClientCreateOrUpdateFunctionSecretSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateHostNameBindingOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHostNameBinding -// method. -type WebAppsClientCreateOrUpdateHostNameBindingOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateHostNameBindingSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHostNameBindingSlot -// method. -type WebAppsClientCreateOrUpdateHostNameBindingSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateHostSecretOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHostSecret -// method. -type WebAppsClientCreateOrUpdateHostSecretOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateHostSecretSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHostSecretSlot -// method. -type WebAppsClientCreateOrUpdateHostSecretSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateHybridConnectionOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHybridConnection -// method. -type WebAppsClientCreateOrUpdateHybridConnectionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateHybridConnectionSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHybridConnectionSlot -// method. -type WebAppsClientCreateOrUpdateHybridConnectionSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdatePublicCertificateOptions contains the optional parameters for the WebAppsClient.CreateOrUpdatePublicCertificate -// method. -type WebAppsClientCreateOrUpdatePublicCertificateOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdatePublicCertificateSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdatePublicCertificateSlot -// method. -type WebAppsClientCreateOrUpdatePublicCertificateSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateRelayServiceConnectionOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateRelayServiceConnection -// method. -type WebAppsClientCreateOrUpdateRelayServiceConnectionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateRelayServiceConnectionSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateRelayServiceConnectionSlot -// method. -type WebAppsClientCreateOrUpdateRelayServiceConnectionSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck -// method. -type WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot -// method. -type WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateVnetConnectionGatewayOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateVnetConnectionGateway -// method. -type WebAppsClientCreateOrUpdateVnetConnectionGatewayOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateVnetConnectionGatewaySlot -// method. -type WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateVnetConnectionOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateVnetConnection -// method. -type WebAppsClientCreateOrUpdateVnetConnectionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientCreateOrUpdateVnetConnectionSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateVnetConnectionSlot -// method. -type WebAppsClientCreateOrUpdateVnetConnectionSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteBackupConfigurationOptions contains the optional parameters for the WebAppsClient.DeleteBackupConfiguration -// method. -type WebAppsClientDeleteBackupConfigurationOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteBackupConfigurationSlotOptions contains the optional parameters for the WebAppsClient.DeleteBackupConfigurationSlot -// method. -type WebAppsClientDeleteBackupConfigurationSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteBackupOptions contains the optional parameters for the WebAppsClient.DeleteBackup method. -type WebAppsClientDeleteBackupOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteBackupSlotOptions contains the optional parameters for the WebAppsClient.DeleteBackupSlot method. -type WebAppsClientDeleteBackupSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteContinuousWebJobOptions contains the optional parameters for the WebAppsClient.DeleteContinuousWebJob -// method. -type WebAppsClientDeleteContinuousWebJobOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteContinuousWebJobSlotOptions contains the optional parameters for the WebAppsClient.DeleteContinuousWebJobSlot -// method. -type WebAppsClientDeleteContinuousWebJobSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteDeploymentOptions contains the optional parameters for the WebAppsClient.DeleteDeployment method. -type WebAppsClientDeleteDeploymentOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteDeploymentSlotOptions contains the optional parameters for the WebAppsClient.DeleteDeploymentSlot method. -type WebAppsClientDeleteDeploymentSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteDomainOwnershipIdentifierOptions contains the optional parameters for the WebAppsClient.DeleteDomainOwnershipIdentifier -// method. -type WebAppsClientDeleteDomainOwnershipIdentifierOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteDomainOwnershipIdentifierSlotOptions contains the optional parameters for the WebAppsClient.DeleteDomainOwnershipIdentifierSlot -// method. -type WebAppsClientDeleteDomainOwnershipIdentifierSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteFunctionOptions contains the optional parameters for the WebAppsClient.DeleteFunction method. -type WebAppsClientDeleteFunctionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteFunctionSecretOptions contains the optional parameters for the WebAppsClient.DeleteFunctionSecret method. -type WebAppsClientDeleteFunctionSecretOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteFunctionSecretSlotOptions contains the optional parameters for the WebAppsClient.DeleteFunctionSecretSlot -// method. -type WebAppsClientDeleteFunctionSecretSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteHostNameBindingOptions contains the optional parameters for the WebAppsClient.DeleteHostNameBinding -// method. -type WebAppsClientDeleteHostNameBindingOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteHostNameBindingSlotOptions contains the optional parameters for the WebAppsClient.DeleteHostNameBindingSlot -// method. -type WebAppsClientDeleteHostNameBindingSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteHostSecretOptions contains the optional parameters for the WebAppsClient.DeleteHostSecret method. -type WebAppsClientDeleteHostSecretOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteHostSecretSlotOptions contains the optional parameters for the WebAppsClient.DeleteHostSecretSlot method. -type WebAppsClientDeleteHostSecretSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteHybridConnectionOptions contains the optional parameters for the WebAppsClient.DeleteHybridConnection -// method. -type WebAppsClientDeleteHybridConnectionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteHybridConnectionSlotOptions contains the optional parameters for the WebAppsClient.DeleteHybridConnectionSlot -// method. -type WebAppsClientDeleteHybridConnectionSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteInstanceFunctionSlotOptions contains the optional parameters for the WebAppsClient.DeleteInstanceFunctionSlot -// method. -type WebAppsClientDeleteInstanceFunctionSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteInstanceProcessOptions contains the optional parameters for the WebAppsClient.DeleteInstanceProcess -// method. -type WebAppsClientDeleteInstanceProcessOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteInstanceProcessSlotOptions contains the optional parameters for the WebAppsClient.DeleteInstanceProcessSlot -// method. -type WebAppsClientDeleteInstanceProcessSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteOptions contains the optional parameters for the WebAppsClient.Delete method. -type WebAppsClientDeleteOptions struct { - // Specify false if you want to keep empty App Service plan. By default, empty App Service plan is deleted. - DeleteEmptyServerFarm *bool - // If true, web app metrics are also deleted. - DeleteMetrics *bool -} - -// WebAppsClientDeletePremierAddOnOptions contains the optional parameters for the WebAppsClient.DeletePremierAddOn method. -type WebAppsClientDeletePremierAddOnOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeletePremierAddOnSlotOptions contains the optional parameters for the WebAppsClient.DeletePremierAddOnSlot -// method. -type WebAppsClientDeletePremierAddOnSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteProcessOptions contains the optional parameters for the WebAppsClient.DeleteProcess method. -type WebAppsClientDeleteProcessOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteProcessSlotOptions contains the optional parameters for the WebAppsClient.DeleteProcessSlot method. -type WebAppsClientDeleteProcessSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeletePublicCertificateOptions contains the optional parameters for the WebAppsClient.DeletePublicCertificate -// method. -type WebAppsClientDeletePublicCertificateOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeletePublicCertificateSlotOptions contains the optional parameters for the WebAppsClient.DeletePublicCertificateSlot -// method. -type WebAppsClientDeletePublicCertificateSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteRelayServiceConnectionOptions contains the optional parameters for the WebAppsClient.DeleteRelayServiceConnection -// method. -type WebAppsClientDeleteRelayServiceConnectionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteRelayServiceConnectionSlotOptions contains the optional parameters for the WebAppsClient.DeleteRelayServiceConnectionSlot -// method. -type WebAppsClientDeleteRelayServiceConnectionSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteSiteExtensionOptions contains the optional parameters for the WebAppsClient.DeleteSiteExtension method. -type WebAppsClientDeleteSiteExtensionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteSiteExtensionSlotOptions contains the optional parameters for the WebAppsClient.DeleteSiteExtensionSlot -// method. -type WebAppsClientDeleteSiteExtensionSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteSlotOptions contains the optional parameters for the WebAppsClient.DeleteSlot method. -type WebAppsClientDeleteSlotOptions struct { - // Specify false if you want to keep empty App Service plan. By default, empty App Service plan is deleted. - DeleteEmptyServerFarm *bool - // If true, web app metrics are also deleted. - DeleteMetrics *bool -} - -// WebAppsClientDeleteSourceControlOptions contains the optional parameters for the WebAppsClient.DeleteSourceControl method. -type WebAppsClientDeleteSourceControlOptions struct { - AdditionalFlags *string -} - -// WebAppsClientDeleteSourceControlSlotOptions contains the optional parameters for the WebAppsClient.DeleteSourceControlSlot -// method. -type WebAppsClientDeleteSourceControlSlotOptions struct { - AdditionalFlags *string -} - -// WebAppsClientDeleteSwiftVirtualNetworkOptions contains the optional parameters for the WebAppsClient.DeleteSwiftVirtualNetwork -// method. -type WebAppsClientDeleteSwiftVirtualNetworkOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteSwiftVirtualNetworkSlotOptions contains the optional parameters for the WebAppsClient.DeleteSwiftVirtualNetworkSlot -// method. -type WebAppsClientDeleteSwiftVirtualNetworkSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteTriggeredWebJobOptions contains the optional parameters for the WebAppsClient.DeleteTriggeredWebJob -// method. -type WebAppsClientDeleteTriggeredWebJobOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteTriggeredWebJobSlotOptions contains the optional parameters for the WebAppsClient.DeleteTriggeredWebJobSlot -// method. -type WebAppsClientDeleteTriggeredWebJobSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteVnetConnectionOptions contains the optional parameters for the WebAppsClient.DeleteVnetConnection method. -type WebAppsClientDeleteVnetConnectionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeleteVnetConnectionSlotOptions contains the optional parameters for the WebAppsClient.DeleteVnetConnectionSlot -// method. -type WebAppsClientDeleteVnetConnectionSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDeployWorkflowArtifactsOptions contains the optional parameters for the WebAppsClient.DeployWorkflowArtifacts -// method. -type WebAppsClientDeployWorkflowArtifactsOptions struct { - // Application settings and files of the workflow. - WorkflowArtifacts *WorkflowArtifacts -} - -// WebAppsClientDeployWorkflowArtifactsSlotOptions contains the optional parameters for the WebAppsClient.DeployWorkflowArtifactsSlot -// method. -type WebAppsClientDeployWorkflowArtifactsSlotOptions struct { - // Application settings and files of the workflow. - WorkflowArtifacts *WorkflowArtifacts -} - -// WebAppsClientDiscoverBackupOptions contains the optional parameters for the WebAppsClient.DiscoverBackup method. -type WebAppsClientDiscoverBackupOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientDiscoverBackupSlotOptions contains the optional parameters for the WebAppsClient.DiscoverBackupSlot method. -type WebAppsClientDiscoverBackupSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGenerateNewSitePublishingPasswordOptions contains the optional parameters for the WebAppsClient.GenerateNewSitePublishingPassword -// method. -type WebAppsClientGenerateNewSitePublishingPasswordOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGenerateNewSitePublishingPasswordSlotOptions contains the optional parameters for the WebAppsClient.GenerateNewSitePublishingPasswordSlot -// method. -type WebAppsClientGenerateNewSitePublishingPasswordSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetAppSettingKeyVaultReferenceOptions contains the optional parameters for the WebAppsClient.GetAppSettingKeyVaultReference -// method. -type WebAppsClientGetAppSettingKeyVaultReferenceOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetAppSettingKeyVaultReferenceSlotOptions contains the optional parameters for the WebAppsClient.GetAppSettingKeyVaultReferenceSlot -// method. -type WebAppsClientGetAppSettingKeyVaultReferenceSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetAppSettingsKeyVaultReferencesOptions contains the optional parameters for the WebAppsClient.NewGetAppSettingsKeyVaultReferencesPager -// method. -type WebAppsClientGetAppSettingsKeyVaultReferencesOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetAppSettingsKeyVaultReferencesSlotOptions contains the optional parameters for the WebAppsClient.NewGetAppSettingsKeyVaultReferencesSlotPager -// method. -type WebAppsClientGetAppSettingsKeyVaultReferencesSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetAuthSettingsOptions contains the optional parameters for the WebAppsClient.GetAuthSettings method. -type WebAppsClientGetAuthSettingsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetAuthSettingsSlotOptions contains the optional parameters for the WebAppsClient.GetAuthSettingsSlot method. -type WebAppsClientGetAuthSettingsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetAuthSettingsV2Options contains the optional parameters for the WebAppsClient.GetAuthSettingsV2 method. -type WebAppsClientGetAuthSettingsV2Options struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetAuthSettingsV2SlotOptions contains the optional parameters for the WebAppsClient.GetAuthSettingsV2Slot -// method. -type WebAppsClientGetAuthSettingsV2SlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetAuthSettingsV2WithoutSecretsOptions contains the optional parameters for the WebAppsClient.GetAuthSettingsV2WithoutSecrets -// method. -type WebAppsClientGetAuthSettingsV2WithoutSecretsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetAuthSettingsV2WithoutSecretsSlotOptions contains the optional parameters for the WebAppsClient.GetAuthSettingsV2WithoutSecretsSlot -// method. -type WebAppsClientGetAuthSettingsV2WithoutSecretsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetBackupConfigurationOptions contains the optional parameters for the WebAppsClient.GetBackupConfiguration -// method. -type WebAppsClientGetBackupConfigurationOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetBackupConfigurationSlotOptions contains the optional parameters for the WebAppsClient.GetBackupConfigurationSlot -// method. -type WebAppsClientGetBackupConfigurationSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetBackupStatusOptions contains the optional parameters for the WebAppsClient.GetBackupStatus method. -type WebAppsClientGetBackupStatusOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetBackupStatusSlotOptions contains the optional parameters for the WebAppsClient.GetBackupStatusSlot method. -type WebAppsClientGetBackupStatusSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetConfigurationOptions contains the optional parameters for the WebAppsClient.GetConfiguration method. -type WebAppsClientGetConfigurationOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetConfigurationSlotOptions contains the optional parameters for the WebAppsClient.GetConfigurationSlot method. -type WebAppsClientGetConfigurationSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetConfigurationSnapshotOptions contains the optional parameters for the WebAppsClient.GetConfigurationSnapshot -// method. -type WebAppsClientGetConfigurationSnapshotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetConfigurationSnapshotSlotOptions contains the optional parameters for the WebAppsClient.GetConfigurationSnapshotSlot -// method. -type WebAppsClientGetConfigurationSnapshotSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetContainerLogsZipOptions contains the optional parameters for the WebAppsClient.GetContainerLogsZip method. -type WebAppsClientGetContainerLogsZipOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetContainerLogsZipSlotOptions contains the optional parameters for the WebAppsClient.GetContainerLogsZipSlot -// method. -type WebAppsClientGetContainerLogsZipSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetContinuousWebJobOptions contains the optional parameters for the WebAppsClient.GetContinuousWebJob method. -type WebAppsClientGetContinuousWebJobOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetContinuousWebJobSlotOptions contains the optional parameters for the WebAppsClient.GetContinuousWebJobSlot -// method. -type WebAppsClientGetContinuousWebJobSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetDeploymentOptions contains the optional parameters for the WebAppsClient.GetDeployment method. -type WebAppsClientGetDeploymentOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetDeploymentSlotOptions contains the optional parameters for the WebAppsClient.GetDeploymentSlot method. -type WebAppsClientGetDeploymentSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetDiagnosticLogsConfigurationOptions contains the optional parameters for the WebAppsClient.GetDiagnosticLogsConfiguration -// method. -type WebAppsClientGetDiagnosticLogsConfigurationOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetDiagnosticLogsConfigurationSlotOptions contains the optional parameters for the WebAppsClient.GetDiagnosticLogsConfigurationSlot -// method. -type WebAppsClientGetDiagnosticLogsConfigurationSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetDomainOwnershipIdentifierOptions contains the optional parameters for the WebAppsClient.GetDomainOwnershipIdentifier -// method. -type WebAppsClientGetDomainOwnershipIdentifierOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetDomainOwnershipIdentifierSlotOptions contains the optional parameters for the WebAppsClient.GetDomainOwnershipIdentifierSlot -// method. -type WebAppsClientGetDomainOwnershipIdentifierSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetFtpAllowedOptions contains the optional parameters for the WebAppsClient.GetFtpAllowed method. -type WebAppsClientGetFtpAllowedOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetFtpAllowedSlotOptions contains the optional parameters for the WebAppsClient.GetFtpAllowedSlot method. -type WebAppsClientGetFtpAllowedSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetFunctionOptions contains the optional parameters for the WebAppsClient.GetFunction method. -type WebAppsClientGetFunctionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetFunctionsAdminTokenOptions contains the optional parameters for the WebAppsClient.GetFunctionsAdminToken -// method. -type WebAppsClientGetFunctionsAdminTokenOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetFunctionsAdminTokenSlotOptions contains the optional parameters for the WebAppsClient.GetFunctionsAdminTokenSlot -// method. -type WebAppsClientGetFunctionsAdminTokenSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetHostNameBindingOptions contains the optional parameters for the WebAppsClient.GetHostNameBinding method. -type WebAppsClientGetHostNameBindingOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetHostNameBindingSlotOptions contains the optional parameters for the WebAppsClient.GetHostNameBindingSlot -// method. -type WebAppsClientGetHostNameBindingSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetHybridConnectionOptions contains the optional parameters for the WebAppsClient.GetHybridConnection method. -type WebAppsClientGetHybridConnectionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetHybridConnectionSlotOptions contains the optional parameters for the WebAppsClient.GetHybridConnectionSlot -// method. -type WebAppsClientGetHybridConnectionSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetInstanceFunctionSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceFunctionSlot -// method. -type WebAppsClientGetInstanceFunctionSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetInstanceInfoOptions contains the optional parameters for the WebAppsClient.GetInstanceInfo method. -type WebAppsClientGetInstanceInfoOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetInstanceInfoSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceInfoSlot method. -type WebAppsClientGetInstanceInfoSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetInstanceMSDeployLogOptions contains the optional parameters for the WebAppsClient.GetInstanceMSDeployLog -// method. -type WebAppsClientGetInstanceMSDeployLogOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetInstanceMSDeployLogSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceMSDeployLogSlot -// method. -type WebAppsClientGetInstanceMSDeployLogSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetInstanceMsDeployStatusOptions contains the optional parameters for the WebAppsClient.GetInstanceMsDeployStatus -// method. -type WebAppsClientGetInstanceMsDeployStatusOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetInstanceMsDeployStatusSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceMsDeployStatusSlot -// method. -type WebAppsClientGetInstanceMsDeployStatusSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetInstanceProcessDumpOptions contains the optional parameters for the WebAppsClient.GetInstanceProcessDump -// method. -type WebAppsClientGetInstanceProcessDumpOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetInstanceProcessDumpSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceProcessDumpSlot -// method. -type WebAppsClientGetInstanceProcessDumpSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetInstanceProcessModuleOptions contains the optional parameters for the WebAppsClient.GetInstanceProcessModule -// method. -type WebAppsClientGetInstanceProcessModuleOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetInstanceProcessModuleSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceProcessModuleSlot -// method. -type WebAppsClientGetInstanceProcessModuleSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetInstanceProcessOptions contains the optional parameters for the WebAppsClient.GetInstanceProcess method. -type WebAppsClientGetInstanceProcessOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetInstanceProcessSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceProcessSlot -// method. -type WebAppsClientGetInstanceProcessSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetInstanceWorkflowSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceWorkflowSlot -// method. -type WebAppsClientGetInstanceWorkflowSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetMSDeployLogOptions contains the optional parameters for the WebAppsClient.GetMSDeployLog method. -type WebAppsClientGetMSDeployLogOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetMSDeployLogSlotOptions contains the optional parameters for the WebAppsClient.GetMSDeployLogSlot method. -type WebAppsClientGetMSDeployLogSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetMSDeployStatusOptions contains the optional parameters for the WebAppsClient.GetMSDeployStatus method. -type WebAppsClientGetMSDeployStatusOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetMSDeployStatusSlotOptions contains the optional parameters for the WebAppsClient.GetMSDeployStatusSlot -// method. -type WebAppsClientGetMSDeployStatusSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetMigrateMySQLStatusOptions contains the optional parameters for the WebAppsClient.GetMigrateMySQLStatus -// method. -type WebAppsClientGetMigrateMySQLStatusOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetMigrateMySQLStatusSlotOptions contains the optional parameters for the WebAppsClient.GetMigrateMySQLStatusSlot -// method. -type WebAppsClientGetMigrateMySQLStatusSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetNetworkTraceOperationOptions contains the optional parameters for the WebAppsClient.GetNetworkTraceOperation -// method. -type WebAppsClientGetNetworkTraceOperationOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetNetworkTraceOperationSlotOptions contains the optional parameters for the WebAppsClient.GetNetworkTraceOperationSlot -// method. -type WebAppsClientGetNetworkTraceOperationSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetNetworkTraceOperationSlotV2Options contains the optional parameters for the WebAppsClient.GetNetworkTraceOperationSlotV2 -// method. -type WebAppsClientGetNetworkTraceOperationSlotV2Options struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetNetworkTraceOperationV2Options contains the optional parameters for the WebAppsClient.GetNetworkTraceOperationV2 -// method. -type WebAppsClientGetNetworkTraceOperationV2Options struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetNetworkTracesOptions contains the optional parameters for the WebAppsClient.GetNetworkTraces method. -type WebAppsClientGetNetworkTracesOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetNetworkTracesSlotOptions contains the optional parameters for the WebAppsClient.GetNetworkTracesSlot method. -type WebAppsClientGetNetworkTracesSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetNetworkTracesSlotV2Options contains the optional parameters for the WebAppsClient.GetNetworkTracesSlotV2 -// method. -type WebAppsClientGetNetworkTracesSlotV2Options struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetNetworkTracesV2Options contains the optional parameters for the WebAppsClient.GetNetworkTracesV2 method. -type WebAppsClientGetNetworkTracesV2Options struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetOneDeployStatusOptions contains the optional parameters for the WebAppsClient.GetOneDeployStatus method. -type WebAppsClientGetOneDeployStatusOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetOptions contains the optional parameters for the WebAppsClient.Get method. -type WebAppsClientGetOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetPremierAddOnOptions contains the optional parameters for the WebAppsClient.GetPremierAddOn method. -type WebAppsClientGetPremierAddOnOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetPremierAddOnSlotOptions contains the optional parameters for the WebAppsClient.GetPremierAddOnSlot method. -type WebAppsClientGetPremierAddOnSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetPrivateAccessOptions contains the optional parameters for the WebAppsClient.GetPrivateAccess method. -type WebAppsClientGetPrivateAccessOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetPrivateAccessSlotOptions contains the optional parameters for the WebAppsClient.GetPrivateAccessSlot method. -type WebAppsClientGetPrivateAccessSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetPrivateEndpointConnectionListOptions contains the optional parameters for the WebAppsClient.NewGetPrivateEndpointConnectionListPager -// method. -type WebAppsClientGetPrivateEndpointConnectionListOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetPrivateEndpointConnectionListSlotOptions contains the optional parameters for the WebAppsClient.NewGetPrivateEndpointConnectionListSlotPager -// method. -type WebAppsClientGetPrivateEndpointConnectionListSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetPrivateEndpointConnectionOptions contains the optional parameters for the WebAppsClient.GetPrivateEndpointConnection -// method. -type WebAppsClientGetPrivateEndpointConnectionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetPrivateEndpointConnectionSlotOptions contains the optional parameters for the WebAppsClient.GetPrivateEndpointConnectionSlot -// method. -type WebAppsClientGetPrivateEndpointConnectionSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetPrivateLinkResourcesOptions contains the optional parameters for the WebAppsClient.GetPrivateLinkResources -// method. -type WebAppsClientGetPrivateLinkResourcesOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetPrivateLinkResourcesSlotOptions contains the optional parameters for the WebAppsClient.GetPrivateLinkResourcesSlot -// method. -type WebAppsClientGetPrivateLinkResourcesSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetProcessDumpOptions contains the optional parameters for the WebAppsClient.GetProcessDump method. -type WebAppsClientGetProcessDumpOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetProcessDumpSlotOptions contains the optional parameters for the WebAppsClient.GetProcessDumpSlot method. -type WebAppsClientGetProcessDumpSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetProcessModuleOptions contains the optional parameters for the WebAppsClient.GetProcessModule method. -type WebAppsClientGetProcessModuleOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetProcessModuleSlotOptions contains the optional parameters for the WebAppsClient.GetProcessModuleSlot method. -type WebAppsClientGetProcessModuleSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetProcessOptions contains the optional parameters for the WebAppsClient.GetProcess method. -type WebAppsClientGetProcessOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetProcessSlotOptions contains the optional parameters for the WebAppsClient.GetProcessSlot method. -type WebAppsClientGetProcessSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetPublicCertificateOptions contains the optional parameters for the WebAppsClient.GetPublicCertificate method. -type WebAppsClientGetPublicCertificateOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetPublicCertificateSlotOptions contains the optional parameters for the WebAppsClient.GetPublicCertificateSlot -// method. -type WebAppsClientGetPublicCertificateSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetRelayServiceConnectionOptions contains the optional parameters for the WebAppsClient.GetRelayServiceConnection -// method. -type WebAppsClientGetRelayServiceConnectionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetRelayServiceConnectionSlotOptions contains the optional parameters for the WebAppsClient.GetRelayServiceConnectionSlot -// method. -type WebAppsClientGetRelayServiceConnectionSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetScmAllowedOptions contains the optional parameters for the WebAppsClient.GetScmAllowed method. -type WebAppsClientGetScmAllowedOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetScmAllowedSlotOptions contains the optional parameters for the WebAppsClient.GetScmAllowedSlot method. -type WebAppsClientGetScmAllowedSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetSiteConnectionStringKeyVaultReferenceOptions contains the optional parameters for the WebAppsClient.GetSiteConnectionStringKeyVaultReference -// method. -type WebAppsClientGetSiteConnectionStringKeyVaultReferenceOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotOptions contains the optional parameters for the WebAppsClient.GetSiteConnectionStringKeyVaultReferenceSlot -// method. -type WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetSiteConnectionStringKeyVaultReferencesOptions contains the optional parameters for the WebAppsClient.NewGetSiteConnectionStringKeyVaultReferencesPager -// method. -type WebAppsClientGetSiteConnectionStringKeyVaultReferencesOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotOptions contains the optional parameters for the WebAppsClient.NewGetSiteConnectionStringKeyVaultReferencesSlotPager -// method. -type WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetSiteExtensionOptions contains the optional parameters for the WebAppsClient.GetSiteExtension method. -type WebAppsClientGetSiteExtensionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetSiteExtensionSlotOptions contains the optional parameters for the WebAppsClient.GetSiteExtensionSlot method. -type WebAppsClientGetSiteExtensionSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetSitePhpErrorLogFlagOptions contains the optional parameters for the WebAppsClient.GetSitePhpErrorLogFlag -// method. -type WebAppsClientGetSitePhpErrorLogFlagOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetSitePhpErrorLogFlagSlotOptions contains the optional parameters for the WebAppsClient.GetSitePhpErrorLogFlagSlot -// method. -type WebAppsClientGetSitePhpErrorLogFlagSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetSlotOptions contains the optional parameters for the WebAppsClient.GetSlot method. -type WebAppsClientGetSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetSourceControlOptions contains the optional parameters for the WebAppsClient.GetSourceControl method. -type WebAppsClientGetSourceControlOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetSourceControlSlotOptions contains the optional parameters for the WebAppsClient.GetSourceControlSlot method. -type WebAppsClientGetSourceControlSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetSwiftVirtualNetworkConnectionOptions contains the optional parameters for the WebAppsClient.GetSwiftVirtualNetworkConnection -// method. -type WebAppsClientGetSwiftVirtualNetworkConnectionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetSwiftVirtualNetworkConnectionSlotOptions contains the optional parameters for the WebAppsClient.GetSwiftVirtualNetworkConnectionSlot -// method. -type WebAppsClientGetSwiftVirtualNetworkConnectionSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetTriggeredWebJobHistoryOptions contains the optional parameters for the WebAppsClient.GetTriggeredWebJobHistory -// method. -type WebAppsClientGetTriggeredWebJobHistoryOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetTriggeredWebJobHistorySlotOptions contains the optional parameters for the WebAppsClient.GetTriggeredWebJobHistorySlot -// method. -type WebAppsClientGetTriggeredWebJobHistorySlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetTriggeredWebJobOptions contains the optional parameters for the WebAppsClient.GetTriggeredWebJob method. -type WebAppsClientGetTriggeredWebJobOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetTriggeredWebJobSlotOptions contains the optional parameters for the WebAppsClient.GetTriggeredWebJobSlot -// method. -type WebAppsClientGetTriggeredWebJobSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetVnetConnectionGatewayOptions contains the optional parameters for the WebAppsClient.GetVnetConnectionGateway -// method. -type WebAppsClientGetVnetConnectionGatewayOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetVnetConnectionGatewaySlotOptions contains the optional parameters for the WebAppsClient.GetVnetConnectionGatewaySlot -// method. -type WebAppsClientGetVnetConnectionGatewaySlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetVnetConnectionOptions contains the optional parameters for the WebAppsClient.GetVnetConnection method. -type WebAppsClientGetVnetConnectionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetVnetConnectionSlotOptions contains the optional parameters for the WebAppsClient.GetVnetConnectionSlot -// method. -type WebAppsClientGetVnetConnectionSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetWebJobOptions contains the optional parameters for the WebAppsClient.GetWebJob method. -type WebAppsClientGetWebJobOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetWebJobSlotOptions contains the optional parameters for the WebAppsClient.GetWebJobSlot method. -type WebAppsClientGetWebJobSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetWebSiteContainerLogsOptions contains the optional parameters for the WebAppsClient.GetWebSiteContainerLogs -// method. -type WebAppsClientGetWebSiteContainerLogsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetWebSiteContainerLogsSlotOptions contains the optional parameters for the WebAppsClient.GetWebSiteContainerLogsSlot -// method. -type WebAppsClientGetWebSiteContainerLogsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientGetWorkflowOptions contains the optional parameters for the WebAppsClient.GetWorkflow method. -type WebAppsClientGetWorkflowOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientIsCloneableOptions contains the optional parameters for the WebAppsClient.IsCloneable method. -type WebAppsClientIsCloneableOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientIsCloneableSlotOptions contains the optional parameters for the WebAppsClient.IsCloneableSlot method. -type WebAppsClientIsCloneableSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListApplicationSettingsOptions contains the optional parameters for the WebAppsClient.ListApplicationSettings -// method. -type WebAppsClientListApplicationSettingsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListApplicationSettingsSlotOptions contains the optional parameters for the WebAppsClient.ListApplicationSettingsSlot -// method. -type WebAppsClientListApplicationSettingsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListAzureStorageAccountsOptions contains the optional parameters for the WebAppsClient.ListAzureStorageAccounts -// method. -type WebAppsClientListAzureStorageAccountsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListAzureStorageAccountsSlotOptions contains the optional parameters for the WebAppsClient.ListAzureStorageAccountsSlot -// method. -type WebAppsClientListAzureStorageAccountsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListBackupStatusSecretsOptions contains the optional parameters for the WebAppsClient.ListBackupStatusSecrets -// method. -type WebAppsClientListBackupStatusSecretsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListBackupStatusSecretsSlotOptions contains the optional parameters for the WebAppsClient.ListBackupStatusSecretsSlot -// method. -type WebAppsClientListBackupStatusSecretsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListBackupsOptions contains the optional parameters for the WebAppsClient.NewListBackupsPager method. -type WebAppsClientListBackupsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListBackupsSlotOptions contains the optional parameters for the WebAppsClient.NewListBackupsSlotPager method. -type WebAppsClientListBackupsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListBasicPublishingCredentialsPoliciesOptions contains the optional parameters for the WebAppsClient.NewListBasicPublishingCredentialsPoliciesPager -// method. -type WebAppsClientListBasicPublishingCredentialsPoliciesOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListBasicPublishingCredentialsPoliciesSlotOptions contains the optional parameters for the WebAppsClient.NewListBasicPublishingCredentialsPoliciesSlotPager -// method. -type WebAppsClientListBasicPublishingCredentialsPoliciesSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListByResourceGroupOptions contains the optional parameters for the WebAppsClient.NewListByResourceGroupPager -// method. -type WebAppsClientListByResourceGroupOptions struct { - // Specify true to include deployment slots in results. The default is false, which only gives you the production slot of - // all apps. - IncludeSlots *bool -} - -// WebAppsClientListConfigurationSnapshotInfoOptions contains the optional parameters for the WebAppsClient.NewListConfigurationSnapshotInfoPager -// method. -type WebAppsClientListConfigurationSnapshotInfoOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListConfigurationSnapshotInfoSlotOptions contains the optional parameters for the WebAppsClient.NewListConfigurationSnapshotInfoSlotPager -// method. -type WebAppsClientListConfigurationSnapshotInfoSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListConfigurationsOptions contains the optional parameters for the WebAppsClient.NewListConfigurationsPager -// method. -type WebAppsClientListConfigurationsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListConfigurationsSlotOptions contains the optional parameters for the WebAppsClient.NewListConfigurationsSlotPager -// method. -type WebAppsClientListConfigurationsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListConnectionStringsOptions contains the optional parameters for the WebAppsClient.ListConnectionStrings -// method. -type WebAppsClientListConnectionStringsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListConnectionStringsSlotOptions contains the optional parameters for the WebAppsClient.ListConnectionStringsSlot -// method. -type WebAppsClientListConnectionStringsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListContinuousWebJobsOptions contains the optional parameters for the WebAppsClient.NewListContinuousWebJobsPager -// method. -type WebAppsClientListContinuousWebJobsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListContinuousWebJobsSlotOptions contains the optional parameters for the WebAppsClient.NewListContinuousWebJobsSlotPager -// method. -type WebAppsClientListContinuousWebJobsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListDeploymentLogOptions contains the optional parameters for the WebAppsClient.ListDeploymentLog method. -type WebAppsClientListDeploymentLogOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListDeploymentLogSlotOptions contains the optional parameters for the WebAppsClient.ListDeploymentLogSlot -// method. -type WebAppsClientListDeploymentLogSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListDeploymentsOptions contains the optional parameters for the WebAppsClient.NewListDeploymentsPager method. -type WebAppsClientListDeploymentsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListDeploymentsSlotOptions contains the optional parameters for the WebAppsClient.NewListDeploymentsSlotPager -// method. -type WebAppsClientListDeploymentsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListDomainOwnershipIdentifiersOptions contains the optional parameters for the WebAppsClient.NewListDomainOwnershipIdentifiersPager -// method. -type WebAppsClientListDomainOwnershipIdentifiersOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListDomainOwnershipIdentifiersSlotOptions contains the optional parameters for the WebAppsClient.NewListDomainOwnershipIdentifiersSlotPager -// method. -type WebAppsClientListDomainOwnershipIdentifiersSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListFunctionKeysOptions contains the optional parameters for the WebAppsClient.ListFunctionKeys method. -type WebAppsClientListFunctionKeysOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListFunctionKeysSlotOptions contains the optional parameters for the WebAppsClient.ListFunctionKeysSlot method. -type WebAppsClientListFunctionKeysSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListFunctionSecretsOptions contains the optional parameters for the WebAppsClient.ListFunctionSecrets method. -type WebAppsClientListFunctionSecretsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListFunctionSecretsSlotOptions contains the optional parameters for the WebAppsClient.ListFunctionSecretsSlot -// method. -type WebAppsClientListFunctionSecretsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListFunctionsOptions contains the optional parameters for the WebAppsClient.NewListFunctionsPager method. -type WebAppsClientListFunctionsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListHostKeysOptions contains the optional parameters for the WebAppsClient.ListHostKeys method. -type WebAppsClientListHostKeysOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListHostKeysSlotOptions contains the optional parameters for the WebAppsClient.ListHostKeysSlot method. -type WebAppsClientListHostKeysSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListHostNameBindingsOptions contains the optional parameters for the WebAppsClient.NewListHostNameBindingsPager -// method. -type WebAppsClientListHostNameBindingsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListHostNameBindingsSlotOptions contains the optional parameters for the WebAppsClient.NewListHostNameBindingsSlotPager -// method. -type WebAppsClientListHostNameBindingsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListHybridConnectionsOptions contains the optional parameters for the WebAppsClient.ListHybridConnections -// method. -type WebAppsClientListHybridConnectionsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListHybridConnectionsSlotOptions contains the optional parameters for the WebAppsClient.ListHybridConnectionsSlot -// method. -type WebAppsClientListHybridConnectionsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListInstanceFunctionsSlotOptions contains the optional parameters for the WebAppsClient.NewListInstanceFunctionsSlotPager -// method. -type WebAppsClientListInstanceFunctionsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListInstanceIdentifiersOptions contains the optional parameters for the WebAppsClient.NewListInstanceIdentifiersPager -// method. -type WebAppsClientListInstanceIdentifiersOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListInstanceIdentifiersSlotOptions contains the optional parameters for the WebAppsClient.NewListInstanceIdentifiersSlotPager -// method. -type WebAppsClientListInstanceIdentifiersSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListInstanceProcessModulesOptions contains the optional parameters for the WebAppsClient.NewListInstanceProcessModulesPager -// method. -type WebAppsClientListInstanceProcessModulesOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListInstanceProcessModulesSlotOptions contains the optional parameters for the WebAppsClient.NewListInstanceProcessModulesSlotPager -// method. -type WebAppsClientListInstanceProcessModulesSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListInstanceProcessThreadsOptions contains the optional parameters for the WebAppsClient.NewListInstanceProcessThreadsPager -// method. -type WebAppsClientListInstanceProcessThreadsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListInstanceProcessThreadsSlotOptions contains the optional parameters for the WebAppsClient.NewListInstanceProcessThreadsSlotPager -// method. -type WebAppsClientListInstanceProcessThreadsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListInstanceProcessesOptions contains the optional parameters for the WebAppsClient.NewListInstanceProcessesPager -// method. -type WebAppsClientListInstanceProcessesOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListInstanceProcessesSlotOptions contains the optional parameters for the WebAppsClient.NewListInstanceProcessesSlotPager -// method. -type WebAppsClientListInstanceProcessesSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListInstanceWorkflowsSlotOptions contains the optional parameters for the WebAppsClient.NewListInstanceWorkflowsSlotPager -// method. -type WebAppsClientListInstanceWorkflowsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListMetadataOptions contains the optional parameters for the WebAppsClient.ListMetadata method. -type WebAppsClientListMetadataOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListMetadataSlotOptions contains the optional parameters for the WebAppsClient.ListMetadataSlot method. -type WebAppsClientListMetadataSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListNetworkFeaturesOptions contains the optional parameters for the WebAppsClient.ListNetworkFeatures method. -type WebAppsClientListNetworkFeaturesOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListNetworkFeaturesSlotOptions contains the optional parameters for the WebAppsClient.ListNetworkFeaturesSlot -// method. -type WebAppsClientListNetworkFeaturesSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListOptions contains the optional parameters for the WebAppsClient.NewListPager method. -type WebAppsClientListOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListPerfMonCountersOptions contains the optional parameters for the WebAppsClient.NewListPerfMonCountersPager -// method. -type WebAppsClientListPerfMonCountersOptions struct { - // Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(startTime eq 2014-01-01T00:00:00Z - // and endTime eq 2014-12-31T23:59:59Z and timeGrain eq - // duration'[Hour|Minute|Day]'. - Filter *string -} - -// WebAppsClientListPerfMonCountersSlotOptions contains the optional parameters for the WebAppsClient.NewListPerfMonCountersSlotPager -// method. -type WebAppsClientListPerfMonCountersSlotOptions struct { - // Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(startTime eq 2014-01-01T00:00:00Z - // and endTime eq 2014-12-31T23:59:59Z and timeGrain eq - // duration'[Hour|Minute|Day]'. - Filter *string -} - -// WebAppsClientListPremierAddOnsOptions contains the optional parameters for the WebAppsClient.ListPremierAddOns method. -type WebAppsClientListPremierAddOnsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListPremierAddOnsSlotOptions contains the optional parameters for the WebAppsClient.ListPremierAddOnsSlot -// method. -type WebAppsClientListPremierAddOnsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListProcessModulesOptions contains the optional parameters for the WebAppsClient.NewListProcessModulesPager -// method. -type WebAppsClientListProcessModulesOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListProcessModulesSlotOptions contains the optional parameters for the WebAppsClient.NewListProcessModulesSlotPager -// method. -type WebAppsClientListProcessModulesSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListProcessThreadsOptions contains the optional parameters for the WebAppsClient.NewListProcessThreadsPager -// method. -type WebAppsClientListProcessThreadsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListProcessThreadsSlotOptions contains the optional parameters for the WebAppsClient.NewListProcessThreadsSlotPager -// method. -type WebAppsClientListProcessThreadsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListProcessesOptions contains the optional parameters for the WebAppsClient.NewListProcessesPager method. -type WebAppsClientListProcessesOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListProcessesSlotOptions contains the optional parameters for the WebAppsClient.NewListProcessesSlotPager -// method. -type WebAppsClientListProcessesSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListProductionSiteDeploymentStatusesOptions contains the optional parameters for the WebAppsClient.NewListProductionSiteDeploymentStatusesPager -// method. -type WebAppsClientListProductionSiteDeploymentStatusesOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListPublicCertificatesOptions contains the optional parameters for the WebAppsClient.NewListPublicCertificatesPager -// method. -type WebAppsClientListPublicCertificatesOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListPublicCertificatesSlotOptions contains the optional parameters for the WebAppsClient.NewListPublicCertificatesSlotPager -// method. -type WebAppsClientListPublicCertificatesSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListPublishingProfileXMLWithSecretsOptions contains the optional parameters for the WebAppsClient.ListPublishingProfileXMLWithSecrets -// method. -type WebAppsClientListPublishingProfileXMLWithSecretsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListPublishingProfileXMLWithSecretsSlotOptions contains the optional parameters for the WebAppsClient.ListPublishingProfileXMLWithSecretsSlot -// method. -type WebAppsClientListPublishingProfileXMLWithSecretsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListRelayServiceConnectionsOptions contains the optional parameters for the WebAppsClient.ListRelayServiceConnections -// method. -type WebAppsClientListRelayServiceConnectionsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListRelayServiceConnectionsSlotOptions contains the optional parameters for the WebAppsClient.ListRelayServiceConnectionsSlot -// method. -type WebAppsClientListRelayServiceConnectionsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListSiteBackupsOptions contains the optional parameters for the WebAppsClient.NewListSiteBackupsPager method. -type WebAppsClientListSiteBackupsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListSiteBackupsSlotOptions contains the optional parameters for the WebAppsClient.NewListSiteBackupsSlotPager -// method. -type WebAppsClientListSiteBackupsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListSiteExtensionsOptions contains the optional parameters for the WebAppsClient.NewListSiteExtensionsPager -// method. -type WebAppsClientListSiteExtensionsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListSiteExtensionsSlotOptions contains the optional parameters for the WebAppsClient.NewListSiteExtensionsSlotPager -// method. -type WebAppsClientListSiteExtensionsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListSitePushSettingsOptions contains the optional parameters for the WebAppsClient.ListSitePushSettings method. -type WebAppsClientListSitePushSettingsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListSitePushSettingsSlotOptions contains the optional parameters for the WebAppsClient.ListSitePushSettingsSlot -// method. -type WebAppsClientListSitePushSettingsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListSlotConfigurationNamesOptions contains the optional parameters for the WebAppsClient.ListSlotConfigurationNames -// method. -type WebAppsClientListSlotConfigurationNamesOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListSlotDifferencesFromProductionOptions contains the optional parameters for the WebAppsClient.NewListSlotDifferencesFromProductionPager -// method. -type WebAppsClientListSlotDifferencesFromProductionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListSlotDifferencesSlotOptions contains the optional parameters for the WebAppsClient.NewListSlotDifferencesSlotPager -// method. -type WebAppsClientListSlotDifferencesSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListSlotSiteDeploymentStatusesSlotOptions contains the optional parameters for the WebAppsClient.NewListSlotSiteDeploymentStatusesSlotPager -// method. -type WebAppsClientListSlotSiteDeploymentStatusesSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListSlotsOptions contains the optional parameters for the WebAppsClient.NewListSlotsPager method. -type WebAppsClientListSlotsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListSnapshotsFromDRSecondaryOptions contains the optional parameters for the WebAppsClient.NewListSnapshotsFromDRSecondaryPager -// method. -type WebAppsClientListSnapshotsFromDRSecondaryOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListSnapshotsFromDRSecondarySlotOptions contains the optional parameters for the WebAppsClient.NewListSnapshotsFromDRSecondarySlotPager -// method. -type WebAppsClientListSnapshotsFromDRSecondarySlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListSnapshotsOptions contains the optional parameters for the WebAppsClient.NewListSnapshotsPager method. -type WebAppsClientListSnapshotsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListSnapshotsSlotOptions contains the optional parameters for the WebAppsClient.NewListSnapshotsSlotPager -// method. -type WebAppsClientListSnapshotsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListSyncFunctionTriggersOptions contains the optional parameters for the WebAppsClient.ListSyncFunctionTriggers -// method. -type WebAppsClientListSyncFunctionTriggersOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListSyncFunctionTriggersSlotOptions contains the optional parameters for the WebAppsClient.ListSyncFunctionTriggersSlot -// method. -type WebAppsClientListSyncFunctionTriggersSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListSyncStatusOptions contains the optional parameters for the WebAppsClient.ListSyncStatus method. -type WebAppsClientListSyncStatusOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListSyncStatusSlotOptions contains the optional parameters for the WebAppsClient.ListSyncStatusSlot method. -type WebAppsClientListSyncStatusSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListTriggeredWebJobHistoryOptions contains the optional parameters for the WebAppsClient.NewListTriggeredWebJobHistoryPager -// method. -type WebAppsClientListTriggeredWebJobHistoryOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListTriggeredWebJobHistorySlotOptions contains the optional parameters for the WebAppsClient.NewListTriggeredWebJobHistorySlotPager -// method. -type WebAppsClientListTriggeredWebJobHistorySlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListTriggeredWebJobsOptions contains the optional parameters for the WebAppsClient.NewListTriggeredWebJobsPager -// method. -type WebAppsClientListTriggeredWebJobsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListTriggeredWebJobsSlotOptions contains the optional parameters for the WebAppsClient.NewListTriggeredWebJobsSlotPager -// method. -type WebAppsClientListTriggeredWebJobsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListUsagesOptions contains the optional parameters for the WebAppsClient.NewListUsagesPager method. -type WebAppsClientListUsagesOptions struct { - // Return only information specified in the filter (using OData syntax). For example: $filter=(name.value eq 'Metric1' or - // name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq - // 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. - Filter *string -} - -// WebAppsClientListUsagesSlotOptions contains the optional parameters for the WebAppsClient.NewListUsagesSlotPager method. -type WebAppsClientListUsagesSlotOptions struct { - // Return only information specified in the filter (using OData syntax). For example: $filter=(name.value eq 'Metric1' or - // name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq - // 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. - Filter *string -} - -// WebAppsClientListVnetConnectionsOptions contains the optional parameters for the WebAppsClient.ListVnetConnections method. -type WebAppsClientListVnetConnectionsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListVnetConnectionsSlotOptions contains the optional parameters for the WebAppsClient.ListVnetConnectionsSlot -// method. -type WebAppsClientListVnetConnectionsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListWebJobsOptions contains the optional parameters for the WebAppsClient.NewListWebJobsPager method. -type WebAppsClientListWebJobsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListWebJobsSlotOptions contains the optional parameters for the WebAppsClient.NewListWebJobsSlotPager method. -type WebAppsClientListWebJobsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListWorkflowsConnectionsOptions contains the optional parameters for the WebAppsClient.ListWorkflowsConnections -// method. -type WebAppsClientListWorkflowsConnectionsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListWorkflowsConnectionsSlotOptions contains the optional parameters for the WebAppsClient.ListWorkflowsConnectionsSlot -// method. -type WebAppsClientListWorkflowsConnectionsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientListWorkflowsOptions contains the optional parameters for the WebAppsClient.NewListWorkflowsPager method. -type WebAppsClientListWorkflowsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientPutPrivateAccessVnetOptions contains the optional parameters for the WebAppsClient.PutPrivateAccessVnet method. -type WebAppsClientPutPrivateAccessVnetOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientPutPrivateAccessVnetSlotOptions contains the optional parameters for the WebAppsClient.PutPrivateAccessVnetSlot -// method. -type WebAppsClientPutPrivateAccessVnetSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientRecoverSiteConfigurationSnapshotOptions contains the optional parameters for the WebAppsClient.RecoverSiteConfigurationSnapshot -// method. -type WebAppsClientRecoverSiteConfigurationSnapshotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientRecoverSiteConfigurationSnapshotSlotOptions contains the optional parameters for the WebAppsClient.RecoverSiteConfigurationSnapshotSlot -// method. -type WebAppsClientRecoverSiteConfigurationSnapshotSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientResetProductionSlotConfigOptions contains the optional parameters for the WebAppsClient.ResetProductionSlotConfig -// method. -type WebAppsClientResetProductionSlotConfigOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientResetSlotConfigurationSlotOptions contains the optional parameters for the WebAppsClient.ResetSlotConfigurationSlot -// method. -type WebAppsClientResetSlotConfigurationSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientRestartOptions contains the optional parameters for the WebAppsClient.Restart method. -type WebAppsClientRestartOptions struct { - // Specify true to apply the configuration settings and restarts the app only if necessary. By default, the API always restarts - // and reprovisions the app. - SoftRestart *bool - // Specify true to block until the app is restarted. By default, it is set to false, and the API responds immediately (asynchronous). - Synchronous *bool -} - -// WebAppsClientRestartSlotOptions contains the optional parameters for the WebAppsClient.RestartSlot method. -type WebAppsClientRestartSlotOptions struct { - // Specify true to apply the configuration settings and restarts the app only if necessary. By default, the API always restarts - // and reprovisions the app. - SoftRestart *bool - // Specify true to block until the app is restarted. By default, it is set to false, and the API responds immediately (asynchronous). - Synchronous *bool -} - -// WebAppsClientRunTriggeredWebJobOptions contains the optional parameters for the WebAppsClient.RunTriggeredWebJob method. -type WebAppsClientRunTriggeredWebJobOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientRunTriggeredWebJobSlotOptions contains the optional parameters for the WebAppsClient.RunTriggeredWebJobSlot -// method. -type WebAppsClientRunTriggeredWebJobSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientStartContinuousWebJobOptions contains the optional parameters for the WebAppsClient.StartContinuousWebJob -// method. -type WebAppsClientStartContinuousWebJobOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientStartContinuousWebJobSlotOptions contains the optional parameters for the WebAppsClient.StartContinuousWebJobSlot -// method. -type WebAppsClientStartContinuousWebJobSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientStartOptions contains the optional parameters for the WebAppsClient.Start method. -type WebAppsClientStartOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientStartSlotOptions contains the optional parameters for the WebAppsClient.StartSlot method. -type WebAppsClientStartSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientStartWebSiteNetworkTraceOptions contains the optional parameters for the WebAppsClient.StartWebSiteNetworkTrace -// method. -type WebAppsClientStartWebSiteNetworkTraceOptions struct { - // The duration to keep capturing in seconds. - DurationInSeconds *int32 - // The maximum frame length in bytes (Optional). - MaxFrameLength *int32 - // The Blob URL to store capture file. - SasURL *string -} - -// WebAppsClientStartWebSiteNetworkTraceSlotOptions contains the optional parameters for the WebAppsClient.StartWebSiteNetworkTraceSlot -// method. -type WebAppsClientStartWebSiteNetworkTraceSlotOptions struct { - // The duration to keep capturing in seconds. - DurationInSeconds *int32 - // The maximum frame length in bytes (Optional). - MaxFrameLength *int32 - // The Blob URL to store capture file. - SasURL *string -} - -// WebAppsClientStopContinuousWebJobOptions contains the optional parameters for the WebAppsClient.StopContinuousWebJob method. -type WebAppsClientStopContinuousWebJobOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientStopContinuousWebJobSlotOptions contains the optional parameters for the WebAppsClient.StopContinuousWebJobSlot -// method. -type WebAppsClientStopContinuousWebJobSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientStopNetworkTraceOptions contains the optional parameters for the WebAppsClient.StopNetworkTrace method. -type WebAppsClientStopNetworkTraceOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientStopNetworkTraceSlotOptions contains the optional parameters for the WebAppsClient.StopNetworkTraceSlot method. -type WebAppsClientStopNetworkTraceSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientStopOptions contains the optional parameters for the WebAppsClient.Stop method. -type WebAppsClientStopOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientStopSlotOptions contains the optional parameters for the WebAppsClient.StopSlot method. -type WebAppsClientStopSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientStopWebSiteNetworkTraceOptions contains the optional parameters for the WebAppsClient.StopWebSiteNetworkTrace -// method. -type WebAppsClientStopWebSiteNetworkTraceOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientStopWebSiteNetworkTraceSlotOptions contains the optional parameters for the WebAppsClient.StopWebSiteNetworkTraceSlot -// method. -type WebAppsClientStopWebSiteNetworkTraceSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientSyncFunctionTriggersOptions contains the optional parameters for the WebAppsClient.SyncFunctionTriggers method. -type WebAppsClientSyncFunctionTriggersOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientSyncFunctionTriggersSlotOptions contains the optional parameters for the WebAppsClient.SyncFunctionTriggersSlot -// method. -type WebAppsClientSyncFunctionTriggersSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientSyncFunctionsOptions contains the optional parameters for the WebAppsClient.SyncFunctions method. -type WebAppsClientSyncFunctionsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientSyncFunctionsSlotOptions contains the optional parameters for the WebAppsClient.SyncFunctionsSlot method. -type WebAppsClientSyncFunctionsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientSyncRepositoryOptions contains the optional parameters for the WebAppsClient.SyncRepository method. -type WebAppsClientSyncRepositoryOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientSyncRepositorySlotOptions contains the optional parameters for the WebAppsClient.SyncRepositorySlot method. -type WebAppsClientSyncRepositorySlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateApplicationSettingsOptions contains the optional parameters for the WebAppsClient.UpdateApplicationSettings -// method. -type WebAppsClientUpdateApplicationSettingsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateApplicationSettingsSlotOptions contains the optional parameters for the WebAppsClient.UpdateApplicationSettingsSlot -// method. -type WebAppsClientUpdateApplicationSettingsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateAuthSettingsOptions contains the optional parameters for the WebAppsClient.UpdateAuthSettings method. -type WebAppsClientUpdateAuthSettingsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateAuthSettingsSlotOptions contains the optional parameters for the WebAppsClient.UpdateAuthSettingsSlot -// method. -type WebAppsClientUpdateAuthSettingsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateAuthSettingsV2Options contains the optional parameters for the WebAppsClient.UpdateAuthSettingsV2 method. -type WebAppsClientUpdateAuthSettingsV2Options struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateAuthSettingsV2SlotOptions contains the optional parameters for the WebAppsClient.UpdateAuthSettingsV2Slot -// method. -type WebAppsClientUpdateAuthSettingsV2SlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateAzureStorageAccountsOptions contains the optional parameters for the WebAppsClient.UpdateAzureStorageAccounts -// method. -type WebAppsClientUpdateAzureStorageAccountsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateAzureStorageAccountsSlotOptions contains the optional parameters for the WebAppsClient.UpdateAzureStorageAccountsSlot -// method. -type WebAppsClientUpdateAzureStorageAccountsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateBackupConfigurationOptions contains the optional parameters for the WebAppsClient.UpdateBackupConfiguration -// method. -type WebAppsClientUpdateBackupConfigurationOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateBackupConfigurationSlotOptions contains the optional parameters for the WebAppsClient.UpdateBackupConfigurationSlot -// method. -type WebAppsClientUpdateBackupConfigurationSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateConfigurationOptions contains the optional parameters for the WebAppsClient.UpdateConfiguration method. -type WebAppsClientUpdateConfigurationOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateConfigurationSlotOptions contains the optional parameters for the WebAppsClient.UpdateConfigurationSlot -// method. -type WebAppsClientUpdateConfigurationSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateConnectionStringsOptions contains the optional parameters for the WebAppsClient.UpdateConnectionStrings -// method. -type WebAppsClientUpdateConnectionStringsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateConnectionStringsSlotOptions contains the optional parameters for the WebAppsClient.UpdateConnectionStringsSlot -// method. -type WebAppsClientUpdateConnectionStringsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateDiagnosticLogsConfigOptions contains the optional parameters for the WebAppsClient.UpdateDiagnosticLogsConfig -// method. -type WebAppsClientUpdateDiagnosticLogsConfigOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateDiagnosticLogsConfigSlotOptions contains the optional parameters for the WebAppsClient.UpdateDiagnosticLogsConfigSlot -// method. -type WebAppsClientUpdateDiagnosticLogsConfigSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateDomainOwnershipIdentifierOptions contains the optional parameters for the WebAppsClient.UpdateDomainOwnershipIdentifier -// method. -type WebAppsClientUpdateDomainOwnershipIdentifierOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateDomainOwnershipIdentifierSlotOptions contains the optional parameters for the WebAppsClient.UpdateDomainOwnershipIdentifierSlot -// method. -type WebAppsClientUpdateDomainOwnershipIdentifierSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateFtpAllowedOptions contains the optional parameters for the WebAppsClient.UpdateFtpAllowed method. -type WebAppsClientUpdateFtpAllowedOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateFtpAllowedSlotOptions contains the optional parameters for the WebAppsClient.UpdateFtpAllowedSlot method. -type WebAppsClientUpdateFtpAllowedSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateHybridConnectionOptions contains the optional parameters for the WebAppsClient.UpdateHybridConnection -// method. -type WebAppsClientUpdateHybridConnectionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateHybridConnectionSlotOptions contains the optional parameters for the WebAppsClient.UpdateHybridConnectionSlot -// method. -type WebAppsClientUpdateHybridConnectionSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateMetadataOptions contains the optional parameters for the WebAppsClient.UpdateMetadata method. -type WebAppsClientUpdateMetadataOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateMetadataSlotOptions contains the optional parameters for the WebAppsClient.UpdateMetadataSlot method. -type WebAppsClientUpdateMetadataSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateOptions contains the optional parameters for the WebAppsClient.Update method. -type WebAppsClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdatePremierAddOnOptions contains the optional parameters for the WebAppsClient.UpdatePremierAddOn method. -type WebAppsClientUpdatePremierAddOnOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdatePremierAddOnSlotOptions contains the optional parameters for the WebAppsClient.UpdatePremierAddOnSlot -// method. -type WebAppsClientUpdatePremierAddOnSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateRelayServiceConnectionOptions contains the optional parameters for the WebAppsClient.UpdateRelayServiceConnection -// method. -type WebAppsClientUpdateRelayServiceConnectionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateRelayServiceConnectionSlotOptions contains the optional parameters for the WebAppsClient.UpdateRelayServiceConnectionSlot -// method. -type WebAppsClientUpdateRelayServiceConnectionSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateScmAllowedOptions contains the optional parameters for the WebAppsClient.UpdateScmAllowed method. -type WebAppsClientUpdateScmAllowedOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateScmAllowedSlotOptions contains the optional parameters for the WebAppsClient.UpdateScmAllowedSlot method. -type WebAppsClientUpdateScmAllowedSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateSitePushSettingsOptions contains the optional parameters for the WebAppsClient.UpdateSitePushSettings -// method. -type WebAppsClientUpdateSitePushSettingsOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateSitePushSettingsSlotOptions contains the optional parameters for the WebAppsClient.UpdateSitePushSettingsSlot -// method. -type WebAppsClientUpdateSitePushSettingsSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateSlotConfigurationNamesOptions contains the optional parameters for the WebAppsClient.UpdateSlotConfigurationNames -// method. -type WebAppsClientUpdateSlotConfigurationNamesOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateSlotOptions contains the optional parameters for the WebAppsClient.UpdateSlot method. -type WebAppsClientUpdateSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateSourceControlOptions contains the optional parameters for the WebAppsClient.UpdateSourceControl method. -type WebAppsClientUpdateSourceControlOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateSourceControlSlotOptions contains the optional parameters for the WebAppsClient.UpdateSourceControlSlot -// method. -type WebAppsClientUpdateSourceControlSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckOptions contains the optional parameters for the WebAppsClient.UpdateSwiftVirtualNetworkConnectionWithCheck -// method. -type WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions contains the optional parameters for the WebAppsClient.UpdateSwiftVirtualNetworkConnectionWithCheckSlot -// method. -type WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateVnetConnectionGatewayOptions contains the optional parameters for the WebAppsClient.UpdateVnetConnectionGateway -// method. -type WebAppsClientUpdateVnetConnectionGatewayOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateVnetConnectionGatewaySlotOptions contains the optional parameters for the WebAppsClient.UpdateVnetConnectionGatewaySlot -// method. -type WebAppsClientUpdateVnetConnectionGatewaySlotOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateVnetConnectionOptions contains the optional parameters for the WebAppsClient.UpdateVnetConnection method. -type WebAppsClientUpdateVnetConnectionOptions struct { - // placeholder for future optional parameters -} - -// WebAppsClientUpdateVnetConnectionSlotOptions contains the optional parameters for the WebAppsClient.UpdateVnetConnectionSlot -// method. -type WebAppsClientUpdateVnetConnectionSlotOptions struct { - // placeholder for future optional parameters -} - -// WebJob - Web Job Information. -type WebJob struct { - // Kind of resource. - Kind *string - - // WebJob resource specific properties - Properties *WebJobProperties - - // READ-ONLY; Resource Id. - ID *string - - // READ-ONLY; Resource Name. - Name *string - - // READ-ONLY; Resource type. - Type *string -} - -// WebJobCollection - Collection of Kudu web job information elements. -type WebJobCollection struct { - // REQUIRED; Collection of resources. - Value []*WebJob - - // READ-ONLY; Link to next page of resources. - NextLink *string -} - -// WebJobProperties - WebJob resource specific properties -type WebJobProperties struct { - // Error information. - Error *string - - // Extra Info URL. - ExtraInfoURL *string - - // Run command. - RunCommand *string - - // Job settings. - Settings map[string]any - - // Job URL. - URL *string - - // Using SDK? - UsingSdk *bool - - // Job type. - WebJobType *WebJobType -} - -type WebSiteInstanceStatus struct { - // Kind of resource. - Kind *string - - // WebSiteInstanceStatus resource specific properties - Properties *WebSiteInstanceStatusProperties - - // READ-ONLY; Resource Id. - ID *string - - // READ-ONLY; Resource Name. - Name *string - - // READ-ONLY; Resource type. - Type *string -} - -// WebSiteInstanceStatusProperties - WebSiteInstanceStatus resource specific properties -type WebSiteInstanceStatusProperties struct { - // Link to the console to web app instance - ConsoleURL *string - - // Dictionary of - Containers map[string]*ContainerInfo - - // Link to the Diagnose and Solve Portal - DetectorURL *string - - // Link to the console to web app instance - HealthCheckURL *string - State *SiteRuntimeState - - // Link to the GetStatusApi in Kudu - StatusURL *string -} - -// WebSiteManagementClientCheckNameAvailabilityOptions contains the optional parameters for the WebSiteManagementClient.CheckNameAvailability -// method. -type WebSiteManagementClientCheckNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// WebSiteManagementClientGetPublishingUserOptions contains the optional parameters for the WebSiteManagementClient.GetPublishingUser -// method. -type WebSiteManagementClientGetPublishingUserOptions struct { - // placeholder for future optional parameters -} - -// WebSiteManagementClientGetSourceControlOptions contains the optional parameters for the WebSiteManagementClient.GetSourceControl -// method. -type WebSiteManagementClientGetSourceControlOptions struct { - // placeholder for future optional parameters -} - -// WebSiteManagementClientGetSubscriptionDeploymentLocationsOptions contains the optional parameters for the WebSiteManagementClient.GetSubscriptionDeploymentLocations -// method. -type WebSiteManagementClientGetSubscriptionDeploymentLocationsOptions struct { - // placeholder for future optional parameters -} - -// WebSiteManagementClientListBillingMetersOptions contains the optional parameters for the WebSiteManagementClient.NewListBillingMetersPager -// method. -type WebSiteManagementClientListBillingMetersOptions struct { - // Azure Location of billable resource - BillingLocation *string - // App Service OS type meters used for - OSType *string -} - -// WebSiteManagementClientListCustomHostNameSitesOptions contains the optional parameters for the WebSiteManagementClient.NewListCustomHostNameSitesPager -// method. -type WebSiteManagementClientListCustomHostNameSitesOptions struct { - // Specific hostname - Hostname *string -} - -// WebSiteManagementClientListGeoRegionsOptions contains the optional parameters for the WebSiteManagementClient.NewListGeoRegionsPager -// method. -type WebSiteManagementClientListGeoRegionsOptions struct { - // Specify true if you want to filter to only regions that support Linux Consumption Workers. - LinuxDynamicWorkersEnabled *bool - // Specify true if you want to filter to only regions that support Linux workers. - LinuxWorkersEnabled *bool - // Name of SKU used to filter the regions. - SKU *SKUName - // Specify true if you want to filter to only regions that support Xenon workers. - XenonWorkersEnabled *bool -} - -// WebSiteManagementClientListPremierAddOnOffersOptions contains the optional parameters for the WebSiteManagementClient.NewListPremierAddOnOffersPager -// method. -type WebSiteManagementClientListPremierAddOnOffersOptions struct { - // placeholder for future optional parameters -} - -// WebSiteManagementClientListSKUsOptions contains the optional parameters for the WebSiteManagementClient.ListSKUs method. -type WebSiteManagementClientListSKUsOptions struct { - // placeholder for future optional parameters -} - -// WebSiteManagementClientListSiteIdentifiersAssignedToHostNameOptions contains the optional parameters for the WebSiteManagementClient.NewListSiteIdentifiersAssignedToHostNamePager -// method. -type WebSiteManagementClientListSiteIdentifiersAssignedToHostNameOptions struct { - // placeholder for future optional parameters -} - -// WebSiteManagementClientListSourceControlsOptions contains the optional parameters for the WebSiteManagementClient.NewListSourceControlsPager -// method. -type WebSiteManagementClientListSourceControlsOptions struct { - // placeholder for future optional parameters -} - -// WebSiteManagementClientMoveOptions contains the optional parameters for the WebSiteManagementClient.Move method. -type WebSiteManagementClientMoveOptions struct { - // placeholder for future optional parameters -} - -// WebSiteManagementClientUpdatePublishingUserOptions contains the optional parameters for the WebSiteManagementClient.UpdatePublishingUser -// method. -type WebSiteManagementClientUpdatePublishingUserOptions struct { - // placeholder for future optional parameters -} - -// WebSiteManagementClientUpdateSourceControlOptions contains the optional parameters for the WebSiteManagementClient.UpdateSourceControl -// method. -type WebSiteManagementClientUpdateSourceControlOptions struct { - // placeholder for future optional parameters -} - -// WebSiteManagementClientValidateMoveOptions contains the optional parameters for the WebSiteManagementClient.ValidateMove -// method. -type WebSiteManagementClientValidateMoveOptions struct { - // placeholder for future optional parameters -} - -// WebSiteManagementClientValidateOptions contains the optional parameters for the WebSiteManagementClient.Validate method. -type WebSiteManagementClientValidateOptions struct { - // placeholder for future optional parameters -} - -// WebSiteManagementClientVerifyHostingEnvironmentVnetOptions contains the optional parameters for the WebSiteManagementClient.VerifyHostingEnvironmentVnet -// method. -type WebSiteManagementClientVerifyHostingEnvironmentVnetOptions struct { - // placeholder for future optional parameters -} - -// WindowsJavaContainerSettings - Windows Java Container settings. -type WindowsJavaContainerSettings struct { - // READ-ONLY; End-of-life date for the minor version. - EndOfLifeDate *time.Time - - // READ-ONLY; true if the stack version is auto-updated; otherwise, false. - IsAutoUpdate *bool - - // READ-ONLY; true if the stack is deprecated; otherwise, false. - IsDeprecated *bool - - // READ-ONLY; true if the minor version is early-access; otherwise, false. - IsEarlyAccess *bool - - // READ-ONLY; true if the stack should be hidden; otherwise, false. - IsHidden *bool - - // READ-ONLY; true if the stack is in preview; otherwise, false. - IsPreview *bool + // READ-ONLY; true if the stack is in preview; otherwise, false. + IsPreview *bool // READ-ONLY; Java container (runtime only). JavaContainer *string @@ -14823,67 +10717,6 @@ type WorkflowRunActionRepetitionProperties struct { TrackingID *string } -// WorkflowRunActionRepetitionsClientGetOptions contains the optional parameters for the WorkflowRunActionRepetitionsClient.Get -// method. -type WorkflowRunActionRepetitionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// WorkflowRunActionRepetitionsClientListExpressionTracesOptions contains the optional parameters for the WorkflowRunActionRepetitionsClient.NewListExpressionTracesPager -// method. -type WorkflowRunActionRepetitionsClientListExpressionTracesOptions struct { - // placeholder for future optional parameters -} - -// WorkflowRunActionRepetitionsClientListOptions contains the optional parameters for the WorkflowRunActionRepetitionsClient.NewListPager -// method. -type WorkflowRunActionRepetitionsClientListOptions struct { - // placeholder for future optional parameters -} - -// WorkflowRunActionRepetitionsRequestHistoriesClientGetOptions contains the optional parameters for the WorkflowRunActionRepetitionsRequestHistoriesClient.Get -// method. -type WorkflowRunActionRepetitionsRequestHistoriesClientGetOptions struct { - // placeholder for future optional parameters -} - -// WorkflowRunActionRepetitionsRequestHistoriesClientListOptions contains the optional parameters for the WorkflowRunActionRepetitionsRequestHistoriesClient.NewListPager -// method. -type WorkflowRunActionRepetitionsRequestHistoriesClientListOptions struct { - // placeholder for future optional parameters -} - -// WorkflowRunActionScopeRepetitionsClientGetOptions contains the optional parameters for the WorkflowRunActionScopeRepetitionsClient.Get -// method. -type WorkflowRunActionScopeRepetitionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// WorkflowRunActionScopeRepetitionsClientListOptions contains the optional parameters for the WorkflowRunActionScopeRepetitionsClient.NewListPager -// method. -type WorkflowRunActionScopeRepetitionsClientListOptions struct { - // placeholder for future optional parameters -} - -// WorkflowRunActionsClientGetOptions contains the optional parameters for the WorkflowRunActionsClient.Get method. -type WorkflowRunActionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// WorkflowRunActionsClientListExpressionTracesOptions contains the optional parameters for the WorkflowRunActionsClient.NewListExpressionTracesPager -// method. -type WorkflowRunActionsClientListExpressionTracesOptions struct { - // placeholder for future optional parameters -} - -// WorkflowRunActionsClientListOptions contains the optional parameters for the WorkflowRunActionsClient.NewListPager method. -type WorkflowRunActionsClientListOptions struct { - // The filter to apply on the operation. Options for filters include: Status. - Filter *string - // The number of items to be included in the result. - Top *int32 -} - // WorkflowRunFilter - The workflow run filter. type WorkflowRunFilter struct { // The status of workflow run. @@ -14983,24 +10816,6 @@ type WorkflowRunTrigger struct { TrackingID *string } -// WorkflowRunsClientCancelOptions contains the optional parameters for the WorkflowRunsClient.Cancel method. -type WorkflowRunsClientCancelOptions struct { - // placeholder for future optional parameters -} - -// WorkflowRunsClientGetOptions contains the optional parameters for the WorkflowRunsClient.Get method. -type WorkflowRunsClientGetOptions struct { - // placeholder for future optional parameters -} - -// WorkflowRunsClientListOptions contains the optional parameters for the WorkflowRunsClient.NewListPager method. -type WorkflowRunsClientListOptions struct { - // The filter to apply on the operation. Options for filters include: Status, StartTime, and ClientTrackingId. - Filter *string - // The number of items to be included in the result. - Top *int32 -} - // WorkflowSKU - The sku type. type WorkflowSKU struct { // REQUIRED; The name. @@ -15052,27 +10867,6 @@ type WorkflowTriggerFilter struct { State *WorkflowState } -// WorkflowTriggerHistoriesClientBeginResubmitOptions contains the optional parameters for the WorkflowTriggerHistoriesClient.BeginResubmit -// method. -type WorkflowTriggerHistoriesClientBeginResubmitOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WorkflowTriggerHistoriesClientGetOptions contains the optional parameters for the WorkflowTriggerHistoriesClient.Get method. -type WorkflowTriggerHistoriesClientGetOptions struct { - // placeholder for future optional parameters -} - -// WorkflowTriggerHistoriesClientListOptions contains the optional parameters for the WorkflowTriggerHistoriesClient.NewListPager -// method. -type WorkflowTriggerHistoriesClientListOptions struct { - // The filter to apply on the operation. Options for filters include: Status, StartTime, and ClientTrackingId. - Filter *string - // The number of items to be included in the result. - Top *int32 -} - // WorkflowTriggerHistory - The workflow trigger history. type WorkflowTriggerHistory struct { // Gets the workflow trigger history properties. @@ -15220,37 +11014,6 @@ type WorkflowTriggerRecurrence struct { TimeZone *string } -// WorkflowTriggersClientBeginRunOptions contains the optional parameters for the WorkflowTriggersClient.BeginRun method. -type WorkflowTriggersClientBeginRunOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WorkflowTriggersClientGetOptions contains the optional parameters for the WorkflowTriggersClient.Get method. -type WorkflowTriggersClientGetOptions struct { - // placeholder for future optional parameters -} - -// WorkflowTriggersClientGetSchemaJSONOptions contains the optional parameters for the WorkflowTriggersClient.GetSchemaJSON -// method. -type WorkflowTriggersClientGetSchemaJSONOptions struct { - // placeholder for future optional parameters -} - -// WorkflowTriggersClientListCallbackURLOptions contains the optional parameters for the WorkflowTriggersClient.ListCallbackURL -// method. -type WorkflowTriggersClientListCallbackURLOptions struct { - // placeholder for future optional parameters -} - -// WorkflowTriggersClientListOptions contains the optional parameters for the WorkflowTriggersClient.NewListPager method. -type WorkflowTriggersClientListOptions struct { - // The filter to apply on the operation. - Filter *string - // The number of items to be included in the result. - Top *int32 -} - // WorkflowVersion - The workflow version. type WorkflowVersion struct { // The resource location. @@ -15319,25 +11082,3 @@ type WorkflowVersionProperties struct { // READ-ONLY; Gets the version. Version *string } - -// WorkflowVersionsClientGetOptions contains the optional parameters for the WorkflowVersionsClient.Get method. -type WorkflowVersionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// WorkflowVersionsClientListOptions contains the optional parameters for the WorkflowVersionsClient.NewListPager method. -type WorkflowVersionsClientListOptions struct { - // The number of items to be included in the result. - Top *int32 -} - -// WorkflowsClientRegenerateAccessKeyOptions contains the optional parameters for the WorkflowsClient.RegenerateAccessKey -// method. -type WorkflowsClientRegenerateAccessKeyOptions struct { - // placeholder for future optional parameters -} - -// WorkflowsClientValidateOptions contains the optional parameters for the WorkflowsClient.Validate method. -type WorkflowsClientValidateOptions struct { - // placeholder for future optional parameters -} diff --git a/sdk/resourcemanager/appservice/armappservice/models_serde.go b/sdk/resourcemanager/appservice/armappservice/models_serde.go index daa66371c4b0..2310f3cd385f 100644 --- a/sdk/resourcemanager/appservice/armappservice/models_serde.go +++ b/sdk/resourcemanager/appservice/armappservice/models_serde.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappservice @@ -207,10 +206,10 @@ func (a *APIManagementConfig) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AbnormalTimePeriod. func (a AbnormalTimePeriod) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "endTime", a.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", a.EndTime) populate(objectMap, "events", a.Events) populate(objectMap, "solutions", a.Solutions) - populateTimeRFC3339(objectMap, "startTime", a.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", a.StartTime) return json.Marshal(objectMap) } @@ -224,7 +223,7 @@ func (a *AbnormalTimePeriod) UnmarshalJSON(data []byte) error { var err error switch key { case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &a.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &a.EndTime) delete(rawMsg, key) case "events": err = unpopulate(val, "Events", &a.Events) @@ -233,7 +232,7 @@ func (a *AbnormalTimePeriod) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Solutions", &a.Solutions) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &a.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &a.StartTime) delete(rawMsg, key) } if err != nil { @@ -674,11 +673,11 @@ func (a AppCertificatePatchResourceProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "canonicalName", a.CanonicalName) populateByteArray(objectMap, "cerBlob", a.CerBlob, runtime.Base64StdFormat) populate(objectMap, "domainValidationMethod", a.DomainValidationMethod) - populateTimeRFC3339(objectMap, "expirationDate", a.ExpirationDate) + populateDateTimeRFC3339(objectMap, "expirationDate", a.ExpirationDate) populate(objectMap, "friendlyName", a.FriendlyName) populate(objectMap, "hostNames", a.HostNames) populate(objectMap, "hostingEnvironmentProfile", a.HostingEnvironmentProfile) - populateTimeRFC3339(objectMap, "issueDate", a.IssueDate) + populateDateTimeRFC3339(objectMap, "issueDate", a.IssueDate) populate(objectMap, "issuer", a.Issuer) populate(objectMap, "keyVaultId", a.KeyVaultID) populate(objectMap, "keyVaultSecretName", a.KeyVaultSecretName) @@ -714,7 +713,7 @@ func (a *AppCertificatePatchResourceProperties) UnmarshalJSON(data []byte) error err = unpopulate(val, "DomainValidationMethod", &a.DomainValidationMethod) delete(rawMsg, key) case "expirationDate": - err = unpopulateTimeRFC3339(val, "ExpirationDate", &a.ExpirationDate) + err = unpopulateDateTimeRFC3339(val, "ExpirationDate", &a.ExpirationDate) delete(rawMsg, key) case "friendlyName": err = unpopulate(val, "FriendlyName", &a.FriendlyName) @@ -726,7 +725,7 @@ func (a *AppCertificatePatchResourceProperties) UnmarshalJSON(data []byte) error err = unpopulate(val, "HostingEnvironmentProfile", &a.HostingEnvironmentProfile) delete(rawMsg, key) case "issueDate": - err = unpopulateTimeRFC3339(val, "IssueDate", &a.IssueDate) + err = unpopulateDateTimeRFC3339(val, "IssueDate", &a.IssueDate) delete(rawMsg, key) case "issuer": err = unpopulate(val, "Issuer", &a.Issuer) @@ -781,11 +780,11 @@ func (a AppCertificateProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "canonicalName", a.CanonicalName) populateByteArray(objectMap, "cerBlob", a.CerBlob, runtime.Base64StdFormat) populate(objectMap, "domainValidationMethod", a.DomainValidationMethod) - populateTimeRFC3339(objectMap, "expirationDate", a.ExpirationDate) + populateDateTimeRFC3339(objectMap, "expirationDate", a.ExpirationDate) populate(objectMap, "friendlyName", a.FriendlyName) populate(objectMap, "hostNames", a.HostNames) populate(objectMap, "hostingEnvironmentProfile", a.HostingEnvironmentProfile) - populateTimeRFC3339(objectMap, "issueDate", a.IssueDate) + populateDateTimeRFC3339(objectMap, "issueDate", a.IssueDate) populate(objectMap, "issuer", a.Issuer) populate(objectMap, "keyVaultId", a.KeyVaultID) populate(objectMap, "keyVaultSecretName", a.KeyVaultSecretName) @@ -821,7 +820,7 @@ func (a *AppCertificateProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "DomainValidationMethod", &a.DomainValidationMethod) delete(rawMsg, key) case "expirationDate": - err = unpopulateTimeRFC3339(val, "ExpirationDate", &a.ExpirationDate) + err = unpopulateDateTimeRFC3339(val, "ExpirationDate", &a.ExpirationDate) delete(rawMsg, key) case "friendlyName": err = unpopulate(val, "FriendlyName", &a.FriendlyName) @@ -833,7 +832,7 @@ func (a *AppCertificateProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "HostingEnvironmentProfile", &a.HostingEnvironmentProfile) delete(rawMsg, key) case "issueDate": - err = unpopulateTimeRFC3339(val, "IssueDate", &a.IssueDate) + err = unpopulateDateTimeRFC3339(val, "IssueDate", &a.IssueDate) delete(rawMsg, key) case "issuer": err = unpopulate(val, "Issuer", &a.Issuer) @@ -1318,6 +1317,127 @@ func (a *ArmPlan) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type AseRegion. +func (a AseRegion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", a.ID) + populate(objectMap, "kind", a.Kind) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AseRegion. +func (a *AseRegion) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &a.Kind) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &a.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AseRegionCollection. +func (a AseRegionCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AseRegionCollection. +func (a *AseRegionCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AseRegionProperties. +func (a AseRegionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "availableOS", a.AvailableOS) + populate(objectMap, "availableSku", a.AvailableSKU) + populate(objectMap, "dedicatedHost", a.DedicatedHost) + populate(objectMap, "displayName", a.DisplayName) + populate(objectMap, "standard", a.Standard) + populate(objectMap, "zoneRedundant", a.ZoneRedundant) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AseRegionProperties. +func (a *AseRegionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "availableOS": + err = unpopulate(val, "AvailableOS", &a.AvailableOS) + delete(rawMsg, key) + case "availableSku": + err = unpopulate(val, "AvailableSKU", &a.AvailableSKU) + delete(rawMsg, key) + case "dedicatedHost": + err = unpopulate(val, "DedicatedHost", &a.DedicatedHost) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &a.DisplayName) + delete(rawMsg, key) + case "standard": + err = unpopulate(val, "Standard", &a.Standard) + delete(rawMsg, key) + case "zoneRedundant": + err = unpopulate(val, "ZoneRedundant", &a.ZoneRedundant) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type AseV3NetworkingConfiguration. func (a AseV3NetworkingConfiguration) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2115,10 +2235,10 @@ func (b BackupItemProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "id", b.BackupID) populate(objectMap, "blobName", b.BlobName) populate(objectMap, "correlationId", b.CorrelationID) - populateTimeRFC3339(objectMap, "created", b.Created) + populateDateTimeRFC3339(objectMap, "created", b.Created) populate(objectMap, "databases", b.Databases) - populateTimeRFC3339(objectMap, "finishedTimeStamp", b.FinishedTimeStamp) - populateTimeRFC3339(objectMap, "lastRestoreTimeStamp", b.LastRestoreTimeStamp) + populateDateTimeRFC3339(objectMap, "finishedTimeStamp", b.FinishedTimeStamp) + populateDateTimeRFC3339(objectMap, "lastRestoreTimeStamp", b.LastRestoreTimeStamp) populate(objectMap, "log", b.Log) populate(objectMap, "name", b.Name) populate(objectMap, "scheduled", b.Scheduled) @@ -2148,16 +2268,16 @@ func (b *BackupItemProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "CorrelationID", &b.CorrelationID) delete(rawMsg, key) case "created": - err = unpopulateTimeRFC3339(val, "Created", &b.Created) + err = unpopulateDateTimeRFC3339(val, "Created", &b.Created) delete(rawMsg, key) case "databases": err = unpopulate(val, "Databases", &b.Databases) delete(rawMsg, key) case "finishedTimeStamp": - err = unpopulateTimeRFC3339(val, "FinishedTimeStamp", &b.FinishedTimeStamp) + err = unpopulateDateTimeRFC3339(val, "FinishedTimeStamp", &b.FinishedTimeStamp) delete(rawMsg, key) case "lastRestoreTimeStamp": - err = unpopulateTimeRFC3339(val, "LastRestoreTimeStamp", &b.LastRestoreTimeStamp) + err = unpopulateDateTimeRFC3339(val, "LastRestoreTimeStamp", &b.LastRestoreTimeStamp) delete(rawMsg, key) case "log": err = unpopulate(val, "Log", &b.Log) @@ -2280,9 +2400,9 @@ func (b BackupSchedule) MarshalJSON() ([]byte, error) { populate(objectMap, "frequencyInterval", b.FrequencyInterval) populate(objectMap, "frequencyUnit", b.FrequencyUnit) populate(objectMap, "keepAtLeastOneBackup", b.KeepAtLeastOneBackup) - populateTimeRFC3339(objectMap, "lastExecutionTime", b.LastExecutionTime) + populateDateTimeRFC3339(objectMap, "lastExecutionTime", b.LastExecutionTime) populate(objectMap, "retentionPeriodInDays", b.RetentionPeriodInDays) - populateTimeRFC3339(objectMap, "startTime", b.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", b.StartTime) return json.Marshal(objectMap) } @@ -2305,13 +2425,13 @@ func (b *BackupSchedule) UnmarshalJSON(data []byte) error { err = unpopulate(val, "KeepAtLeastOneBackup", &b.KeepAtLeastOneBackup) delete(rawMsg, key) case "lastExecutionTime": - err = unpopulateTimeRFC3339(val, "LastExecutionTime", &b.LastExecutionTime) + err = unpopulateDateTimeRFC3339(val, "LastExecutionTime", &b.LastExecutionTime) delete(rawMsg, key) case "retentionPeriodInDays": err = unpopulate(val, "RetentionPeriodInDays", &b.RetentionPeriodInDays) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &b.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &b.StartTime) delete(rawMsg, key) } if err != nil { @@ -2578,8 +2698,8 @@ func (c *CertificateCollection) UnmarshalJSON(data []byte) error { func (c CertificateDetails) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "issuer", c.Issuer) - populateTimeRFC3339(objectMap, "notAfter", c.NotAfter) - populateTimeRFC3339(objectMap, "notBefore", c.NotBefore) + populateDateTimeRFC3339(objectMap, "notAfter", c.NotAfter) + populateDateTimeRFC3339(objectMap, "notBefore", c.NotBefore) populate(objectMap, "rawData", c.RawData) populate(objectMap, "serialNumber", c.SerialNumber) populate(objectMap, "signatureAlgorithm", c.SignatureAlgorithm) @@ -2602,10 +2722,10 @@ func (c *CertificateDetails) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Issuer", &c.Issuer) delete(rawMsg, key) case "notAfter": - err = unpopulateTimeRFC3339(val, "NotAfter", &c.NotAfter) + err = unpopulateDateTimeRFC3339(val, "NotAfter", &c.NotAfter) delete(rawMsg, key) case "notBefore": - err = unpopulateTimeRFC3339(val, "NotBefore", &c.NotBefore) + err = unpopulateDateTimeRFC3339(val, "NotBefore", &c.NotBefore) delete(rawMsg, key) case "rawData": err = unpopulate(val, "RawData", &c.RawData) @@ -2637,7 +2757,7 @@ func (c *CertificateDetails) UnmarshalJSON(data []byte) error { func (c CertificateEmail) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "emailId", c.EmailID) - populateTimeRFC3339(objectMap, "timeStamp", c.TimeStamp) + populateDateTimeRFC3339(objectMap, "timeStamp", c.TimeStamp) return json.Marshal(objectMap) } @@ -2654,7 +2774,7 @@ func (c *CertificateEmail) UnmarshalJSON(data []byte) error { err = unpopulate(val, "EmailID", &c.EmailID) delete(rawMsg, key) case "timeStamp": - err = unpopulateTimeRFC3339(val, "TimeStamp", &c.TimeStamp) + err = unpopulateDateTimeRFC3339(val, "TimeStamp", &c.TimeStamp) delete(rawMsg, key) } if err != nil { @@ -2719,7 +2839,7 @@ func (c *CertificateOrder) UnmarshalJSON(data []byte) error { func (c CertificateOrderAction) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "actionType", c.ActionType) - populateTimeRFC3339(objectMap, "createdAt", c.CreatedAt) + populateDateTimeRFC3339(objectMap, "createdAt", c.CreatedAt) return json.Marshal(objectMap) } @@ -2736,7 +2856,7 @@ func (c *CertificateOrderAction) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ActionType", &c.ActionType) delete(rawMsg, key) case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &c.CreatedAt) + err = unpopulateDateTimeRFC3339(val, "CreatedAt", &c.CreatedAt) delete(rawMsg, key) } if err != nil { @@ -2869,12 +2989,12 @@ func (c CertificateOrderPatchResourceProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "csr", c.Csr) populate(objectMap, "distinguishedName", c.DistinguishedName) populate(objectMap, "domainVerificationToken", c.DomainVerificationToken) - populateTimeRFC3339(objectMap, "expirationTime", c.ExpirationTime) + populateDateTimeRFC3339(objectMap, "expirationTime", c.ExpirationTime) populate(objectMap, "intermediate", c.Intermediate) populate(objectMap, "isPrivateKeyExternal", c.IsPrivateKeyExternal) populate(objectMap, "keySize", c.KeySize) - populateTimeRFC3339(objectMap, "lastCertificateIssuanceTime", c.LastCertificateIssuanceTime) - populateTimeRFC3339(objectMap, "nextAutoRenewalTimeStamp", c.NextAutoRenewalTimeStamp) + populateDateTimeRFC3339(objectMap, "lastCertificateIssuanceTime", c.LastCertificateIssuanceTime) + populateDateTimeRFC3339(objectMap, "nextAutoRenewalTimeStamp", c.NextAutoRenewalTimeStamp) populate(objectMap, "productType", c.ProductType) populate(objectMap, "provisioningState", c.ProvisioningState) populate(objectMap, "root", c.Root) @@ -2916,7 +3036,7 @@ func (c *CertificateOrderPatchResourceProperties) UnmarshalJSON(data []byte) err err = unpopulate(val, "DomainVerificationToken", &c.DomainVerificationToken) delete(rawMsg, key) case "expirationTime": - err = unpopulateTimeRFC3339(val, "ExpirationTime", &c.ExpirationTime) + err = unpopulateDateTimeRFC3339(val, "ExpirationTime", &c.ExpirationTime) delete(rawMsg, key) case "intermediate": err = unpopulate(val, "Intermediate", &c.Intermediate) @@ -2928,10 +3048,10 @@ func (c *CertificateOrderPatchResourceProperties) UnmarshalJSON(data []byte) err err = unpopulate(val, "KeySize", &c.KeySize) delete(rawMsg, key) case "lastCertificateIssuanceTime": - err = unpopulateTimeRFC3339(val, "LastCertificateIssuanceTime", &c.LastCertificateIssuanceTime) + err = unpopulateDateTimeRFC3339(val, "LastCertificateIssuanceTime", &c.LastCertificateIssuanceTime) delete(rawMsg, key) case "nextAutoRenewalTimeStamp": - err = unpopulateTimeRFC3339(val, "NextAutoRenewalTimeStamp", &c.NextAutoRenewalTimeStamp) + err = unpopulateDateTimeRFC3339(val, "NextAutoRenewalTimeStamp", &c.NextAutoRenewalTimeStamp) delete(rawMsg, key) case "productType": err = unpopulate(val, "ProductType", &c.ProductType) @@ -2972,12 +3092,12 @@ func (c CertificateOrderProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "csr", c.Csr) populate(objectMap, "distinguishedName", c.DistinguishedName) populate(objectMap, "domainVerificationToken", c.DomainVerificationToken) - populateTimeRFC3339(objectMap, "expirationTime", c.ExpirationTime) + populateDateTimeRFC3339(objectMap, "expirationTime", c.ExpirationTime) populate(objectMap, "intermediate", c.Intermediate) populate(objectMap, "isPrivateKeyExternal", c.IsPrivateKeyExternal) populate(objectMap, "keySize", c.KeySize) - populateTimeRFC3339(objectMap, "lastCertificateIssuanceTime", c.LastCertificateIssuanceTime) - populateTimeRFC3339(objectMap, "nextAutoRenewalTimeStamp", c.NextAutoRenewalTimeStamp) + populateDateTimeRFC3339(objectMap, "lastCertificateIssuanceTime", c.LastCertificateIssuanceTime) + populateDateTimeRFC3339(objectMap, "nextAutoRenewalTimeStamp", c.NextAutoRenewalTimeStamp) populate(objectMap, "productType", c.ProductType) populate(objectMap, "provisioningState", c.ProvisioningState) populate(objectMap, "root", c.Root) @@ -3019,7 +3139,7 @@ func (c *CertificateOrderProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "DomainVerificationToken", &c.DomainVerificationToken) delete(rawMsg, key) case "expirationTime": - err = unpopulateTimeRFC3339(val, "ExpirationTime", &c.ExpirationTime) + err = unpopulateDateTimeRFC3339(val, "ExpirationTime", &c.ExpirationTime) delete(rawMsg, key) case "intermediate": err = unpopulate(val, "Intermediate", &c.Intermediate) @@ -3031,10 +3151,10 @@ func (c *CertificateOrderProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "KeySize", &c.KeySize) delete(rawMsg, key) case "lastCertificateIssuanceTime": - err = unpopulateTimeRFC3339(val, "LastCertificateIssuanceTime", &c.LastCertificateIssuanceTime) + err = unpopulateDateTimeRFC3339(val, "LastCertificateIssuanceTime", &c.LastCertificateIssuanceTime) delete(rawMsg, key) case "nextAutoRenewalTimeStamp": - err = unpopulateTimeRFC3339(val, "NextAutoRenewalTimeStamp", &c.NextAutoRenewalTimeStamp) + err = unpopulateDateTimeRFC3339(val, "NextAutoRenewalTimeStamp", &c.NextAutoRenewalTimeStamp) delete(rawMsg, key) case "productType": err = unpopulate(val, "ProductType", &c.ProductType) @@ -3800,13 +3920,13 @@ func (c *ContainerCPUUsage) UnmarshalJSON(data []byte) error { func (c ContainerInfo) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "currentCpuStats", c.CurrentCPUStats) - populateTimeRFC3339(objectMap, "currentTimeStamp", c.CurrentTimeStamp) + populateDateTimeRFC3339(objectMap, "currentTimeStamp", c.CurrentTimeStamp) populate(objectMap, "eth0", c.Eth0) populate(objectMap, "id", c.ID) populate(objectMap, "memoryStats", c.MemoryStats) populate(objectMap, "name", c.Name) populate(objectMap, "previousCpuStats", c.PreviousCPUStats) - populateTimeRFC3339(objectMap, "previousTimeStamp", c.PreviousTimeStamp) + populateDateTimeRFC3339(objectMap, "previousTimeStamp", c.PreviousTimeStamp) return json.Marshal(objectMap) } @@ -3823,7 +3943,7 @@ func (c *ContainerInfo) UnmarshalJSON(data []byte) error { err = unpopulate(val, "CurrentCPUStats", &c.CurrentCPUStats) delete(rawMsg, key) case "currentTimeStamp": - err = unpopulateTimeRFC3339(val, "CurrentTimeStamp", &c.CurrentTimeStamp) + err = unpopulateDateTimeRFC3339(val, "CurrentTimeStamp", &c.CurrentTimeStamp) delete(rawMsg, key) case "eth0": err = unpopulate(val, "Eth0", &c.Eth0) @@ -3841,7 +3961,7 @@ func (c *ContainerInfo) UnmarshalJSON(data []byte) error { err = unpopulate(val, "PreviousCPUStats", &c.PreviousCPUStats) delete(rawMsg, key) case "previousTimeStamp": - err = unpopulateTimeRFC3339(val, "PreviousTimeStamp", &c.PreviousTimeStamp) + err = unpopulateDateTimeRFC3339(val, "PreviousTimeStamp", &c.PreviousTimeStamp) delete(rawMsg, key) } if err != nil { @@ -4741,7 +4861,7 @@ func (c CsmUsageQuota) MarshalJSON() ([]byte, error) { populate(objectMap, "currentValue", c.CurrentValue) populate(objectMap, "limit", c.Limit) populate(objectMap, "name", c.Name) - populateTimeRFC3339(objectMap, "nextResetTime", c.NextResetTime) + populateDateTimeRFC3339(objectMap, "nextResetTime", c.NextResetTime) populate(objectMap, "unit", c.Unit) return json.Marshal(objectMap) } @@ -4765,7 +4885,7 @@ func (c *CsmUsageQuota) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Name", &c.Name) delete(rawMsg, key) case "nextResetTime": - err = unpopulateTimeRFC3339(val, "NextResetTime", &c.NextResetTime) + err = unpopulateDateTimeRFC3339(val, "NextResetTime", &c.NextResetTime) delete(rawMsg, key) case "unit": err = unpopulate(val, "Unit", &c.Unit) @@ -5262,6 +5382,57 @@ func (d *DaprComponent) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type DaprConfig. +func (d DaprConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appId", d.AppID) + populate(objectMap, "appPort", d.AppPort) + populate(objectMap, "enableApiLogging", d.EnableAPILogging) + populate(objectMap, "enabled", d.Enabled) + populate(objectMap, "httpMaxRequestSize", d.HTTPMaxRequestSize) + populate(objectMap, "httpReadBufferSize", d.HTTPReadBufferSize) + populate(objectMap, "logLevel", d.LogLevel) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DaprConfig. +func (d *DaprConfig) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appId": + err = unpopulate(val, "AppID", &d.AppID) + delete(rawMsg, key) + case "appPort": + err = unpopulate(val, "AppPort", &d.AppPort) + delete(rawMsg, key) + case "enableApiLogging": + err = unpopulate(val, "EnableAPILogging", &d.EnableAPILogging) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &d.Enabled) + delete(rawMsg, key) + case "httpMaxRequestSize": + err = unpopulate(val, "HTTPMaxRequestSize", &d.HTTPMaxRequestSize) + delete(rawMsg, key) + case "httpReadBufferSize": + err = unpopulate(val, "HTTPReadBufferSize", &d.HTTPReadBufferSize) + delete(rawMsg, key) + case "logLevel": + err = unpopulate(val, "LogLevel", &d.LogLevel) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type DaprMetadata. func (d DaprMetadata) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -6158,9 +6329,9 @@ func (d DeploymentProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "author_email", d.AuthorEmail) populate(objectMap, "deployer", d.Deployer) populate(objectMap, "details", d.Details) - populateTimeRFC3339(objectMap, "end_time", d.EndTime) + populateDateTimeRFC3339(objectMap, "end_time", d.EndTime) populate(objectMap, "message", d.Message) - populateTimeRFC3339(objectMap, "start_time", d.StartTime) + populateDateTimeRFC3339(objectMap, "start_time", d.StartTime) populate(objectMap, "status", d.Status) return json.Marshal(objectMap) } @@ -6190,13 +6361,13 @@ func (d *DeploymentProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Details", &d.Details) delete(rawMsg, key) case "end_time": - err = unpopulateTimeRFC3339(val, "EndTime", &d.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &d.EndTime) delete(rawMsg, key) case "message": err = unpopulate(val, "Message", &d.Message) delete(rawMsg, key) case "start_time": - err = unpopulateTimeRFC3339(val, "StartTime", &d.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &d.StartTime) delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &d.Status) @@ -6212,13 +6383,13 @@ func (d *DeploymentProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DetectorAbnormalTimePeriod. func (d DetectorAbnormalTimePeriod) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "endTime", d.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", d.EndTime) populate(objectMap, "message", d.Message) populate(objectMap, "metaData", d.MetaData) populate(objectMap, "priority", d.Priority) populate(objectMap, "solutions", d.Solutions) populate(objectMap, "source", d.Source) - populateTimeRFC3339(objectMap, "startTime", d.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", d.StartTime) populate(objectMap, "type", d.Type) return json.Marshal(objectMap) } @@ -6233,7 +6404,7 @@ func (d *DetectorAbnormalTimePeriod) UnmarshalJSON(data []byte) error { var err error switch key { case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &d.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &d.EndTime) delete(rawMsg, key) case "message": err = unpopulate(val, "Message", &d.Message) @@ -6251,7 +6422,7 @@ func (d *DetectorAbnormalTimePeriod) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Source", &d.Source) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &d.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &d.StartTime) delete(rawMsg, key) case "type": err = unpopulate(val, "Type", &d.Type) @@ -6600,10 +6771,10 @@ func (d *DiagnosticAnalysisCollection) UnmarshalJSON(data []byte) error { func (d DiagnosticAnalysisProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "abnormalTimePeriods", d.AbnormalTimePeriods) - populateTimeRFC3339(objectMap, "endTime", d.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", d.EndTime) populate(objectMap, "nonCorrelatedDetectors", d.NonCorrelatedDetectors) populate(objectMap, "payload", d.Payload) - populateTimeRFC3339(objectMap, "startTime", d.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", d.StartTime) return json.Marshal(objectMap) } @@ -6620,7 +6791,7 @@ func (d *DiagnosticAnalysisProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "AbnormalTimePeriods", &d.AbnormalTimePeriods) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &d.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &d.EndTime) delete(rawMsg, key) case "nonCorrelatedDetectors": err = unpopulate(val, "NonCorrelatedDetectors", &d.NonCorrelatedDetectors) @@ -6629,7 +6800,7 @@ func (d *DiagnosticAnalysisProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Payload", &d.Payload) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &d.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &d.StartTime) delete(rawMsg, key) } if err != nil { @@ -6851,11 +7022,11 @@ func (d DiagnosticDetectorResponseProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "abnormalTimePeriods", d.AbnormalTimePeriods) populate(objectMap, "data", d.Data) populate(objectMap, "detectorDefinition", d.DetectorDefinition) - populateTimeRFC3339(objectMap, "endTime", d.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", d.EndTime) populate(objectMap, "issueDetected", d.IssueDetected) populate(objectMap, "metrics", d.Metrics) populate(objectMap, "responseMetaData", d.ResponseMetaData) - populateTimeRFC3339(objectMap, "startTime", d.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", d.StartTime) return json.Marshal(objectMap) } @@ -6878,7 +7049,7 @@ func (d *DiagnosticDetectorResponseProperties) UnmarshalJSON(data []byte) error err = unpopulate(val, "DetectorDefinition", &d.DetectorDefinition) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &d.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &d.EndTime) delete(rawMsg, key) case "issueDetected": err = unpopulate(val, "IssueDetected", &d.IssueDetected) @@ -6890,7 +7061,7 @@ func (d *DiagnosticDetectorResponseProperties) UnmarshalJSON(data []byte) error err = unpopulate(val, "ResponseMetaData", &d.ResponseMetaData) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &d.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &d.StartTime) delete(rawMsg, key) } if err != nil { @@ -6907,7 +7078,7 @@ func (d DiagnosticMetricSample) MarshalJSON() ([]byte, error) { populate(objectMap, "maximum", d.Maximum) populate(objectMap, "minimum", d.Minimum) populate(objectMap, "roleInstance", d.RoleInstance) - populateTimeRFC3339(objectMap, "timestamp", d.Timestamp) + populateDateTimeRFC3339(objectMap, "timestamp", d.Timestamp) populate(objectMap, "total", d.Total) return json.Marshal(objectMap) } @@ -6934,7 +7105,7 @@ func (d *DiagnosticMetricSample) UnmarshalJSON(data []byte) error { err = unpopulate(val, "RoleInstance", &d.RoleInstance) delete(rawMsg, key) case "timestamp": - err = unpopulateTimeRFC3339(val, "Timestamp", &d.Timestamp) + err = unpopulateDateTimeRFC3339(val, "Timestamp", &d.Timestamp) delete(rawMsg, key) case "total": err = unpopulate(val, "Total", &d.Total) @@ -6950,9 +7121,9 @@ func (d *DiagnosticMetricSample) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DiagnosticMetricSet. func (d DiagnosticMetricSet) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "endTime", d.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", d.EndTime) populate(objectMap, "name", d.Name) - populateTimeRFC3339(objectMap, "startTime", d.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", d.StartTime) populate(objectMap, "timeGrain", d.TimeGrain) populate(objectMap, "unit", d.Unit) populate(objectMap, "values", d.Values) @@ -6969,13 +7140,13 @@ func (d *DiagnosticMetricSet) UnmarshalJSON(data []byte) error { var err error switch key { case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &d.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &d.EndTime) delete(rawMsg, key) case "name": err = unpopulate(val, "Name", &d.Name) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &d.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &d.StartTime) delete(rawMsg, key) case "timeGrain": err = unpopulate(val, "TimeGrain", &d.TimeGrain) @@ -7339,12 +7510,12 @@ func (d DomainPatchResourceProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "contactBilling", d.ContactBilling) populate(objectMap, "contactRegistrant", d.ContactRegistrant) populate(objectMap, "contactTech", d.ContactTech) - populateTimeRFC3339(objectMap, "createdTime", d.CreatedTime) + populateDateTimeRFC3339(objectMap, "createdTime", d.CreatedTime) populate(objectMap, "dnsType", d.DNSType) populate(objectMap, "dnsZoneId", d.DNSZoneID) populate(objectMap, "domainNotRenewableReasons", d.DomainNotRenewableReasons) - populateTimeRFC3339(objectMap, "expirationTime", d.ExpirationTime) - populateTimeRFC3339(objectMap, "lastRenewedTime", d.LastRenewedTime) + populateDateTimeRFC3339(objectMap, "expirationTime", d.ExpirationTime) + populateDateTimeRFC3339(objectMap, "lastRenewedTime", d.LastRenewedTime) populate(objectMap, "managedHostNames", d.ManagedHostNames) populate(objectMap, "nameServers", d.NameServers) populate(objectMap, "privacy", d.Privacy) @@ -7386,7 +7557,7 @@ func (d *DomainPatchResourceProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ContactTech", &d.ContactTech) delete(rawMsg, key) case "createdTime": - err = unpopulateTimeRFC3339(val, "CreatedTime", &d.CreatedTime) + err = unpopulateDateTimeRFC3339(val, "CreatedTime", &d.CreatedTime) delete(rawMsg, key) case "dnsType": err = unpopulate(val, "DNSType", &d.DNSType) @@ -7398,10 +7569,10 @@ func (d *DomainPatchResourceProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "DomainNotRenewableReasons", &d.DomainNotRenewableReasons) delete(rawMsg, key) case "expirationTime": - err = unpopulateTimeRFC3339(val, "ExpirationTime", &d.ExpirationTime) + err = unpopulateDateTimeRFC3339(val, "ExpirationTime", &d.ExpirationTime) delete(rawMsg, key) case "lastRenewedTime": - err = unpopulateTimeRFC3339(val, "LastRenewedTime", &d.LastRenewedTime) + err = unpopulateDateTimeRFC3339(val, "LastRenewedTime", &d.LastRenewedTime) delete(rawMsg, key) case "managedHostNames": err = unpopulate(val, "ManagedHostNames", &d.ManagedHostNames) @@ -7442,12 +7613,12 @@ func (d DomainProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "contactBilling", d.ContactBilling) populate(objectMap, "contactRegistrant", d.ContactRegistrant) populate(objectMap, "contactTech", d.ContactTech) - populateTimeRFC3339(objectMap, "createdTime", d.CreatedTime) + populateDateTimeRFC3339(objectMap, "createdTime", d.CreatedTime) populate(objectMap, "dnsType", d.DNSType) populate(objectMap, "dnsZoneId", d.DNSZoneID) populate(objectMap, "domainNotRenewableReasons", d.DomainNotRenewableReasons) - populateTimeRFC3339(objectMap, "expirationTime", d.ExpirationTime) - populateTimeRFC3339(objectMap, "lastRenewedTime", d.LastRenewedTime) + populateDateTimeRFC3339(objectMap, "expirationTime", d.ExpirationTime) + populateDateTimeRFC3339(objectMap, "lastRenewedTime", d.LastRenewedTime) populate(objectMap, "managedHostNames", d.ManagedHostNames) populate(objectMap, "nameServers", d.NameServers) populate(objectMap, "privacy", d.Privacy) @@ -7489,7 +7660,7 @@ func (d *DomainProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ContactTech", &d.ContactTech) delete(rawMsg, key) case "createdTime": - err = unpopulateTimeRFC3339(val, "CreatedTime", &d.CreatedTime) + err = unpopulateDateTimeRFC3339(val, "CreatedTime", &d.CreatedTime) delete(rawMsg, key) case "dnsType": err = unpopulate(val, "DNSType", &d.DNSType) @@ -7501,10 +7672,10 @@ func (d *DomainProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "DomainNotRenewableReasons", &d.DomainNotRenewableReasons) delete(rawMsg, key) case "expirationTime": - err = unpopulateTimeRFC3339(val, "ExpirationTime", &d.ExpirationTime) + err = unpopulateDateTimeRFC3339(val, "ExpirationTime", &d.ExpirationTime) delete(rawMsg, key) case "lastRenewedTime": - err = unpopulateTimeRFC3339(val, "LastRenewedTime", &d.LastRenewedTime) + err = unpopulateDateTimeRFC3339(val, "LastRenewedTime", &d.LastRenewedTime) delete(rawMsg, key) case "managedHostNames": err = unpopulate(val, "ManagedHostNames", &d.ManagedHostNames) @@ -7538,7 +7709,7 @@ func (d *DomainProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DomainPurchaseConsent. func (d DomainPurchaseConsent) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "agreedAt", d.AgreedAt) + populateDateTimeRFC3339(objectMap, "agreedAt", d.AgreedAt) populate(objectMap, "agreedBy", d.AgreedBy) populate(objectMap, "agreementKeys", d.AgreementKeys) return json.Marshal(objectMap) @@ -7554,7 +7725,7 @@ func (d *DomainPurchaseConsent) UnmarshalJSON(data []byte) error { var err error switch key { case "agreedAt": - err = unpopulateTimeRFC3339(val, "AgreedAt", &d.AgreedAt) + err = unpopulateDateTimeRFC3339(val, "AgreedAt", &d.AgreedAt) delete(rawMsg, key) case "agreedBy": err = unpopulate(val, "AgreedBy", &d.AgreedBy) @@ -8673,7 +8844,7 @@ func (f FunctionAppRuntimeSettings) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "appInsightsSettings", f.AppInsightsSettings) populate(objectMap, "appSettingsDictionary", f.AppSettingsDictionary) - populateTimeRFC3339(objectMap, "endOfLifeDate", f.EndOfLifeDate) + populateDateTimeRFC3339(objectMap, "endOfLifeDate", f.EndOfLifeDate) populate(objectMap, "gitHubActionSettings", f.GitHubActionSettings) populate(objectMap, "isAutoUpdate", f.IsAutoUpdate) populate(objectMap, "isDefault", f.IsDefault) @@ -8704,7 +8875,7 @@ func (f *FunctionAppRuntimeSettings) UnmarshalJSON(data []byte) error { err = unpopulate(val, "AppSettingsDictionary", &f.AppSettingsDictionary) delete(rawMsg, key) case "endOfLifeDate": - err = unpopulateTimeRFC3339(val, "EndOfLifeDate", &f.EndOfLifeDate) + err = unpopulateDateTimeRFC3339(val, "EndOfLifeDate", &f.EndOfLifeDate) delete(rawMsg, key) case "gitHubActionSettings": err = unpopulate(val, "GitHubActionSettings", &f.GitHubActionSettings) @@ -11203,7 +11374,7 @@ func (l *LegacyMicrosoftAccount) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type LinuxJavaContainerSettings. func (l LinuxJavaContainerSettings) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "endOfLifeDate", l.EndOfLifeDate) + populateDateTimeRFC3339(objectMap, "endOfLifeDate", l.EndOfLifeDate) populate(objectMap, "isAutoUpdate", l.IsAutoUpdate) populate(objectMap, "isDeprecated", l.IsDeprecated) populate(objectMap, "isEarlyAccess", l.IsEarlyAccess) @@ -11224,7 +11395,7 @@ func (l *LinuxJavaContainerSettings) UnmarshalJSON(data []byte) error { var err error switch key { case "endOfLifeDate": - err = unpopulateTimeRFC3339(val, "EndOfLifeDate", &l.EndOfLifeDate) + err = unpopulateDateTimeRFC3339(val, "EndOfLifeDate", &l.EndOfLifeDate) delete(rawMsg, key) case "isAutoUpdate": err = unpopulate(val, "IsAutoUpdate", &l.IsAutoUpdate) @@ -11598,7 +11769,7 @@ func (m *MSDeployLog) UnmarshalJSON(data []byte) error { func (m MSDeployLogEntry) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "message", m.Message) - populateTimeRFC3339(objectMap, "time", m.Time) + populateDateTimeRFC3339(objectMap, "time", m.Time) populate(objectMap, "type", m.Type) return json.Marshal(objectMap) } @@ -11616,7 +11787,7 @@ func (m *MSDeployLogEntry) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Message", &m.Message) delete(rawMsg, key) case "time": - err = unpopulateTimeRFC3339(val, "Time", &m.Time) + err = unpopulateDateTimeRFC3339(val, "Time", &m.Time) delete(rawMsg, key) case "type": err = unpopulate(val, "Type", &m.Type) @@ -11704,9 +11875,9 @@ func (m MSDeployStatusProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "complete", m.Complete) populate(objectMap, "deployer", m.Deployer) - populateTimeRFC3339(objectMap, "endTime", m.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", m.EndTime) populate(objectMap, "provisioningState", m.ProvisioningState) - populateTimeRFC3339(objectMap, "startTime", m.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", m.StartTime) return json.Marshal(objectMap) } @@ -11726,13 +11897,13 @@ func (m *MSDeployStatusProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Deployer", &m.Deployer) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &m.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &m.EndTime) delete(rawMsg, key) case "provisioningState": err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &m.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &m.StartTime) delete(rawMsg, key) } if err != nil { @@ -12524,12 +12695,12 @@ func (o *OpenIDConnectRegistration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Operation. func (o Operation) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdTime", o.CreatedTime) + populateDateTimeRFC3339(objectMap, "createdTime", o.CreatedTime) populate(objectMap, "errors", o.Errors) - populateTimeRFC3339(objectMap, "expirationTime", o.ExpirationTime) + populateDateTimeRFC3339(objectMap, "expirationTime", o.ExpirationTime) populate(objectMap, "geoMasterOperationId", o.GeoMasterOperationID) populate(objectMap, "id", o.ID) - populateTimeRFC3339(objectMap, "modifiedTime", o.ModifiedTime) + populateDateTimeRFC3339(objectMap, "modifiedTime", o.ModifiedTime) populate(objectMap, "name", o.Name) populate(objectMap, "status", o.Status) return json.Marshal(objectMap) @@ -12545,13 +12716,13 @@ func (o *Operation) UnmarshalJSON(data []byte) error { var err error switch key { case "createdTime": - err = unpopulateTimeRFC3339(val, "CreatedTime", &o.CreatedTime) + err = unpopulateDateTimeRFC3339(val, "CreatedTime", &o.CreatedTime) delete(rawMsg, key) case "errors": err = unpopulate(val, "Errors", &o.Errors) delete(rawMsg, key) case "expirationTime": - err = unpopulateTimeRFC3339(val, "ExpirationTime", &o.ExpirationTime) + err = unpopulateDateTimeRFC3339(val, "ExpirationTime", &o.ExpirationTime) delete(rawMsg, key) case "geoMasterOperationId": err = unpopulate(val, "GeoMasterOperationID", &o.GeoMasterOperationID) @@ -12560,7 +12731,7 @@ func (o *Operation) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ID", &o.ID) delete(rawMsg, key) case "modifiedTime": - err = unpopulateTimeRFC3339(val, "ModifiedTime", &o.ModifiedTime) + err = unpopulateDateTimeRFC3339(val, "ModifiedTime", &o.ModifiedTime) delete(rawMsg, key) case "name": err = unpopulate(val, "Name", &o.Name) @@ -12581,7 +12752,7 @@ func (o OperationResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "code", o.Code) populate(objectMap, "correlation", o.Correlation) - populateTimeRFC3339(objectMap, "endTime", o.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", o.EndTime) populateAny(objectMap, "error", o.Error) populateAny(objectMap, "inputs", o.Inputs) populate(objectMap, "inputsLink", o.InputsLink) @@ -12589,7 +12760,7 @@ func (o OperationResult) MarshalJSON() ([]byte, error) { populateAny(objectMap, "outputs", o.Outputs) populate(objectMap, "outputsLink", o.OutputsLink) populate(objectMap, "retryHistory", o.RetryHistory) - populateTimeRFC3339(objectMap, "startTime", o.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", o.StartTime) populate(objectMap, "status", o.Status) populateAny(objectMap, "trackedProperties", o.TrackedProperties) populate(objectMap, "trackingId", o.TrackingID) @@ -12612,7 +12783,7 @@ func (o *OperationResult) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Correlation", &o.Correlation) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &o.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &o.EndTime) delete(rawMsg, key) case "error": err = unpopulate(val, "Error", &o.Error) @@ -12636,7 +12807,7 @@ func (o *OperationResult) UnmarshalJSON(data []byte) error { err = unpopulate(val, "RetryHistory", &o.RetryHistory) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &o.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &o.StartTime) delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &o.Status) @@ -12660,9 +12831,9 @@ func (o OperationResultProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "code", o.Code) populate(objectMap, "correlation", o.Correlation) - populateTimeRFC3339(objectMap, "endTime", o.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", o.EndTime) populateAny(objectMap, "error", o.Error) - populateTimeRFC3339(objectMap, "startTime", o.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", o.StartTime) populate(objectMap, "status", o.Status) return json.Marshal(objectMap) } @@ -12683,13 +12854,13 @@ func (o *OperationResultProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Correlation", &o.Correlation) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &o.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &o.EndTime) delete(rawMsg, key) case "error": err = unpopulate(val, "Error", &o.Error) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &o.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &o.StartTime) delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &o.Status) @@ -12834,7 +13005,7 @@ func (p *PerfMonResponse) UnmarshalJSON(data []byte) error { func (p PerfMonSample) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "instanceName", p.InstanceName) - populateTimeRFC3339(objectMap, "time", p.Time) + populateDateTimeRFC3339(objectMap, "time", p.Time) populate(objectMap, "value", p.Value) return json.Marshal(objectMap) } @@ -12852,7 +13023,7 @@ func (p *PerfMonSample) UnmarshalJSON(data []byte) error { err = unpopulate(val, "InstanceName", &p.InstanceName) delete(rawMsg, key) case "time": - err = unpopulateTimeRFC3339(val, "Time", &p.Time) + err = unpopulateDateTimeRFC3339(val, "Time", &p.Time) delete(rawMsg, key) case "value": err = unpopulate(val, "Value", &p.Value) @@ -12868,9 +13039,9 @@ func (p *PerfMonSample) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PerfMonSet. func (p PerfMonSet) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "endTime", p.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", p.EndTime) populate(objectMap, "name", p.Name) - populateTimeRFC3339(objectMap, "startTime", p.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", p.StartTime) populate(objectMap, "timeGrain", p.TimeGrain) populate(objectMap, "values", p.Values) return json.Marshal(objectMap) @@ -12886,13 +13057,13 @@ func (p *PerfMonSet) UnmarshalJSON(data []byte) error { var err error switch key { case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &p.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &p.EndTime) delete(rawMsg, key) case "name": err = unpopulate(val, "Name", &p.Name) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &p.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &p.StartTime) delete(rawMsg, key) case "timeGrain": err = unpopulate(val, "TimeGrain", &p.TimeGrain) @@ -13045,7 +13216,7 @@ func (p *PlanPatchResource) UnmarshalJSON(data []byte) error { func (p PlanPatchResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "elasticScaleEnabled", p.ElasticScaleEnabled) - populateTimeRFC3339(objectMap, "freeOfferExpirationTime", p.FreeOfferExpirationTime) + populateDateTimeRFC3339(objectMap, "freeOfferExpirationTime", p.FreeOfferExpirationTime) populate(objectMap, "geoRegion", p.GeoRegion) populate(objectMap, "hostingEnvironmentProfile", p.HostingEnvironmentProfile) populate(objectMap, "hyperV", p.HyperV) @@ -13060,7 +13231,7 @@ func (p PlanPatchResourceProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "provisioningState", p.ProvisioningState) populate(objectMap, "reserved", p.Reserved) populate(objectMap, "resourceGroup", p.ResourceGroup) - populateTimeRFC3339(objectMap, "spotExpirationTime", p.SpotExpirationTime) + populateDateTimeRFC3339(objectMap, "spotExpirationTime", p.SpotExpirationTime) populate(objectMap, "status", p.Status) populate(objectMap, "subscription", p.Subscription) populate(objectMap, "targetWorkerCount", p.TargetWorkerCount) @@ -13083,7 +13254,7 @@ func (p *PlanPatchResourceProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ElasticScaleEnabled", &p.ElasticScaleEnabled) delete(rawMsg, key) case "freeOfferExpirationTime": - err = unpopulateTimeRFC3339(val, "FreeOfferExpirationTime", &p.FreeOfferExpirationTime) + err = unpopulateDateTimeRFC3339(val, "FreeOfferExpirationTime", &p.FreeOfferExpirationTime) delete(rawMsg, key) case "geoRegion": err = unpopulate(val, "GeoRegion", &p.GeoRegion) @@ -13128,7 +13299,7 @@ func (p *PlanPatchResourceProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ResourceGroup", &p.ResourceGroup) delete(rawMsg, key) case "spotExpirationTime": - err = unpopulateTimeRFC3339(val, "SpotExpirationTime", &p.SpotExpirationTime) + err = unpopulateDateTimeRFC3339(val, "SpotExpirationTime", &p.SpotExpirationTime) delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &p.Status) @@ -13160,7 +13331,7 @@ func (p *PlanPatchResourceProperties) UnmarshalJSON(data []byte) error { func (p PlanProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "elasticScaleEnabled", p.ElasticScaleEnabled) - populateTimeRFC3339(objectMap, "freeOfferExpirationTime", p.FreeOfferExpirationTime) + populateDateTimeRFC3339(objectMap, "freeOfferExpirationTime", p.FreeOfferExpirationTime) populate(objectMap, "geoRegion", p.GeoRegion) populate(objectMap, "hostingEnvironmentProfile", p.HostingEnvironmentProfile) populate(objectMap, "hyperV", p.HyperV) @@ -13175,7 +13346,7 @@ func (p PlanProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "provisioningState", p.ProvisioningState) populate(objectMap, "reserved", p.Reserved) populate(objectMap, "resourceGroup", p.ResourceGroup) - populateTimeRFC3339(objectMap, "spotExpirationTime", p.SpotExpirationTime) + populateDateTimeRFC3339(objectMap, "spotExpirationTime", p.SpotExpirationTime) populate(objectMap, "status", p.Status) populate(objectMap, "subscription", p.Subscription) populate(objectMap, "targetWorkerCount", p.TargetWorkerCount) @@ -13198,7 +13369,7 @@ func (p *PlanProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ElasticScaleEnabled", &p.ElasticScaleEnabled) delete(rawMsg, key) case "freeOfferExpirationTime": - err = unpopulateTimeRFC3339(val, "FreeOfferExpirationTime", &p.FreeOfferExpirationTime) + err = unpopulateDateTimeRFC3339(val, "FreeOfferExpirationTime", &p.FreeOfferExpirationTime) delete(rawMsg, key) case "geoRegion": err = unpopulate(val, "GeoRegion", &p.GeoRegion) @@ -13243,7 +13414,7 @@ func (p *PlanProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ResourceGroup", &p.ResourceGroup) delete(rawMsg, key) case "spotExpirationTime": - err = unpopulateTimeRFC3339(val, "SpotExpirationTime", &p.SpotExpirationTime) + err = unpopulateDateTimeRFC3339(val, "SpotExpirationTime", &p.SpotExpirationTime) delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &p.Status) @@ -14073,10 +14244,10 @@ func (p ProcessInfoProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "peak_working_set", p.PeakWorkingSet) populate(objectMap, "private_memory", p.PrivateMemory) populate(objectMap, "privileged_cpu_time", p.PrivilegedCPUTime) - populateTimeRFC3339(objectMap, "start_time", p.StartTime) + populateDateTimeRFC3339(objectMap, "start_time", p.StartTime) populate(objectMap, "thread_count", p.ThreadCount) populate(objectMap, "threads", p.Threads) - populateTimeRFC3339(objectMap, "time_stamp", p.TimeStamp) + populateDateTimeRFC3339(objectMap, "time_stamp", p.TimeStamp) populate(objectMap, "total_cpu_time", p.TotalCPUTime) populate(objectMap, "user_cpu_time", p.UserCPUTime) populate(objectMap, "user_name", p.UserName) @@ -14176,7 +14347,7 @@ func (p *ProcessInfoProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "PrivilegedCPUTime", &p.PrivilegedCPUTime) delete(rawMsg, key) case "start_time": - err = unpopulateTimeRFC3339(val, "StartTime", &p.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &p.StartTime) delete(rawMsg, key) case "thread_count": err = unpopulate(val, "ThreadCount", &p.ThreadCount) @@ -14185,7 +14356,7 @@ func (p *ProcessInfoProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Threads", &p.Threads) delete(rawMsg, key) case "time_stamp": - err = unpopulateTimeRFC3339(val, "TimeStamp", &p.TimeStamp) + err = unpopulateDateTimeRFC3339(val, "TimeStamp", &p.TimeStamp) delete(rawMsg, key) case "total_cpu_time": err = unpopulate(val, "TotalCPUTime", &p.TotalCPUTime) @@ -14435,7 +14606,7 @@ func (p ProcessThreadInfoProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "priority_level", p.PriorityLevel) populate(objectMap, "process", p.Process) populate(objectMap, "start_address", p.StartAddress) - populateTimeRFC3339(objectMap, "start_time", p.StartTime) + populateDateTimeRFC3339(objectMap, "start_time", p.StartTime) populate(objectMap, "state", p.State) populate(objectMap, "total_processor_time", p.TotalProcessorTime) populate(objectMap, "user_processor_time", p.UserProcessorTime) @@ -14474,7 +14645,7 @@ func (p *ProcessThreadInfoProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "StartAddress", &p.StartAddress) delete(rawMsg, key) case "start_time": - err = unpopulateTimeRFC3339(val, "StartTime", &p.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &p.StartTime) delete(rawMsg, key) case "state": err = unpopulate(val, "State", &p.State) @@ -14990,24 +15161,24 @@ func (r RecommendationProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "bladeName", r.BladeName) populate(objectMap, "categoryTags", r.CategoryTags) populate(objectMap, "channels", r.Channels) - populateTimeRFC3339(objectMap, "creationTime", r.CreationTime) + populateDateTimeRFC3339(objectMap, "creationTime", r.CreationTime) populate(objectMap, "displayName", r.DisplayName) populate(objectMap, "enabled", r.Enabled) - populateTimeRFC3339(objectMap, "endTime", r.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", r.EndTime) populate(objectMap, "extensionName", r.ExtensionName) populate(objectMap, "forwardLink", r.ForwardLink) populate(objectMap, "isDynamic", r.IsDynamic) populate(objectMap, "level", r.Level) populate(objectMap, "message", r.Message) - populateTimeRFC3339(objectMap, "nextNotificationTime", r.NextNotificationTime) - populateTimeRFC3339(objectMap, "notificationExpirationTime", r.NotificationExpirationTime) - populateTimeRFC3339(objectMap, "notifiedTime", r.NotifiedTime) + populateDateTimeRFC3339(objectMap, "nextNotificationTime", r.NextNotificationTime) + populateDateTimeRFC3339(objectMap, "notificationExpirationTime", r.NotificationExpirationTime) + populateDateTimeRFC3339(objectMap, "notifiedTime", r.NotifiedTime) populate(objectMap, "recommendationId", r.RecommendationID) populate(objectMap, "resourceId", r.ResourceID) populate(objectMap, "resourceScope", r.ResourceScope) populate(objectMap, "ruleName", r.RuleName) populate(objectMap, "score", r.Score) - populateTimeRFC3339(objectMap, "startTime", r.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", r.StartTime) populate(objectMap, "states", r.States) return json.Marshal(objectMap) } @@ -15034,7 +15205,7 @@ func (r *RecommendationProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Channels", &r.Channels) delete(rawMsg, key) case "creationTime": - err = unpopulateTimeRFC3339(val, "CreationTime", &r.CreationTime) + err = unpopulateDateTimeRFC3339(val, "CreationTime", &r.CreationTime) delete(rawMsg, key) case "displayName": err = unpopulate(val, "DisplayName", &r.DisplayName) @@ -15043,7 +15214,7 @@ func (r *RecommendationProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Enabled", &r.Enabled) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &r.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &r.EndTime) delete(rawMsg, key) case "extensionName": err = unpopulate(val, "ExtensionName", &r.ExtensionName) @@ -15061,13 +15232,13 @@ func (r *RecommendationProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Message", &r.Message) delete(rawMsg, key) case "nextNotificationTime": - err = unpopulateTimeRFC3339(val, "NextNotificationTime", &r.NextNotificationTime) + err = unpopulateDateTimeRFC3339(val, "NextNotificationTime", &r.NextNotificationTime) delete(rawMsg, key) case "notificationExpirationTime": - err = unpopulateTimeRFC3339(val, "NotificationExpirationTime", &r.NotificationExpirationTime) + err = unpopulateDateTimeRFC3339(val, "NotificationExpirationTime", &r.NotificationExpirationTime) delete(rawMsg, key) case "notifiedTime": - err = unpopulateTimeRFC3339(val, "NotifiedTime", &r.NotifiedTime) + err = unpopulateDateTimeRFC3339(val, "NotifiedTime", &r.NotifiedTime) delete(rawMsg, key) case "recommendationId": err = unpopulate(val, "RecommendationID", &r.RecommendationID) @@ -15085,7 +15256,7 @@ func (r *RecommendationProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Score", &r.Score) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &r.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &r.StartTime) delete(rawMsg, key) case "states": err = unpopulate(val, "States", &r.States) @@ -15952,10 +16123,10 @@ func (r *RequestHistoryListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RequestHistoryProperties. func (r RequestHistoryProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "endTime", r.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", r.EndTime) populate(objectMap, "request", r.Request) populate(objectMap, "response", r.Response) - populateTimeRFC3339(objectMap, "startTime", r.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", r.StartTime) return json.Marshal(objectMap) } @@ -15969,7 +16140,7 @@ func (r *RequestHistoryProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &r.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &r.EndTime) delete(rawMsg, key) case "request": err = unpopulate(val, "Request", &r.Request) @@ -15978,7 +16149,7 @@ func (r *RequestHistoryProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Response", &r.Response) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &r.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &r.StartTime) delete(rawMsg, key) } if err != nil { @@ -16097,6 +16268,37 @@ func (r *ResourceCollection) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ResourceConfig. +func (r ResourceConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cpu", r.CPU) + populate(objectMap, "memory", r.Memory) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceConfig. +func (r *ResourceConfig) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cpu": + err = unpopulate(val, "CPU", &r.CPU) + delete(rawMsg, key) + case "memory": + err = unpopulate(val, "Memory", &r.Memory) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type ResourceHealthMetadata. func (r ResourceHealthMetadata) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -16388,6 +16590,7 @@ func (r *ResourceNameAvailability) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ResourceNameAvailabilityRequest. func (r ResourceNameAvailabilityRequest) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "environmentId", r.EnvironmentID) populate(objectMap, "isFqdn", r.IsFqdn) populate(objectMap, "name", r.Name) populate(objectMap, "type", r.Type) @@ -16403,6 +16606,9 @@ func (r *ResourceNameAvailabilityRequest) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "environmentId": + err = unpopulate(val, "EnvironmentID", &r.EnvironmentID) + delete(rawMsg, key) case "isFqdn": err = unpopulate(val, "IsFqdn", &r.IsFqdn) delete(rawMsg, key) @@ -16703,10 +16909,10 @@ func (r RetryHistory) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "clientRequestId", r.ClientRequestID) populate(objectMap, "code", r.Code) - populateTimeRFC3339(objectMap, "endTime", r.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", r.EndTime) populate(objectMap, "error", r.Error) populate(objectMap, "serviceRequestId", r.ServiceRequestID) - populateTimeRFC3339(objectMap, "startTime", r.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", r.StartTime) return json.Marshal(objectMap) } @@ -16726,7 +16932,7 @@ func (r *RetryHistory) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Code", &r.Code) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &r.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &r.EndTime) delete(rawMsg, key) case "error": err = unpopulate(val, "Error", &r.Error) @@ -16735,7 +16941,7 @@ func (r *RetryHistory) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ServiceRequestID", &r.ServiceRequestID) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &r.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &r.StartTime) delete(rawMsg, key) } if err != nil { @@ -16831,7 +17037,7 @@ func (r *RevisionCollection) UnmarshalJSON(data []byte) error { func (r RevisionProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "active", r.Active) - populateTimeRFC3339(objectMap, "createdTime", r.CreatedTime) + populateDateTimeRFC3339(objectMap, "createdTime", r.CreatedTime) populate(objectMap, "fqdn", r.Fqdn) populate(objectMap, "healthState", r.HealthState) populate(objectMap, "provisioningError", r.ProvisioningError) @@ -16855,7 +17061,7 @@ func (r *RevisionProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Active", &r.Active) delete(rawMsg, key) case "createdTime": - err = unpopulateTimeRFC3339(val, "CreatedTime", &r.CreatedTime) + err = unpopulateDateTimeRFC3339(val, "CreatedTime", &r.CreatedTime) delete(rawMsg, key) case "fqdn": err = unpopulate(val, "Fqdn", &r.Fqdn) @@ -17852,6 +18058,7 @@ func (s SiteConfig) MarshalJSON() ([]byte, error) { populate(objectMap, "managedPipelineMode", s.ManagedPipelineMode) populate(objectMap, "managedServiceIdentityId", s.ManagedServiceIdentityID) populate(objectMap, "metadata", s.Metadata) + populate(objectMap, "minTlsCipherSuite", s.MinTLSCipherSuite) populate(objectMap, "minTlsVersion", s.MinTLSVersion) populate(objectMap, "minimumElasticInstanceCount", s.MinimumElasticInstanceCount) populate(objectMap, "netFrameworkVersion", s.NetFrameworkVersion) @@ -17867,7 +18074,7 @@ func (s SiteConfig) MarshalJSON() ([]byte, error) { populate(objectMap, "remoteDebuggingEnabled", s.RemoteDebuggingEnabled) populate(objectMap, "remoteDebuggingVersion", s.RemoteDebuggingVersion) populate(objectMap, "requestTracingEnabled", s.RequestTracingEnabled) - populateTimeRFC3339(objectMap, "requestTracingExpirationTime", s.RequestTracingExpirationTime) + populateDateTimeRFC3339(objectMap, "requestTracingExpirationTime", s.RequestTracingExpirationTime) populate(objectMap, "scmIpSecurityRestrictions", s.ScmIPSecurityRestrictions) populate(objectMap, "scmIpSecurityRestrictionsDefaultAction", s.ScmIPSecurityRestrictionsDefaultAction) populate(objectMap, "scmIpSecurityRestrictionsUseMain", s.ScmIPSecurityRestrictionsUseMain) @@ -18015,6 +18222,9 @@ func (s *SiteConfig) UnmarshalJSON(data []byte) error { case "metadata": err = unpopulate(val, "Metadata", &s.Metadata) delete(rawMsg, key) + case "minTlsCipherSuite": + err = unpopulate(val, "MinTLSCipherSuite", &s.MinTLSCipherSuite) + delete(rawMsg, key) case "minTlsVersion": err = unpopulate(val, "MinTLSVersion", &s.MinTLSVersion) delete(rawMsg, key) @@ -18061,7 +18271,7 @@ func (s *SiteConfig) UnmarshalJSON(data []byte) error { err = unpopulate(val, "RequestTracingEnabled", &s.RequestTracingEnabled) delete(rawMsg, key) case "requestTracingExpirationTime": - err = unpopulateTimeRFC3339(val, "RequestTracingExpirationTime", &s.RequestTracingExpirationTime) + err = unpopulateDateTimeRFC3339(val, "RequestTracingExpirationTime", &s.RequestTracingExpirationTime) delete(rawMsg, key) case "scmIpSecurityRestrictions": err = unpopulate(val, "ScmIPSecurityRestrictions", &s.ScmIPSecurityRestrictions) @@ -18307,7 +18517,7 @@ func (s *SiteConfigurationSnapshotInfoCollection) UnmarshalJSON(data []byte) err func (s SiteConfigurationSnapshotInfoProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "snapshotId", s.SnapshotID) - populateTimeRFC3339(objectMap, "time", s.Time) + populateDateTimeRFC3339(objectMap, "time", s.Time) return json.Marshal(objectMap) } @@ -18324,7 +18534,7 @@ func (s *SiteConfigurationSnapshotInfoProperties) UnmarshalJSON(data []byte) err err = unpopulate(val, "SnapshotID", &s.SnapshotID) delete(rawMsg, key) case "time": - err = unpopulateTimeRFC3339(val, "Time", &s.Time) + err = unpopulateDateTimeRFC3339(val, "Time", &s.Time) delete(rawMsg, key) } if err != nil { @@ -18420,14 +18630,14 @@ func (s SiteExtensionInfoProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "extension_url", s.ExtensionURL) populate(objectMap, "feed_url", s.FeedURL) populate(objectMap, "icon_url", s.IconURL) - populateTimeRFC3339(objectMap, "installed_date_time", s.InstalledDateTime) + populateDateTimeRFC3339(objectMap, "installed_date_time", s.InstalledDateTime) populate(objectMap, "installer_command_line_params", s.InstallerCommandLineParams) populate(objectMap, "license_url", s.LicenseURL) populate(objectMap, "local_is_latest_version", s.LocalIsLatestVersion) populate(objectMap, "local_path", s.LocalPath) populate(objectMap, "project_url", s.ProjectURL) populate(objectMap, "provisioningState", s.ProvisioningState) - populateTimeRFC3339(objectMap, "published_date_time", s.PublishedDateTime) + populateDateTimeRFC3339(objectMap, "published_date_time", s.PublishedDateTime) populate(objectMap, "summary", s.Summary) populate(objectMap, "title", s.Title) populate(objectMap, "version", s.Version) @@ -18471,7 +18681,7 @@ func (s *SiteExtensionInfoProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "IconURL", &s.IconURL) delete(rawMsg, key) case "installed_date_time": - err = unpopulateTimeRFC3339(val, "InstalledDateTime", &s.InstalledDateTime) + err = unpopulateDateTimeRFC3339(val, "InstalledDateTime", &s.InstalledDateTime) delete(rawMsg, key) case "installer_command_line_params": err = unpopulate(val, "InstallerCommandLineParams", &s.InstallerCommandLineParams) @@ -18492,7 +18702,7 @@ func (s *SiteExtensionInfoProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) delete(rawMsg, key) case "published_date_time": - err = unpopulateTimeRFC3339(val, "PublishedDateTime", &s.PublishedDateTime) + err = unpopulateDateTimeRFC3339(val, "PublishedDateTime", &s.PublishedDateTime) delete(rawMsg, key) case "summary": err = unpopulate(val, "Summary", &s.Summary) @@ -18739,7 +18949,7 @@ func (s SitePatchResourceProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "isDefaultContainer", s.IsDefaultContainer) populate(objectMap, "isXenon", s.IsXenon) populate(objectMap, "keyVaultReferenceIdentity", s.KeyVaultReferenceIdentity) - populateTimeRFC3339(objectMap, "lastModifiedTimeUtc", s.LastModifiedTimeUTC) + populateDateTimeRFC3339(objectMap, "lastModifiedTimeUtc", s.LastModifiedTimeUTC) populate(objectMap, "maxNumberOfWorkers", s.MaxNumberOfWorkers) populate(objectMap, "outboundIpAddresses", s.OutboundIPAddresses) populate(objectMap, "possibleOutboundIpAddresses", s.PossibleOutboundIPAddresses) @@ -18753,7 +18963,7 @@ func (s SitePatchResourceProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "slotSwapStatus", s.SlotSwapStatus) populate(objectMap, "state", s.State) populate(objectMap, "storageAccountRequired", s.StorageAccountRequired) - populateTimeRFC3339(objectMap, "suspendedTill", s.SuspendedTill) + populateDateTimeRFC3339(objectMap, "suspendedTill", s.SuspendedTill) populate(objectMap, "targetSwapSlot", s.TargetSwapSlot) populate(objectMap, "trafficManagerHostNames", s.TrafficManagerHostNames) populate(objectMap, "usageState", s.UsageState) @@ -18837,7 +19047,7 @@ func (s *SitePatchResourceProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "KeyVaultReferenceIdentity", &s.KeyVaultReferenceIdentity) delete(rawMsg, key) case "lastModifiedTimeUtc": - err = unpopulateTimeRFC3339(val, "LastModifiedTimeUTC", &s.LastModifiedTimeUTC) + err = unpopulateDateTimeRFC3339(val, "LastModifiedTimeUTC", &s.LastModifiedTimeUTC) delete(rawMsg, key) case "maxNumberOfWorkers": err = unpopulate(val, "MaxNumberOfWorkers", &s.MaxNumberOfWorkers) @@ -18879,7 +19089,7 @@ func (s *SitePatchResourceProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "StorageAccountRequired", &s.StorageAccountRequired) delete(rawMsg, key) case "suspendedTill": - err = unpopulateTimeRFC3339(val, "SuspendedTill", &s.SuspendedTill) + err = unpopulateDateTimeRFC3339(val, "SuspendedTill", &s.SuspendedTill) delete(rawMsg, key) case "targetSwapSlot": err = unpopulate(val, "TargetSwapSlot", &s.TargetSwapSlot) @@ -18995,6 +19205,7 @@ func (s SiteProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "containerSize", s.ContainerSize) populate(objectMap, "customDomainVerificationId", s.CustomDomainVerificationID) populate(objectMap, "dailyMemoryTimeQuota", s.DailyMemoryTimeQuota) + populate(objectMap, "daprConfig", s.DaprConfig) populate(objectMap, "defaultHostName", s.DefaultHostName) populate(objectMap, "enabled", s.Enabled) populate(objectMap, "enabledHostNames", s.EnabledHostNames) @@ -19008,7 +19219,7 @@ func (s SiteProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "isDefaultContainer", s.IsDefaultContainer) populate(objectMap, "isXenon", s.IsXenon) populate(objectMap, "keyVaultReferenceIdentity", s.KeyVaultReferenceIdentity) - populateTimeRFC3339(objectMap, "lastModifiedTimeUtc", s.LastModifiedTimeUTC) + populateDateTimeRFC3339(objectMap, "lastModifiedTimeUtc", s.LastModifiedTimeUTC) populate(objectMap, "managedEnvironmentId", s.ManagedEnvironmentID) populate(objectMap, "maxNumberOfWorkers", s.MaxNumberOfWorkers) populate(objectMap, "outboundIpAddresses", s.OutboundIPAddresses) @@ -19017,6 +19228,7 @@ func (s SiteProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "redundancyMode", s.RedundancyMode) populate(objectMap, "repositorySiteName", s.RepositorySiteName) populate(objectMap, "reserved", s.Reserved) + populate(objectMap, "resourceConfig", s.ResourceConfig) populate(objectMap, "resourceGroup", s.ResourceGroup) populate(objectMap, "scmSiteAlsoStopped", s.ScmSiteAlsoStopped) populate(objectMap, "serverFarmId", s.ServerFarmID) @@ -19024,7 +19236,7 @@ func (s SiteProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "slotSwapStatus", s.SlotSwapStatus) populate(objectMap, "state", s.State) populate(objectMap, "storageAccountRequired", s.StorageAccountRequired) - populateTimeRFC3339(objectMap, "suspendedTill", s.SuspendedTill) + populateDateTimeRFC3339(objectMap, "suspendedTill", s.SuspendedTill) populate(objectMap, "targetSwapSlot", s.TargetSwapSlot) populate(objectMap, "trafficManagerHostNames", s.TrafficManagerHostNames) populate(objectMap, "usageState", s.UsageState) @@ -19032,6 +19244,7 @@ func (s SiteProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "vnetContentShareEnabled", s.VnetContentShareEnabled) populate(objectMap, "vnetImagePullEnabled", s.VnetImagePullEnabled) populate(objectMap, "vnetRouteAllEnabled", s.VnetRouteAllEnabled) + populate(objectMap, "workloadProfileName", s.WorkloadProfileName) return json.Marshal(objectMap) } @@ -19071,6 +19284,9 @@ func (s *SiteProperties) UnmarshalJSON(data []byte) error { case "dailyMemoryTimeQuota": err = unpopulate(val, "DailyMemoryTimeQuota", &s.DailyMemoryTimeQuota) delete(rawMsg, key) + case "daprConfig": + err = unpopulate(val, "DaprConfig", &s.DaprConfig) + delete(rawMsg, key) case "defaultHostName": err = unpopulate(val, "DefaultHostName", &s.DefaultHostName) delete(rawMsg, key) @@ -19111,7 +19327,7 @@ func (s *SiteProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "KeyVaultReferenceIdentity", &s.KeyVaultReferenceIdentity) delete(rawMsg, key) case "lastModifiedTimeUtc": - err = unpopulateTimeRFC3339(val, "LastModifiedTimeUTC", &s.LastModifiedTimeUTC) + err = unpopulateDateTimeRFC3339(val, "LastModifiedTimeUTC", &s.LastModifiedTimeUTC) delete(rawMsg, key) case "managedEnvironmentId": err = unpopulate(val, "ManagedEnvironmentID", &s.ManagedEnvironmentID) @@ -19137,6 +19353,9 @@ func (s *SiteProperties) UnmarshalJSON(data []byte) error { case "reserved": err = unpopulate(val, "Reserved", &s.Reserved) delete(rawMsg, key) + case "resourceConfig": + err = unpopulate(val, "ResourceConfig", &s.ResourceConfig) + delete(rawMsg, key) case "resourceGroup": err = unpopulate(val, "ResourceGroup", &s.ResourceGroup) delete(rawMsg, key) @@ -19159,7 +19378,7 @@ func (s *SiteProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "StorageAccountRequired", &s.StorageAccountRequired) delete(rawMsg, key) case "suspendedTill": - err = unpopulateTimeRFC3339(val, "SuspendedTill", &s.SuspendedTill) + err = unpopulateDateTimeRFC3339(val, "SuspendedTill", &s.SuspendedTill) delete(rawMsg, key) case "targetSwapSlot": err = unpopulate(val, "TargetSwapSlot", &s.TargetSwapSlot) @@ -19182,6 +19401,9 @@ func (s *SiteProperties) UnmarshalJSON(data []byte) error { case "vnetRouteAllEnabled": err = unpopulate(val, "VnetRouteAllEnabled", &s.VnetRouteAllEnabled) delete(rawMsg, key) + case "workloadProfileName": + err = unpopulate(val, "WorkloadProfileName", &s.WorkloadProfileName) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -19550,7 +19772,7 @@ func (s SlotSwapStatus) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "destinationSlotName", s.DestinationSlotName) populate(objectMap, "sourceSlotName", s.SourceSlotName) - populateTimeRFC3339(objectMap, "timestampUtc", s.TimestampUTC) + populateDateTimeRFC3339(objectMap, "timestampUtc", s.TimestampUTC) return json.Marshal(objectMap) } @@ -19570,7 +19792,7 @@ func (s *SlotSwapStatus) UnmarshalJSON(data []byte) error { err = unpopulate(val, "SourceSlotName", &s.SourceSlotName) delete(rawMsg, key) case "timestampUtc": - err = unpopulateTimeRFC3339(val, "TimestampUTC", &s.TimestampUTC) + err = unpopulateDateTimeRFC3339(val, "TimestampUTC", &s.TimestampUTC) delete(rawMsg, key) } if err != nil { @@ -19969,7 +20191,7 @@ func (s *SourceControlCollection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SourceControlProperties. func (s SourceControlProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "expirationTime", s.ExpirationTime) + populateDateTimeRFC3339(objectMap, "expirationTime", s.ExpirationTime) populate(objectMap, "refreshToken", s.RefreshToken) populate(objectMap, "token", s.Token) populate(objectMap, "tokenSecret", s.TokenSecret) @@ -19986,7 +20208,7 @@ func (s *SourceControlProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "expirationTime": - err = unpopulateTimeRFC3339(val, "ExpirationTime", &s.ExpirationTime) + err = unpopulateDateTimeRFC3339(val, "ExpirationTime", &s.ExpirationTime) delete(rawMsg, key) case "refreshToken": err = unpopulate(val, "RefreshToken", &s.RefreshToken) @@ -20523,10 +20745,10 @@ func (s *StaticSiteBuildARMResource) UnmarshalJSON(data []byte) error { func (s StaticSiteBuildARMResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "buildId", s.BuildID) - populateTimeRFC3339(objectMap, "createdTimeUtc", s.CreatedTimeUTC) + populateDateTimeRFC3339(objectMap, "createdTimeUtc", s.CreatedTimeUTC) populate(objectMap, "databaseConnections", s.DatabaseConnections) populate(objectMap, "hostname", s.Hostname) - populateTimeRFC3339(objectMap, "lastUpdatedOn", s.LastUpdatedOn) + populateDateTimeRFC3339(objectMap, "lastUpdatedOn", s.LastUpdatedOn) populate(objectMap, "linkedBackends", s.LinkedBackends) populate(objectMap, "pullRequestTitle", s.PullRequestTitle) populate(objectMap, "sourceBranch", s.SourceBranch) @@ -20548,7 +20770,7 @@ func (s *StaticSiteBuildARMResourceProperties) UnmarshalJSON(data []byte) error err = unpopulate(val, "BuildID", &s.BuildID) delete(rawMsg, key) case "createdTimeUtc": - err = unpopulateTimeRFC3339(val, "CreatedTimeUTC", &s.CreatedTimeUTC) + err = unpopulateDateTimeRFC3339(val, "CreatedTimeUTC", &s.CreatedTimeUTC) delete(rawMsg, key) case "databaseConnections": err = unpopulate(val, "DatabaseConnections", &s.DatabaseConnections) @@ -20557,7 +20779,7 @@ func (s *StaticSiteBuildARMResourceProperties) UnmarshalJSON(data []byte) error err = unpopulate(val, "Hostname", &s.Hostname) delete(rawMsg, key) case "lastUpdatedOn": - err = unpopulateTimeRFC3339(val, "LastUpdatedOn", &s.LastUpdatedOn) + err = unpopulateDateTimeRFC3339(val, "LastUpdatedOn", &s.LastUpdatedOn) delete(rawMsg, key) case "linkedBackends": err = unpopulate(val, "LinkedBackends", &s.LinkedBackends) @@ -20745,7 +20967,7 @@ func (s *StaticSiteCustomDomainOverviewARMResource) UnmarshalJSON(data []byte) e // MarshalJSON implements the json.Marshaller interface for type StaticSiteCustomDomainOverviewARMResourceProperties. func (s StaticSiteCustomDomainOverviewARMResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdOn", s.CreatedOn) + populateDateTimeRFC3339(objectMap, "createdOn", s.CreatedOn) populate(objectMap, "domainName", s.DomainName) populate(objectMap, "errorMessage", s.ErrorMessage) populate(objectMap, "status", s.Status) @@ -20763,7 +20985,7 @@ func (s *StaticSiteCustomDomainOverviewARMResourceProperties) UnmarshalJSON(data var err error switch key { case "createdOn": - err = unpopulateTimeRFC3339(val, "CreatedOn", &s.CreatedOn) + err = unpopulateDateTimeRFC3339(val, "CreatedOn", &s.CreatedOn) delete(rawMsg, key) case "domainName": err = unpopulate(val, "DomainName", &s.DomainName) @@ -21030,7 +21252,7 @@ func (s *StaticSiteFunctionOverviewCollection) UnmarshalJSON(data []byte) error func (s StaticSiteLinkedBackend) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "backendResourceId", s.BackendResourceID) - populateTimeRFC3339(objectMap, "createdOn", s.CreatedOn) + populateDateTimeRFC3339(objectMap, "createdOn", s.CreatedOn) populate(objectMap, "provisioningState", s.ProvisioningState) populate(objectMap, "region", s.Region) return json.Marshal(objectMap) @@ -21049,7 +21271,7 @@ func (s *StaticSiteLinkedBackend) UnmarshalJSON(data []byte) error { err = unpopulate(val, "BackendResourceID", &s.BackendResourceID) delete(rawMsg, key) case "createdOn": - err = unpopulateTimeRFC3339(val, "CreatedOn", &s.CreatedOn) + err = unpopulateDateTimeRFC3339(val, "CreatedOn", &s.CreatedOn) delete(rawMsg, key) case "provisioningState": err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) @@ -21112,7 +21334,7 @@ func (s *StaticSiteLinkedBackendARMResource) UnmarshalJSON(data []byte) error { func (s StaticSiteLinkedBackendARMResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "backendResourceId", s.BackendResourceID) - populateTimeRFC3339(objectMap, "createdOn", s.CreatedOn) + populateDateTimeRFC3339(objectMap, "createdOn", s.CreatedOn) populate(objectMap, "provisioningState", s.ProvisioningState) populate(objectMap, "region", s.Region) return json.Marshal(objectMap) @@ -21131,7 +21353,7 @@ func (s *StaticSiteLinkedBackendARMResourceProperties) UnmarshalJSON(data []byte err = unpopulate(val, "BackendResourceID", &s.BackendResourceID) delete(rawMsg, key) case "createdOn": - err = unpopulateTimeRFC3339(val, "CreatedOn", &s.CreatedOn) + err = unpopulateDateTimeRFC3339(val, "CreatedOn", &s.CreatedOn) delete(rawMsg, key) case "provisioningState": err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) @@ -21583,7 +21805,7 @@ func (s *StaticSiteUserInvitationResponseResource) UnmarshalJSON(data []byte) er // MarshalJSON implements the json.Marshaller interface for type StaticSiteUserInvitationResponseResourceProperties. func (s StaticSiteUserInvitationResponseResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "expiresOn", s.ExpiresOn) + populateDateTimeRFC3339(objectMap, "expiresOn", s.ExpiresOn) populate(objectMap, "invitationUrl", s.InvitationURL) return json.Marshal(objectMap) } @@ -21598,7 +21820,7 @@ func (s *StaticSiteUserInvitationResponseResourceProperties) UnmarshalJSON(data var err error switch key { case "expiresOn": - err = unpopulateTimeRFC3339(val, "ExpiresOn", &s.ExpiresOn) + err = unpopulateDateTimeRFC3339(val, "ExpiresOn", &s.ExpiresOn) delete(rawMsg, key) case "invitationUrl": err = unpopulate(val, "InvitationURL", &s.InvitationURL) @@ -21700,7 +21922,7 @@ func (s *StaticSiteUserProvidedFunctionAppARMResource) UnmarshalJSON(data []byte // MarshalJSON implements the json.Marshaller interface for type StaticSiteUserProvidedFunctionAppARMResourceProperties. func (s StaticSiteUserProvidedFunctionAppARMResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdOn", s.CreatedOn) + populateDateTimeRFC3339(objectMap, "createdOn", s.CreatedOn) populate(objectMap, "functionAppRegion", s.FunctionAppRegion) populate(objectMap, "functionAppResourceId", s.FunctionAppResourceID) return json.Marshal(objectMap) @@ -21716,7 +21938,7 @@ func (s *StaticSiteUserProvidedFunctionAppARMResourceProperties) UnmarshalJSON(d var err error switch key { case "createdOn": - err = unpopulateTimeRFC3339(val, "CreatedOn", &s.CreatedOn) + err = unpopulateDateTimeRFC3339(val, "CreatedOn", &s.CreatedOn) delete(rawMsg, key) case "functionAppRegion": err = unpopulate(val, "FunctionAppRegion", &s.FunctionAppRegion) @@ -21735,7 +21957,7 @@ func (s *StaticSiteUserProvidedFunctionAppARMResourceProperties) UnmarshalJSON(d // MarshalJSON implements the json.Marshaller interface for type StaticSiteUserProvidedFunctionAppProperties. func (s StaticSiteUserProvidedFunctionAppProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "createdOn", s.CreatedOn) + populateDateTimeRFC3339(objectMap, "createdOn", s.CreatedOn) populate(objectMap, "functionAppRegion", s.FunctionAppRegion) populate(objectMap, "functionAppResourceId", s.FunctionAppResourceID) return json.Marshal(objectMap) @@ -21751,7 +21973,7 @@ func (s *StaticSiteUserProvidedFunctionAppProperties) UnmarshalJSON(data []byte) var err error switch key { case "createdOn": - err = unpopulateTimeRFC3339(val, "CreatedOn", &s.CreatedOn) + err = unpopulateDateTimeRFC3339(val, "CreatedOn", &s.CreatedOn) delete(rawMsg, key) case "functionAppRegion": err = unpopulate(val, "FunctionAppRegion", &s.FunctionAppRegion) @@ -22943,11 +23165,11 @@ func (t *TriggeredJobHistoryProperties) UnmarshalJSON(data []byte) error { func (t TriggeredJobRun) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "duration", t.Duration) - populateTimeRFC3339(objectMap, "end_time", t.EndTime) + populateDateTimeRFC3339(objectMap, "end_time", t.EndTime) populate(objectMap, "error_url", t.ErrorURL) populate(objectMap, "job_name", t.JobName) populate(objectMap, "output_url", t.OutputURL) - populateTimeRFC3339(objectMap, "start_time", t.StartTime) + populateDateTimeRFC3339(objectMap, "start_time", t.StartTime) populate(objectMap, "status", t.Status) populate(objectMap, "trigger", t.Trigger) populate(objectMap, "url", t.URL) @@ -22969,7 +23191,7 @@ func (t *TriggeredJobRun) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Duration", &t.Duration) delete(rawMsg, key) case "end_time": - err = unpopulateTimeRFC3339(val, "EndTime", &t.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &t.EndTime) delete(rawMsg, key) case "error_url": err = unpopulate(val, "ErrorURL", &t.ErrorURL) @@ -22981,7 +23203,7 @@ func (t *TriggeredJobRun) UnmarshalJSON(data []byte) error { err = unpopulate(val, "OutputURL", &t.OutputURL) delete(rawMsg, key) case "start_time": - err = unpopulateTimeRFC3339(val, "StartTime", &t.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &t.StartTime) delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &t.Status) @@ -23294,7 +23516,7 @@ func (u UsageProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "currentValue", u.CurrentValue) populate(objectMap, "displayName", u.DisplayName) populate(objectMap, "limit", u.Limit) - populateTimeRFC3339(objectMap, "nextResetTime", u.NextResetTime) + populateDateTimeRFC3339(objectMap, "nextResetTime", u.NextResetTime) populate(objectMap, "resourceName", u.ResourceName) populate(objectMap, "siteMode", u.SiteMode) populate(objectMap, "unit", u.Unit) @@ -23323,7 +23545,7 @@ func (u *UsageProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Limit", &u.Limit) delete(rawMsg, key) case "nextResetTime": - err = unpopulateTimeRFC3339(val, "NextResetTime", &u.NextResetTime) + err = unpopulateDateTimeRFC3339(val, "NextResetTime", &u.NextResetTime) delete(rawMsg, key) case "resourceName": err = unpopulate(val, "ResourceName", &u.ResourceName) @@ -24411,7 +24633,7 @@ func (w *WebAppMinorVersion) UnmarshalJSON(data []byte) error { func (w WebAppRuntimeSettings) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "appInsightsSettings", w.AppInsightsSettings) - populateTimeRFC3339(objectMap, "endOfLifeDate", w.EndOfLifeDate) + populateDateTimeRFC3339(objectMap, "endOfLifeDate", w.EndOfLifeDate) populate(objectMap, "gitHubActionSettings", w.GitHubActionSettings) populate(objectMap, "isAutoUpdate", w.IsAutoUpdate) populate(objectMap, "isDeprecated", w.IsDeprecated) @@ -24436,7 +24658,7 @@ func (w *WebAppRuntimeSettings) UnmarshalJSON(data []byte) error { err = unpopulate(val, "AppInsightsSettings", &w.AppInsightsSettings) delete(rawMsg, key) case "endOfLifeDate": - err = unpopulateTimeRFC3339(val, "EndOfLifeDate", &w.EndOfLifeDate) + err = unpopulateDateTimeRFC3339(val, "EndOfLifeDate", &w.EndOfLifeDate) delete(rawMsg, key) case "gitHubActionSettings": err = unpopulate(val, "GitHubActionSettings", &w.GitHubActionSettings) @@ -24844,7 +25066,7 @@ func (w *WebSiteInstanceStatusProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type WindowsJavaContainerSettings. func (w WindowsJavaContainerSettings) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "endOfLifeDate", w.EndOfLifeDate) + populateDateTimeRFC3339(objectMap, "endOfLifeDate", w.EndOfLifeDate) populate(objectMap, "isAutoUpdate", w.IsAutoUpdate) populate(objectMap, "isDeprecated", w.IsDeprecated) populate(objectMap, "isEarlyAccess", w.IsEarlyAccess) @@ -24865,7 +25087,7 @@ func (w *WindowsJavaContainerSettings) UnmarshalJSON(data []byte) error { var err error switch key { case "endOfLifeDate": - err = unpopulateTimeRFC3339(val, "EndOfLifeDate", &w.EndOfLifeDate) + err = unpopulateDateTimeRFC3339(val, "EndOfLifeDate", &w.EndOfLifeDate) delete(rawMsg, key) case "isAutoUpdate": err = unpopulate(val, "IsAutoUpdate", &w.IsAutoUpdate) @@ -25392,8 +25614,8 @@ func (w WorkflowProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "accessControl", w.AccessControl) populate(objectMap, "accessEndpoint", w.AccessEndpoint) - populateTimeRFC3339(objectMap, "changedTime", w.ChangedTime) - populateTimeRFC3339(objectMap, "createdTime", w.CreatedTime) + populateDateTimeRFC3339(objectMap, "changedTime", w.ChangedTime) + populateDateTimeRFC3339(objectMap, "createdTime", w.CreatedTime) populateAny(objectMap, "definition", w.Definition) populate(objectMap, "endpointsConfiguration", w.EndpointsConfiguration) populate(objectMap, "integrationAccount", w.IntegrationAccount) @@ -25423,10 +25645,10 @@ func (w *WorkflowProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "AccessEndpoint", &w.AccessEndpoint) delete(rawMsg, key) case "changedTime": - err = unpopulateTimeRFC3339(val, "ChangedTime", &w.ChangedTime) + err = unpopulateDateTimeRFC3339(val, "ChangedTime", &w.ChangedTime) delete(rawMsg, key) case "createdTime": - err = unpopulateTimeRFC3339(val, "CreatedTime", &w.CreatedTime) + err = unpopulateDateTimeRFC3339(val, "CreatedTime", &w.CreatedTime) delete(rawMsg, key) case "definition": err = unpopulate(val, "Definition", &w.Definition) @@ -25650,12 +25872,12 @@ func (w WorkflowRunActionProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "code", w.Code) populate(objectMap, "correlation", w.Correlation) - populateTimeRFC3339(objectMap, "endTime", w.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", w.EndTime) populateAny(objectMap, "error", w.Error) populate(objectMap, "inputsLink", w.InputsLink) populate(objectMap, "outputsLink", w.OutputsLink) populate(objectMap, "retryHistory", w.RetryHistory) - populateTimeRFC3339(objectMap, "startTime", w.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", w.StartTime) populate(objectMap, "status", w.Status) populateAny(objectMap, "trackedProperties", w.TrackedProperties) populate(objectMap, "trackingId", w.TrackingID) @@ -25678,7 +25900,7 @@ func (w *WorkflowRunActionProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Correlation", &w.Correlation) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &w.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &w.EndTime) delete(rawMsg, key) case "error": err = unpopulate(val, "Error", &w.Error) @@ -25693,7 +25915,7 @@ func (w *WorkflowRunActionProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "RetryHistory", &w.RetryHistory) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &w.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &w.StartTime) delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &w.Status) @@ -25795,7 +26017,7 @@ func (w WorkflowRunActionRepetitionProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "code", w.Code) populate(objectMap, "correlation", w.Correlation) - populateTimeRFC3339(objectMap, "endTime", w.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", w.EndTime) populateAny(objectMap, "error", w.Error) populateAny(objectMap, "inputs", w.Inputs) populate(objectMap, "inputsLink", w.InputsLink) @@ -25804,7 +26026,7 @@ func (w WorkflowRunActionRepetitionProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "outputsLink", w.OutputsLink) populate(objectMap, "repetitionIndexes", w.RepetitionIndexes) populate(objectMap, "retryHistory", w.RetryHistory) - populateTimeRFC3339(objectMap, "startTime", w.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", w.StartTime) populate(objectMap, "status", w.Status) populateAny(objectMap, "trackedProperties", w.TrackedProperties) populate(objectMap, "trackingId", w.TrackingID) @@ -25827,7 +26049,7 @@ func (w *WorkflowRunActionRepetitionProperties) UnmarshalJSON(data []byte) error err = unpopulate(val, "Correlation", &w.Correlation) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &w.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &w.EndTime) delete(rawMsg, key) case "error": err = unpopulate(val, "Error", &w.Error) @@ -25854,7 +26076,7 @@ func (w *WorkflowRunActionRepetitionProperties) UnmarshalJSON(data []byte) error err = unpopulate(val, "RetryHistory", &w.RetryHistory) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &w.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &w.StartTime) delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &w.Status) @@ -25937,14 +26159,14 @@ func (w WorkflowRunProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "code", w.Code) populate(objectMap, "correlation", w.Correlation) populate(objectMap, "correlationId", w.CorrelationID) - populateTimeRFC3339(objectMap, "endTime", w.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", w.EndTime) populateAny(objectMap, "error", w.Error) populate(objectMap, "outputs", w.Outputs) populate(objectMap, "response", w.Response) - populateTimeRFC3339(objectMap, "startTime", w.StartTime) + populateDateTimeRFC3339(objectMap, "startTime", w.StartTime) populate(objectMap, "status", w.Status) populate(objectMap, "trigger", w.Trigger) - populateTimeRFC3339(objectMap, "waitEndTime", w.WaitEndTime) + populateDateTimeRFC3339(objectMap, "waitEndTime", w.WaitEndTime) populate(objectMap, "workflow", w.Workflow) return json.Marshal(objectMap) } @@ -25968,7 +26190,7 @@ func (w *WorkflowRunProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "CorrelationID", &w.CorrelationID) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &w.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &w.EndTime) delete(rawMsg, key) case "error": err = unpopulate(val, "Error", &w.Error) @@ -25980,7 +26202,7 @@ func (w *WorkflowRunProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Response", &w.Response) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &w.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &w.StartTime) delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &w.Status) @@ -25989,7 +26211,7 @@ func (w *WorkflowRunProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Trigger", &w.Trigger) delete(rawMsg, key) case "waitEndTime": - err = unpopulateTimeRFC3339(val, "WaitEndTime", &w.WaitEndTime) + err = unpopulateDateTimeRFC3339(val, "WaitEndTime", &w.WaitEndTime) delete(rawMsg, key) case "workflow": err = unpopulate(val, "Workflow", &w.Workflow) @@ -26007,15 +26229,15 @@ func (w WorkflowRunTrigger) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "code", w.Code) populate(objectMap, "correlation", w.Correlation) - populateTimeRFC3339(objectMap, "endTime", w.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", w.EndTime) populateAny(objectMap, "error", w.Error) populateAny(objectMap, "inputs", w.Inputs) populate(objectMap, "inputsLink", w.InputsLink) populate(objectMap, "name", w.Name) populateAny(objectMap, "outputs", w.Outputs) populate(objectMap, "outputsLink", w.OutputsLink) - populateTimeRFC3339(objectMap, "scheduledTime", w.ScheduledTime) - populateTimeRFC3339(objectMap, "startTime", w.StartTime) + populateDateTimeRFC3339(objectMap, "scheduledTime", w.ScheduledTime) + populateDateTimeRFC3339(objectMap, "startTime", w.StartTime) populate(objectMap, "status", w.Status) populateAny(objectMap, "trackedProperties", w.TrackedProperties) populate(objectMap, "trackingId", w.TrackingID) @@ -26038,7 +26260,7 @@ func (w *WorkflowRunTrigger) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Correlation", &w.Correlation) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &w.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &w.EndTime) delete(rawMsg, key) case "error": err = unpopulate(val, "Error", &w.Error) @@ -26059,10 +26281,10 @@ func (w *WorkflowRunTrigger) UnmarshalJSON(data []byte) error { err = unpopulate(val, "OutputsLink", &w.OutputsLink) delete(rawMsg, key) case "scheduledTime": - err = unpopulateTimeRFC3339(val, "ScheduledTime", &w.ScheduledTime) + err = unpopulateDateTimeRFC3339(val, "ScheduledTime", &w.ScheduledTime) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &w.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &w.StartTime) delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &w.Status) @@ -26327,14 +26549,14 @@ func (w WorkflowTriggerHistoryProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "code", w.Code) populate(objectMap, "correlation", w.Correlation) - populateTimeRFC3339(objectMap, "endTime", w.EndTime) + populateDateTimeRFC3339(objectMap, "endTime", w.EndTime) populateAny(objectMap, "error", w.Error) populate(objectMap, "fired", w.Fired) populate(objectMap, "inputsLink", w.InputsLink) populate(objectMap, "outputsLink", w.OutputsLink) populate(objectMap, "run", w.Run) - populateTimeRFC3339(objectMap, "scheduledTime", w.ScheduledTime) - populateTimeRFC3339(objectMap, "startTime", w.StartTime) + populateDateTimeRFC3339(objectMap, "scheduledTime", w.ScheduledTime) + populateDateTimeRFC3339(objectMap, "startTime", w.StartTime) populate(objectMap, "status", w.Status) populate(objectMap, "trackingId", w.TrackingID) return json.Marshal(objectMap) @@ -26356,7 +26578,7 @@ func (w *WorkflowTriggerHistoryProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Correlation", &w.Correlation) delete(rawMsg, key) case "endTime": - err = unpopulateTimeRFC3339(val, "EndTime", &w.EndTime) + err = unpopulateDateTimeRFC3339(val, "EndTime", &w.EndTime) delete(rawMsg, key) case "error": err = unpopulate(val, "Error", &w.Error) @@ -26374,10 +26596,10 @@ func (w *WorkflowTriggerHistoryProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "Run", &w.Run) delete(rawMsg, key) case "scheduledTime": - err = unpopulateTimeRFC3339(val, "ScheduledTime", &w.ScheduledTime) + err = unpopulateDateTimeRFC3339(val, "ScheduledTime", &w.ScheduledTime) delete(rawMsg, key) case "startTime": - err = unpopulateTimeRFC3339(val, "StartTime", &w.StartTime) + err = unpopulateDateTimeRFC3339(val, "StartTime", &w.StartTime) delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &w.Status) @@ -26470,10 +26692,10 @@ func (w *WorkflowTriggerListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type WorkflowTriggerProperties. func (w WorkflowTriggerProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateTimeRFC3339(objectMap, "changedTime", w.ChangedTime) - populateTimeRFC3339(objectMap, "createdTime", w.CreatedTime) - populateTimeRFC3339(objectMap, "lastExecutionTime", w.LastExecutionTime) - populateTimeRFC3339(objectMap, "nextExecutionTime", w.NextExecutionTime) + populateDateTimeRFC3339(objectMap, "changedTime", w.ChangedTime) + populateDateTimeRFC3339(objectMap, "createdTime", w.CreatedTime) + populateDateTimeRFC3339(objectMap, "lastExecutionTime", w.LastExecutionTime) + populateDateTimeRFC3339(objectMap, "nextExecutionTime", w.NextExecutionTime) populate(objectMap, "provisioningState", w.ProvisioningState) populate(objectMap, "recurrence", w.Recurrence) populate(objectMap, "state", w.State) @@ -26492,16 +26714,16 @@ func (w *WorkflowTriggerProperties) UnmarshalJSON(data []byte) error { var err error switch key { case "changedTime": - err = unpopulateTimeRFC3339(val, "ChangedTime", &w.ChangedTime) + err = unpopulateDateTimeRFC3339(val, "ChangedTime", &w.ChangedTime) delete(rawMsg, key) case "createdTime": - err = unpopulateTimeRFC3339(val, "CreatedTime", &w.CreatedTime) + err = unpopulateDateTimeRFC3339(val, "CreatedTime", &w.CreatedTime) delete(rawMsg, key) case "lastExecutionTime": - err = unpopulateTimeRFC3339(val, "LastExecutionTime", &w.LastExecutionTime) + err = unpopulateDateTimeRFC3339(val, "LastExecutionTime", &w.LastExecutionTime) delete(rawMsg, key) case "nextExecutionTime": - err = unpopulateTimeRFC3339(val, "NextExecutionTime", &w.NextExecutionTime) + err = unpopulateDateTimeRFC3339(val, "NextExecutionTime", &w.NextExecutionTime) delete(rawMsg, key) case "provisioningState": err = unpopulate(val, "ProvisioningState", &w.ProvisioningState) @@ -26656,8 +26878,8 @@ func (w WorkflowVersionProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "accessControl", w.AccessControl) populate(objectMap, "accessEndpoint", w.AccessEndpoint) - populateTimeRFC3339(objectMap, "changedTime", w.ChangedTime) - populateTimeRFC3339(objectMap, "createdTime", w.CreatedTime) + populateDateTimeRFC3339(objectMap, "changedTime", w.ChangedTime) + populateDateTimeRFC3339(objectMap, "createdTime", w.CreatedTime) populateAny(objectMap, "definition", w.Definition) populate(objectMap, "endpointsConfiguration", w.EndpointsConfiguration) populate(objectMap, "integrationAccount", w.IntegrationAccount) @@ -26685,10 +26907,10 @@ func (w *WorkflowVersionProperties) UnmarshalJSON(data []byte) error { err = unpopulate(val, "AccessEndpoint", &w.AccessEndpoint) delete(rawMsg, key) case "changedTime": - err = unpopulateTimeRFC3339(val, "ChangedTime", &w.ChangedTime) + err = unpopulateDateTimeRFC3339(val, "ChangedTime", &w.ChangedTime) delete(rawMsg, key) case "createdTime": - err = unpopulateTimeRFC3339(val, "CreatedTime", &w.CreatedTime) + err = unpopulateDateTimeRFC3339(val, "CreatedTime", &w.CreatedTime) delete(rawMsg, key) case "definition": err = unpopulate(val, "Definition", &w.Definition) diff --git a/sdk/resourcemanager/appservice/armappservice/options.go b/sdk/resourcemanager/appservice/armappservice/options.go new file mode 100644 index 000000000000..472320f5bb4a --- /dev/null +++ b/sdk/resourcemanager/appservice/armappservice/options.go @@ -0,0 +1,4434 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armappservice + +import "time" + +// CertificateOrdersClientBeginCreateOrUpdateCertificateOptions contains the optional parameters for the CertificateOrdersClient.BeginCreateOrUpdateCertificate +// method. +type CertificateOrdersClientBeginCreateOrUpdateCertificateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CertificateOrdersClientBeginCreateOrUpdateOptions contains the optional parameters for the CertificateOrdersClient.BeginCreateOrUpdate +// method. +type CertificateOrdersClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CertificateOrdersClientDeleteCertificateOptions contains the optional parameters for the CertificateOrdersClient.DeleteCertificate +// method. +type CertificateOrdersClientDeleteCertificateOptions struct { + // placeholder for future optional parameters +} + +// CertificateOrdersClientDeleteOptions contains the optional parameters for the CertificateOrdersClient.Delete method. +type CertificateOrdersClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// CertificateOrdersClientGetCertificateOptions contains the optional parameters for the CertificateOrdersClient.GetCertificate +// method. +type CertificateOrdersClientGetCertificateOptions struct { + // placeholder for future optional parameters +} + +// CertificateOrdersClientGetOptions contains the optional parameters for the CertificateOrdersClient.Get method. +type CertificateOrdersClientGetOptions struct { + // placeholder for future optional parameters +} + +// CertificateOrdersClientListByResourceGroupOptions contains the optional parameters for the CertificateOrdersClient.NewListByResourceGroupPager +// method. +type CertificateOrdersClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// CertificateOrdersClientListCertificatesOptions contains the optional parameters for the CertificateOrdersClient.NewListCertificatesPager +// method. +type CertificateOrdersClientListCertificatesOptions struct { + // placeholder for future optional parameters +} + +// CertificateOrdersClientListOptions contains the optional parameters for the CertificateOrdersClient.NewListPager method. +type CertificateOrdersClientListOptions struct { + // placeholder for future optional parameters +} + +// CertificateOrdersClientReissueOptions contains the optional parameters for the CertificateOrdersClient.Reissue method. +type CertificateOrdersClientReissueOptions struct { + // placeholder for future optional parameters +} + +// CertificateOrdersClientRenewOptions contains the optional parameters for the CertificateOrdersClient.Renew method. +type CertificateOrdersClientRenewOptions struct { + // placeholder for future optional parameters +} + +// CertificateOrdersClientResendEmailOptions contains the optional parameters for the CertificateOrdersClient.ResendEmail +// method. +type CertificateOrdersClientResendEmailOptions struct { + // placeholder for future optional parameters +} + +// CertificateOrdersClientResendRequestEmailsOptions contains the optional parameters for the CertificateOrdersClient.ResendRequestEmails +// method. +type CertificateOrdersClientResendRequestEmailsOptions struct { + // placeholder for future optional parameters +} + +// CertificateOrdersClientRetrieveCertificateActionsOptions contains the optional parameters for the CertificateOrdersClient.RetrieveCertificateActions +// method. +type CertificateOrdersClientRetrieveCertificateActionsOptions struct { + // placeholder for future optional parameters +} + +// CertificateOrdersClientRetrieveCertificateEmailHistoryOptions contains the optional parameters for the CertificateOrdersClient.RetrieveCertificateEmailHistory +// method. +type CertificateOrdersClientRetrieveCertificateEmailHistoryOptions struct { + // placeholder for future optional parameters +} + +// CertificateOrdersClientRetrieveSiteSealOptions contains the optional parameters for the CertificateOrdersClient.RetrieveSiteSeal +// method. +type CertificateOrdersClientRetrieveSiteSealOptions struct { + // placeholder for future optional parameters +} + +// CertificateOrdersClientUpdateCertificateOptions contains the optional parameters for the CertificateOrdersClient.UpdateCertificate +// method. +type CertificateOrdersClientUpdateCertificateOptions struct { + // placeholder for future optional parameters +} + +// CertificateOrdersClientUpdateOptions contains the optional parameters for the CertificateOrdersClient.Update method. +type CertificateOrdersClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// CertificateOrdersClientValidatePurchaseInformationOptions contains the optional parameters for the CertificateOrdersClient.ValidatePurchaseInformation +// method. +type CertificateOrdersClientValidatePurchaseInformationOptions struct { + // placeholder for future optional parameters +} + +// CertificateOrdersClientVerifyDomainOwnershipOptions contains the optional parameters for the CertificateOrdersClient.VerifyDomainOwnership +// method. +type CertificateOrdersClientVerifyDomainOwnershipOptions struct { + // placeholder for future optional parameters +} + +// CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseOptions contains the optional parameters +// for the CertificateOrdersDiagnosticsClient.GetAppServiceCertificateOrderDetectorResponse method. +type CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseOptions struct { + // The end time for the detector response. + EndTime *time.Time + + // The start time for detector response. + StartTime *time.Time + + // The time grain for the detector response. + TimeGrain *string +} + +// CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseOptions contains the optional parameters +// for the CertificateOrdersDiagnosticsClient.NewListAppServiceCertificateOrderDetectorResponsePager method. +type CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseOptions struct { + // placeholder for future optional parameters +} + +// CertificateRegistrationProviderClientListOperationsOptions contains the optional parameters for the CertificateRegistrationProviderClient.NewListOperationsPager +// method. +type CertificateRegistrationProviderClientListOperationsOptions struct { + // placeholder for future optional parameters +} + +// CertificatesClientCreateOrUpdateOptions contains the optional parameters for the CertificatesClient.CreateOrUpdate method. +type CertificatesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// CertificatesClientDeleteOptions contains the optional parameters for the CertificatesClient.Delete method. +type CertificatesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// CertificatesClientGetOptions contains the optional parameters for the CertificatesClient.Get method. +type CertificatesClientGetOptions struct { + // placeholder for future optional parameters +} + +// CertificatesClientListByResourceGroupOptions contains the optional parameters for the CertificatesClient.NewListByResourceGroupPager +// method. +type CertificatesClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// CertificatesClientListOptions contains the optional parameters for the CertificatesClient.NewListPager method. +type CertificatesClientListOptions struct { + // Return only information specified in the filter (using OData syntax). For example: $filter=KeyVaultId eq 'KeyVaultId' + Filter *string +} + +// CertificatesClientUpdateOptions contains the optional parameters for the CertificatesClient.Update method. +type CertificatesClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsClientBeginCreateOrUpdateOptions contains the optional parameters for the ContainerAppsClient.BeginCreateOrUpdate +// method. +type ContainerAppsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ContainerAppsClientBeginDeleteOptions contains the optional parameters for the ContainerAppsClient.BeginDelete method. +type ContainerAppsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ContainerAppsClientGetOptions contains the optional parameters for the ContainerAppsClient.Get method. +type ContainerAppsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsClientListByResourceGroupOptions contains the optional parameters for the ContainerAppsClient.NewListByResourceGroupPager +// method. +type ContainerAppsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsClientListBySubscriptionOptions contains the optional parameters for the ContainerAppsClient.NewListBySubscriptionPager +// method. +type ContainerAppsClientListBySubscriptionOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsClientListSecretsOptions contains the optional parameters for the ContainerAppsClient.ListSecrets method. +type ContainerAppsClientListSecretsOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsRevisionsClientActivateRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.ActivateRevision +// method. +type ContainerAppsRevisionsClientActivateRevisionOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsRevisionsClientDeactivateRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.DeactivateRevision +// method. +type ContainerAppsRevisionsClientDeactivateRevisionOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsRevisionsClientGetRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.GetRevision +// method. +type ContainerAppsRevisionsClientGetRevisionOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsRevisionsClientListRevisionsOptions contains the optional parameters for the ContainerAppsRevisionsClient.NewListRevisionsPager +// method. +type ContainerAppsRevisionsClientListRevisionsOptions struct { + // placeholder for future optional parameters +} + +// ContainerAppsRevisionsClientRestartRevisionOptions contains the optional parameters for the ContainerAppsRevisionsClient.RestartRevision +// method. +type ContainerAppsRevisionsClientRestartRevisionOptions struct { + // placeholder for future optional parameters +} + +// DeletedWebAppsClientGetDeletedWebAppByLocationOptions contains the optional parameters for the DeletedWebAppsClient.GetDeletedWebAppByLocation +// method. +type DeletedWebAppsClientGetDeletedWebAppByLocationOptions struct { + // placeholder for future optional parameters +} + +// DeletedWebAppsClientListByLocationOptions contains the optional parameters for the DeletedWebAppsClient.NewListByLocationPager +// method. +type DeletedWebAppsClientListByLocationOptions struct { + // placeholder for future optional parameters +} + +// DeletedWebAppsClientListOptions contains the optional parameters for the DeletedWebAppsClient.NewListPager method. +type DeletedWebAppsClientListOptions struct { + // placeholder for future optional parameters +} + +// DiagnosticsClientExecuteSiteAnalysisOptions contains the optional parameters for the DiagnosticsClient.ExecuteSiteAnalysis +// method. +type DiagnosticsClientExecuteSiteAnalysisOptions struct { + // End Time + EndTime *time.Time + + // Start Time + StartTime *time.Time + + // Time Grain + TimeGrain *string +} + +// DiagnosticsClientExecuteSiteAnalysisSlotOptions contains the optional parameters for the DiagnosticsClient.ExecuteSiteAnalysisSlot +// method. +type DiagnosticsClientExecuteSiteAnalysisSlotOptions struct { + // End Time + EndTime *time.Time + + // Start Time + StartTime *time.Time + + // Time Grain + TimeGrain *string +} + +// DiagnosticsClientExecuteSiteDetectorOptions contains the optional parameters for the DiagnosticsClient.ExecuteSiteDetector +// method. +type DiagnosticsClientExecuteSiteDetectorOptions struct { + // End Time + EndTime *time.Time + + // Start Time + StartTime *time.Time + + // Time Grain + TimeGrain *string +} + +// DiagnosticsClientExecuteSiteDetectorSlotOptions contains the optional parameters for the DiagnosticsClient.ExecuteSiteDetectorSlot +// method. +type DiagnosticsClientExecuteSiteDetectorSlotOptions struct { + // End Time + EndTime *time.Time + + // Start Time + StartTime *time.Time + + // Time Grain + TimeGrain *string +} + +// DiagnosticsClientGetHostingEnvironmentDetectorResponseOptions contains the optional parameters for the DiagnosticsClient.GetHostingEnvironmentDetectorResponse +// method. +type DiagnosticsClientGetHostingEnvironmentDetectorResponseOptions struct { + // End Time + EndTime *time.Time + + // Start Time + StartTime *time.Time + + // Time Grain + TimeGrain *string +} + +// DiagnosticsClientGetSiteAnalysisOptions contains the optional parameters for the DiagnosticsClient.GetSiteAnalysis method. +type DiagnosticsClientGetSiteAnalysisOptions struct { + // placeholder for future optional parameters +} + +// DiagnosticsClientGetSiteAnalysisSlotOptions contains the optional parameters for the DiagnosticsClient.GetSiteAnalysisSlot +// method. +type DiagnosticsClientGetSiteAnalysisSlotOptions struct { + // placeholder for future optional parameters +} + +// DiagnosticsClientGetSiteDetectorOptions contains the optional parameters for the DiagnosticsClient.GetSiteDetector method. +type DiagnosticsClientGetSiteDetectorOptions struct { + // placeholder for future optional parameters +} + +// DiagnosticsClientGetSiteDetectorResponseOptions contains the optional parameters for the DiagnosticsClient.GetSiteDetectorResponse +// method. +type DiagnosticsClientGetSiteDetectorResponseOptions struct { + // End Time + EndTime *time.Time + + // Start Time + StartTime *time.Time + + // Time Grain + TimeGrain *string +} + +// DiagnosticsClientGetSiteDetectorResponseSlotOptions contains the optional parameters for the DiagnosticsClient.GetSiteDetectorResponseSlot +// method. +type DiagnosticsClientGetSiteDetectorResponseSlotOptions struct { + // End Time + EndTime *time.Time + + // Start Time + StartTime *time.Time + + // Time Grain + TimeGrain *string +} + +// DiagnosticsClientGetSiteDetectorSlotOptions contains the optional parameters for the DiagnosticsClient.GetSiteDetectorSlot +// method. +type DiagnosticsClientGetSiteDetectorSlotOptions struct { + // placeholder for future optional parameters +} + +// DiagnosticsClientGetSiteDiagnosticCategoryOptions contains the optional parameters for the DiagnosticsClient.GetSiteDiagnosticCategory +// method. +type DiagnosticsClientGetSiteDiagnosticCategoryOptions struct { + // placeholder for future optional parameters +} + +// DiagnosticsClientGetSiteDiagnosticCategorySlotOptions contains the optional parameters for the DiagnosticsClient.GetSiteDiagnosticCategorySlot +// method. +type DiagnosticsClientGetSiteDiagnosticCategorySlotOptions struct { + // placeholder for future optional parameters +} + +// DiagnosticsClientListHostingEnvironmentDetectorResponsesOptions contains the optional parameters for the DiagnosticsClient.NewListHostingEnvironmentDetectorResponsesPager +// method. +type DiagnosticsClientListHostingEnvironmentDetectorResponsesOptions struct { + // placeholder for future optional parameters +} + +// DiagnosticsClientListSiteAnalysesOptions contains the optional parameters for the DiagnosticsClient.NewListSiteAnalysesPager +// method. +type DiagnosticsClientListSiteAnalysesOptions struct { + // placeholder for future optional parameters +} + +// DiagnosticsClientListSiteAnalysesSlotOptions contains the optional parameters for the DiagnosticsClient.NewListSiteAnalysesSlotPager +// method. +type DiagnosticsClientListSiteAnalysesSlotOptions struct { + // placeholder for future optional parameters +} + +// DiagnosticsClientListSiteDetectorResponsesOptions contains the optional parameters for the DiagnosticsClient.NewListSiteDetectorResponsesPager +// method. +type DiagnosticsClientListSiteDetectorResponsesOptions struct { + // placeholder for future optional parameters +} + +// DiagnosticsClientListSiteDetectorResponsesSlotOptions contains the optional parameters for the DiagnosticsClient.NewListSiteDetectorResponsesSlotPager +// method. +type DiagnosticsClientListSiteDetectorResponsesSlotOptions struct { + // placeholder for future optional parameters +} + +// DiagnosticsClientListSiteDetectorsOptions contains the optional parameters for the DiagnosticsClient.NewListSiteDetectorsPager +// method. +type DiagnosticsClientListSiteDetectorsOptions struct { + // placeholder for future optional parameters +} + +// DiagnosticsClientListSiteDetectorsSlotOptions contains the optional parameters for the DiagnosticsClient.NewListSiteDetectorsSlotPager +// method. +type DiagnosticsClientListSiteDetectorsSlotOptions struct { + // placeholder for future optional parameters +} + +// DiagnosticsClientListSiteDiagnosticCategoriesOptions contains the optional parameters for the DiagnosticsClient.NewListSiteDiagnosticCategoriesPager +// method. +type DiagnosticsClientListSiteDiagnosticCategoriesOptions struct { + // placeholder for future optional parameters +} + +// DiagnosticsClientListSiteDiagnosticCategoriesSlotOptions contains the optional parameters for the DiagnosticsClient.NewListSiteDiagnosticCategoriesSlotPager +// method. +type DiagnosticsClientListSiteDiagnosticCategoriesSlotOptions struct { + // placeholder for future optional parameters +} + +// DomainRegistrationProviderClientListOperationsOptions contains the optional parameters for the DomainRegistrationProviderClient.NewListOperationsPager +// method. +type DomainRegistrationProviderClientListOperationsOptions struct { + // placeholder for future optional parameters +} + +// DomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the DomainsClient.BeginCreateOrUpdate method. +type DomainsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DomainsClientCheckAvailabilityOptions contains the optional parameters for the DomainsClient.CheckAvailability method. +type DomainsClientCheckAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// DomainsClientCreateOrUpdateOwnershipIdentifierOptions contains the optional parameters for the DomainsClient.CreateOrUpdateOwnershipIdentifier +// method. +type DomainsClientCreateOrUpdateOwnershipIdentifierOptions struct { + // placeholder for future optional parameters +} + +// DomainsClientDeleteOptions contains the optional parameters for the DomainsClient.Delete method. +type DomainsClientDeleteOptions struct { + // Specify true to delete the domain immediately. The default is false which deletes the domain after 24 hours. + ForceHardDeleteDomain *bool +} + +// DomainsClientDeleteOwnershipIdentifierOptions contains the optional parameters for the DomainsClient.DeleteOwnershipIdentifier +// method. +type DomainsClientDeleteOwnershipIdentifierOptions struct { + // placeholder for future optional parameters +} + +// DomainsClientGetControlCenterSsoRequestOptions contains the optional parameters for the DomainsClient.GetControlCenterSsoRequest +// method. +type DomainsClientGetControlCenterSsoRequestOptions struct { + // placeholder for future optional parameters +} + +// DomainsClientGetOptions contains the optional parameters for the DomainsClient.Get method. +type DomainsClientGetOptions struct { + // placeholder for future optional parameters +} + +// DomainsClientGetOwnershipIdentifierOptions contains the optional parameters for the DomainsClient.GetOwnershipIdentifier +// method. +type DomainsClientGetOwnershipIdentifierOptions struct { + // placeholder for future optional parameters +} + +// DomainsClientListByResourceGroupOptions contains the optional parameters for the DomainsClient.NewListByResourceGroupPager +// method. +type DomainsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// DomainsClientListOptions contains the optional parameters for the DomainsClient.NewListPager method. +type DomainsClientListOptions struct { + // placeholder for future optional parameters +} + +// DomainsClientListOwnershipIdentifiersOptions contains the optional parameters for the DomainsClient.NewListOwnershipIdentifiersPager +// method. +type DomainsClientListOwnershipIdentifiersOptions struct { + // placeholder for future optional parameters +} + +// DomainsClientListRecommendationsOptions contains the optional parameters for the DomainsClient.NewListRecommendationsPager +// method. +type DomainsClientListRecommendationsOptions struct { + // placeholder for future optional parameters +} + +// DomainsClientRenewOptions contains the optional parameters for the DomainsClient.Renew method. +type DomainsClientRenewOptions struct { + // placeholder for future optional parameters +} + +// DomainsClientTransferOutOptions contains the optional parameters for the DomainsClient.TransferOut method. +type DomainsClientTransferOutOptions struct { + // placeholder for future optional parameters +} + +// DomainsClientUpdateOptions contains the optional parameters for the DomainsClient.Update method. +type DomainsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// DomainsClientUpdateOwnershipIdentifierOptions contains the optional parameters for the DomainsClient.UpdateOwnershipIdentifier +// method. +type DomainsClientUpdateOwnershipIdentifierOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientBeginApproveOrRejectPrivateEndpointConnectionOptions contains the optional parameters for the EnvironmentsClient.BeginApproveOrRejectPrivateEndpointConnection +// method. +type EnvironmentsClientBeginApproveOrRejectPrivateEndpointConnectionOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// EnvironmentsClientBeginChangeVnetOptions contains the optional parameters for the EnvironmentsClient.BeginChangeVnet method. +type EnvironmentsClientBeginChangeVnetOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// EnvironmentsClientBeginCreateOrUpdateMultiRolePoolOptions contains the optional parameters for the EnvironmentsClient.BeginCreateOrUpdateMultiRolePool +// method. +type EnvironmentsClientBeginCreateOrUpdateMultiRolePoolOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// EnvironmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the EnvironmentsClient.BeginCreateOrUpdate +// method. +type EnvironmentsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// EnvironmentsClientBeginCreateOrUpdateWorkerPoolOptions contains the optional parameters for the EnvironmentsClient.BeginCreateOrUpdateWorkerPool +// method. +type EnvironmentsClientBeginCreateOrUpdateWorkerPoolOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// EnvironmentsClientBeginDeleteOptions contains the optional parameters for the EnvironmentsClient.BeginDelete method. +type EnvironmentsClientBeginDeleteOptions struct { + // Specify true to force the deletion even if the App Service Environment contains resources. The default is false. + ForceDelete *bool + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// EnvironmentsClientBeginDeletePrivateEndpointConnectionOptions contains the optional parameters for the EnvironmentsClient.BeginDeletePrivateEndpointConnection +// method. +type EnvironmentsClientBeginDeletePrivateEndpointConnectionOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// EnvironmentsClientBeginResumeOptions contains the optional parameters for the EnvironmentsClient.BeginResume method. +type EnvironmentsClientBeginResumeOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// EnvironmentsClientBeginSuspendOptions contains the optional parameters for the EnvironmentsClient.BeginSuspend method. +type EnvironmentsClientBeginSuspendOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// EnvironmentsClientBeginUpgradeOptions contains the optional parameters for the EnvironmentsClient.BeginUpgrade method. +type EnvironmentsClientBeginUpgradeOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationOptions contains the optional parameters for the EnvironmentsClient.DeleteAseCustomDNSSuffixConfiguration +// method. +type EnvironmentsClientDeleteAseCustomDNSSuffixConfigurationOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientGetAseCustomDNSSuffixConfigurationOptions contains the optional parameters for the EnvironmentsClient.GetAseCustomDNSSuffixConfiguration +// method. +type EnvironmentsClientGetAseCustomDNSSuffixConfigurationOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientGetAseV3NetworkingConfigurationOptions contains the optional parameters for the EnvironmentsClient.GetAseV3NetworkingConfiguration +// method. +type EnvironmentsClientGetAseV3NetworkingConfigurationOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientGetDiagnosticsItemOptions contains the optional parameters for the EnvironmentsClient.GetDiagnosticsItem +// method. +type EnvironmentsClientGetDiagnosticsItemOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientGetInboundNetworkDependenciesEndpointsOptions contains the optional parameters for the EnvironmentsClient.NewGetInboundNetworkDependenciesEndpointsPager +// method. +type EnvironmentsClientGetInboundNetworkDependenciesEndpointsOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientGetMultiRolePoolOptions contains the optional parameters for the EnvironmentsClient.GetMultiRolePool +// method. +type EnvironmentsClientGetMultiRolePoolOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientGetOptions contains the optional parameters for the EnvironmentsClient.Get method. +type EnvironmentsClientGetOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientGetOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the EnvironmentsClient.NewGetOutboundNetworkDependenciesEndpointsPager +// method. +type EnvironmentsClientGetOutboundNetworkDependenciesEndpointsOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientGetPrivateEndpointConnectionListOptions contains the optional parameters for the EnvironmentsClient.NewGetPrivateEndpointConnectionListPager +// method. +type EnvironmentsClientGetPrivateEndpointConnectionListOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientGetPrivateEndpointConnectionOptions contains the optional parameters for the EnvironmentsClient.GetPrivateEndpointConnection +// method. +type EnvironmentsClientGetPrivateEndpointConnectionOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientGetPrivateLinkResourcesOptions contains the optional parameters for the EnvironmentsClient.GetPrivateLinkResources +// method. +type EnvironmentsClientGetPrivateLinkResourcesOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientGetVipInfoOptions contains the optional parameters for the EnvironmentsClient.GetVipInfo method. +type EnvironmentsClientGetVipInfoOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientGetWorkerPoolOptions contains the optional parameters for the EnvironmentsClient.GetWorkerPool method. +type EnvironmentsClientGetWorkerPoolOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientListAppServicePlansOptions contains the optional parameters for the EnvironmentsClient.NewListAppServicePlansPager +// method. +type EnvironmentsClientListAppServicePlansOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientListByResourceGroupOptions contains the optional parameters for the EnvironmentsClient.NewListByResourceGroupPager +// method. +type EnvironmentsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientListCapacitiesOptions contains the optional parameters for the EnvironmentsClient.NewListCapacitiesPager +// method. +type EnvironmentsClientListCapacitiesOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientListDiagnosticsOptions contains the optional parameters for the EnvironmentsClient.ListDiagnostics method. +type EnvironmentsClientListDiagnosticsOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientListMultiRoleMetricDefinitionsOptions contains the optional parameters for the EnvironmentsClient.NewListMultiRoleMetricDefinitionsPager +// method. +type EnvironmentsClientListMultiRoleMetricDefinitionsOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsOptions contains the optional parameters for the EnvironmentsClient.NewListMultiRolePoolInstanceMetricDefinitionsPager +// method. +type EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientListMultiRolePoolSKUsOptions contains the optional parameters for the EnvironmentsClient.NewListMultiRolePoolSKUsPager +// method. +type EnvironmentsClientListMultiRolePoolSKUsOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientListMultiRolePoolsOptions contains the optional parameters for the EnvironmentsClient.NewListMultiRolePoolsPager +// method. +type EnvironmentsClientListMultiRolePoolsOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientListMultiRoleUsagesOptions contains the optional parameters for the EnvironmentsClient.NewListMultiRoleUsagesPager +// method. +type EnvironmentsClientListMultiRoleUsagesOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientListOperationsOptions contains the optional parameters for the EnvironmentsClient.ListOperations method. +type EnvironmentsClientListOperationsOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientListOptions contains the optional parameters for the EnvironmentsClient.NewListPager method. +type EnvironmentsClientListOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientListUsagesOptions contains the optional parameters for the EnvironmentsClient.NewListUsagesPager method. +type EnvironmentsClientListUsagesOptions struct { + // Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' + // or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and + // endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. + Filter *string +} + +// EnvironmentsClientListWebAppsOptions contains the optional parameters for the EnvironmentsClient.NewListWebAppsPager method. +type EnvironmentsClientListWebAppsOptions struct { + // Comma separated list of app properties to include. + PropertiesToInclude *string +} + +// EnvironmentsClientListWebWorkerMetricDefinitionsOptions contains the optional parameters for the EnvironmentsClient.NewListWebWorkerMetricDefinitionsPager +// method. +type EnvironmentsClientListWebWorkerMetricDefinitionsOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientListWebWorkerUsagesOptions contains the optional parameters for the EnvironmentsClient.NewListWebWorkerUsagesPager +// method. +type EnvironmentsClientListWebWorkerUsagesOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsOptions contains the optional parameters for the EnvironmentsClient.NewListWorkerPoolInstanceMetricDefinitionsPager +// method. +type EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientListWorkerPoolSKUsOptions contains the optional parameters for the EnvironmentsClient.NewListWorkerPoolSKUsPager +// method. +type EnvironmentsClientListWorkerPoolSKUsOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientListWorkerPoolsOptions contains the optional parameters for the EnvironmentsClient.NewListWorkerPoolsPager +// method. +type EnvironmentsClientListWorkerPoolsOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientRebootOptions contains the optional parameters for the EnvironmentsClient.Reboot method. +type EnvironmentsClientRebootOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientTestUpgradeAvailableNotificationOptions contains the optional parameters for the EnvironmentsClient.TestUpgradeAvailableNotification +// method. +type EnvironmentsClientTestUpgradeAvailableNotificationOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationOptions contains the optional parameters for the EnvironmentsClient.UpdateAseCustomDNSSuffixConfiguration +// method. +type EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientUpdateAseNetworkingConfigurationOptions contains the optional parameters for the EnvironmentsClient.UpdateAseNetworkingConfiguration +// method. +type EnvironmentsClientUpdateAseNetworkingConfigurationOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientUpdateMultiRolePoolOptions contains the optional parameters for the EnvironmentsClient.UpdateMultiRolePool +// method. +type EnvironmentsClientUpdateMultiRolePoolOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientUpdateOptions contains the optional parameters for the EnvironmentsClient.Update method. +type EnvironmentsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// EnvironmentsClientUpdateWorkerPoolOptions contains the optional parameters for the EnvironmentsClient.UpdateWorkerPool +// method. +type EnvironmentsClientUpdateWorkerPoolOptions struct { + // placeholder for future optional parameters +} + +// GetUsagesInLocationClientListOptions contains the optional parameters for the GetUsagesInLocationClient.NewListPager method. +type GetUsagesInLocationClientListOptions struct { + // placeholder for future optional parameters +} + +// GlobalClientGetDeletedWebAppOptions contains the optional parameters for the GlobalClient.GetDeletedWebApp method. +type GlobalClientGetDeletedWebAppOptions struct { + // placeholder for future optional parameters +} + +// GlobalClientGetDeletedWebAppSnapshotsOptions contains the optional parameters for the GlobalClient.GetDeletedWebAppSnapshots +// method. +type GlobalClientGetDeletedWebAppSnapshotsOptions struct { + // placeholder for future optional parameters +} + +// GlobalClientGetSubscriptionOperationWithAsyncResponseOptions contains the optional parameters for the GlobalClient.GetSubscriptionOperationWithAsyncResponse +// method. +type GlobalClientGetSubscriptionOperationWithAsyncResponseOptions struct { + // placeholder for future optional parameters +} + +// KubeEnvironmentsClientBeginCreateOrUpdateOptions contains the optional parameters for the KubeEnvironmentsClient.BeginCreateOrUpdate +// method. +type KubeEnvironmentsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// KubeEnvironmentsClientBeginDeleteOptions contains the optional parameters for the KubeEnvironmentsClient.BeginDelete method. +type KubeEnvironmentsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// KubeEnvironmentsClientGetOptions contains the optional parameters for the KubeEnvironmentsClient.Get method. +type KubeEnvironmentsClientGetOptions struct { + // placeholder for future optional parameters +} + +// KubeEnvironmentsClientListByResourceGroupOptions contains the optional parameters for the KubeEnvironmentsClient.NewListByResourceGroupPager +// method. +type KubeEnvironmentsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// KubeEnvironmentsClientListBySubscriptionOptions contains the optional parameters for the KubeEnvironmentsClient.NewListBySubscriptionPager +// method. +type KubeEnvironmentsClientListBySubscriptionOptions struct { + // placeholder for future optional parameters +} + +// KubeEnvironmentsClientUpdateOptions contains the optional parameters for the KubeEnvironmentsClient.Update method. +type KubeEnvironmentsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// PlansClientBeginCreateOrUpdateOptions contains the optional parameters for the PlansClient.BeginCreateOrUpdate method. +type PlansClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PlansClientCreateOrUpdateVnetRouteOptions contains the optional parameters for the PlansClient.CreateOrUpdateVnetRoute +// method. +type PlansClientCreateOrUpdateVnetRouteOptions struct { + // placeholder for future optional parameters +} + +// PlansClientDeleteHybridConnectionOptions contains the optional parameters for the PlansClient.DeleteHybridConnection method. +type PlansClientDeleteHybridConnectionOptions struct { + // placeholder for future optional parameters +} + +// PlansClientDeleteOptions contains the optional parameters for the PlansClient.Delete method. +type PlansClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// PlansClientDeleteVnetRouteOptions contains the optional parameters for the PlansClient.DeleteVnetRoute method. +type PlansClientDeleteVnetRouteOptions struct { + // placeholder for future optional parameters +} + +// PlansClientGetHybridConnectionOptions contains the optional parameters for the PlansClient.GetHybridConnection method. +type PlansClientGetHybridConnectionOptions struct { + // placeholder for future optional parameters +} + +// PlansClientGetHybridConnectionPlanLimitOptions contains the optional parameters for the PlansClient.GetHybridConnectionPlanLimit +// method. +type PlansClientGetHybridConnectionPlanLimitOptions struct { + // placeholder for future optional parameters +} + +// PlansClientGetOptions contains the optional parameters for the PlansClient.Get method. +type PlansClientGetOptions struct { + // placeholder for future optional parameters +} + +// PlansClientGetRouteForVnetOptions contains the optional parameters for the PlansClient.GetRouteForVnet method. +type PlansClientGetRouteForVnetOptions struct { + // placeholder for future optional parameters +} + +// PlansClientGetServerFarmSKUsOptions contains the optional parameters for the PlansClient.GetServerFarmSKUs method. +type PlansClientGetServerFarmSKUsOptions struct { + // placeholder for future optional parameters +} + +// PlansClientGetVnetFromServerFarmOptions contains the optional parameters for the PlansClient.GetVnetFromServerFarm method. +type PlansClientGetVnetFromServerFarmOptions struct { + // placeholder for future optional parameters +} + +// PlansClientGetVnetGatewayOptions contains the optional parameters for the PlansClient.GetVnetGateway method. +type PlansClientGetVnetGatewayOptions struct { + // placeholder for future optional parameters +} + +// PlansClientListByResourceGroupOptions contains the optional parameters for the PlansClient.NewListByResourceGroupPager +// method. +type PlansClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// PlansClientListCapabilitiesOptions contains the optional parameters for the PlansClient.ListCapabilities method. +type PlansClientListCapabilitiesOptions struct { + // placeholder for future optional parameters +} + +// PlansClientListHybridConnectionKeysOptions contains the optional parameters for the PlansClient.ListHybridConnectionKeys +// method. +type PlansClientListHybridConnectionKeysOptions struct { + // placeholder for future optional parameters +} + +// PlansClientListHybridConnectionsOptions contains the optional parameters for the PlansClient.NewListHybridConnectionsPager +// method. +type PlansClientListHybridConnectionsOptions struct { + // placeholder for future optional parameters +} + +// PlansClientListOptions contains the optional parameters for the PlansClient.NewListPager method. +type PlansClientListOptions struct { + // Specify true to return all App Service plan properties. The default is false, which returns a subset of the properties. + // Retrieval of all properties may increase the API latency. + Detailed *bool +} + +// PlansClientListRoutesForVnetOptions contains the optional parameters for the PlansClient.ListRoutesForVnet method. +type PlansClientListRoutesForVnetOptions struct { + // placeholder for future optional parameters +} + +// PlansClientListUsagesOptions contains the optional parameters for the PlansClient.NewListUsagesPager method. +type PlansClientListUsagesOptions struct { + // Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' + // or name.value eq 'Metric2'). + Filter *string +} + +// PlansClientListVnetsOptions contains the optional parameters for the PlansClient.ListVnets method. +type PlansClientListVnetsOptions struct { + // placeholder for future optional parameters +} + +// PlansClientListWebAppsByHybridConnectionOptions contains the optional parameters for the PlansClient.NewListWebAppsByHybridConnectionPager +// method. +type PlansClientListWebAppsByHybridConnectionOptions struct { + // placeholder for future optional parameters +} + +// PlansClientListWebAppsOptions contains the optional parameters for the PlansClient.NewListWebAppsPager method. +type PlansClientListWebAppsOptions struct { + // Supported filter: $filter=state eq running. Returns only web apps that are currently running + Filter *string + + // Skip to a web app in the list of webapps associated with app service plan. If specified, the resulting list will contain + // web apps starting from (including) the skipToken. Otherwise, the resulting list + // contains web apps from the start of the list + SkipToken *string + + // List page size. If specified, results are paged. + Top *string +} + +// PlansClientRebootWorkerOptions contains the optional parameters for the PlansClient.RebootWorker method. +type PlansClientRebootWorkerOptions struct { + // placeholder for future optional parameters +} + +// PlansClientRestartWebAppsOptions contains the optional parameters for the PlansClient.RestartWebApps method. +type PlansClientRestartWebAppsOptions struct { + // Specify true to perform a soft restart, applies the configuration settings and restarts the apps if necessary. The default + // is false, which always restarts and reprovisions the apps + SoftRestart *bool +} + +// PlansClientUpdateOptions contains the optional parameters for the PlansClient.Update method. +type PlansClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// PlansClientUpdateVnetGatewayOptions contains the optional parameters for the PlansClient.UpdateVnetGateway method. +type PlansClientUpdateVnetGatewayOptions struct { + // placeholder for future optional parameters +} + +// PlansClientUpdateVnetRouteOptions contains the optional parameters for the PlansClient.UpdateVnetRoute method. +type PlansClientUpdateVnetRouteOptions struct { + // placeholder for future optional parameters +} + +// ProviderClientGetAvailableStacksOnPremOptions contains the optional parameters for the ProviderClient.NewGetAvailableStacksOnPremPager +// method. +type ProviderClientGetAvailableStacksOnPremOptions struct { + OSTypeSelected *ProviderOsTypeSelected +} + +// ProviderClientGetAvailableStacksOptions contains the optional parameters for the ProviderClient.NewGetAvailableStacksPager +// method. +type ProviderClientGetAvailableStacksOptions struct { + OSTypeSelected *ProviderOsTypeSelected +} + +// ProviderClientGetFunctionAppStacksForLocationOptions contains the optional parameters for the ProviderClient.NewGetFunctionAppStacksForLocationPager +// method. +type ProviderClientGetFunctionAppStacksForLocationOptions struct { + // Stack OS Type + StackOsType *ProviderStackOsType +} + +// ProviderClientGetFunctionAppStacksOptions contains the optional parameters for the ProviderClient.NewGetFunctionAppStacksPager +// method. +type ProviderClientGetFunctionAppStacksOptions struct { + // Stack OS Type + StackOsType *ProviderStackOsType +} + +// ProviderClientGetWebAppStacksForLocationOptions contains the optional parameters for the ProviderClient.NewGetWebAppStacksForLocationPager +// method. +type ProviderClientGetWebAppStacksForLocationOptions struct { + // Stack OS Type + StackOsType *ProviderStackOsType +} + +// ProviderClientGetWebAppStacksOptions contains the optional parameters for the ProviderClient.NewGetWebAppStacksPager method. +type ProviderClientGetWebAppStacksOptions struct { + // Stack OS Type + StackOsType *ProviderStackOsType +} + +// ProviderClientListOperationsOptions contains the optional parameters for the ProviderClient.NewListOperationsPager method. +type ProviderClientListOperationsOptions struct { + // placeholder for future optional parameters +} + +// RecommendationsClientDisableAllForHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.DisableAllForHostingEnvironment +// method. +type RecommendationsClientDisableAllForHostingEnvironmentOptions struct { + // placeholder for future optional parameters +} + +// RecommendationsClientDisableAllForWebAppOptions contains the optional parameters for the RecommendationsClient.DisableAllForWebApp +// method. +type RecommendationsClientDisableAllForWebAppOptions struct { + // placeholder for future optional parameters +} + +// RecommendationsClientDisableRecommendationForHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.DisableRecommendationForHostingEnvironment +// method. +type RecommendationsClientDisableRecommendationForHostingEnvironmentOptions struct { + // placeholder for future optional parameters +} + +// RecommendationsClientDisableRecommendationForSiteOptions contains the optional parameters for the RecommendationsClient.DisableRecommendationForSite +// method. +type RecommendationsClientDisableRecommendationForSiteOptions struct { + // placeholder for future optional parameters +} + +// RecommendationsClientDisableRecommendationForSubscriptionOptions contains the optional parameters for the RecommendationsClient.DisableRecommendationForSubscription +// method. +type RecommendationsClientDisableRecommendationForSubscriptionOptions struct { + // placeholder for future optional parameters +} + +// RecommendationsClientGetRuleDetailsByHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.GetRuleDetailsByHostingEnvironment +// method. +type RecommendationsClientGetRuleDetailsByHostingEnvironmentOptions struct { + // The GUID of the recommendation object if you query an expired one. You don't need to specify it to query an active entry. + RecommendationID *string + + // Specify true to update the last-seen timestamp of the recommendation object. + UpdateSeen *bool +} + +// RecommendationsClientGetRuleDetailsByWebAppOptions contains the optional parameters for the RecommendationsClient.GetRuleDetailsByWebApp +// method. +type RecommendationsClientGetRuleDetailsByWebAppOptions struct { + // The GUID of the recommendation object if you query an expired one. You don't need to specify it to query an active entry. + RecommendationID *string + + // Specify true to update the last-seen timestamp of the recommendation object. + UpdateSeen *bool +} + +// RecommendationsClientListHistoryForHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.NewListHistoryForHostingEnvironmentPager +// method. +type RecommendationsClientListHistoryForHostingEnvironmentOptions struct { + // Specify false to return all recommendations. The default is true, which returns only expired recommendations. + ExpiredOnly *bool + + // Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification' and startTime + // eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + // duration'[PT1H|PT1M|P1D] + Filter *string +} + +// RecommendationsClientListHistoryForWebAppOptions contains the optional parameters for the RecommendationsClient.NewListHistoryForWebAppPager +// method. +type RecommendationsClientListHistoryForWebAppOptions struct { + // Specify false to return all recommendations. The default is true, which returns only expired recommendations. + ExpiredOnly *bool + + // Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification' and startTime + // eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + // duration'[PT1H|PT1M|P1D] + Filter *string +} + +// RecommendationsClientListOptions contains the optional parameters for the RecommendationsClient.NewListPager method. +type RecommendationsClientListOptions struct { + // Specify true to return only the most critical recommendations. The default is false, which returns all recommendations. + Featured *bool + + // Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification' and startTime + // eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + // duration'[PT1H|PT1M|P1D] + Filter *string +} + +// RecommendationsClientListRecommendedRulesForHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.NewListRecommendedRulesForHostingEnvironmentPager +// method. +type RecommendationsClientListRecommendedRulesForHostingEnvironmentOptions struct { + // Specify true to return only the most critical recommendations. The default is false, which returns all recommendations. + Featured *bool + + // Return only channels specified in the filter. Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' + // or channel eq 'Notification' + Filter *string +} + +// RecommendationsClientListRecommendedRulesForWebAppOptions contains the optional parameters for the RecommendationsClient.NewListRecommendedRulesForWebAppPager +// method. +type RecommendationsClientListRecommendedRulesForWebAppOptions struct { + // Specify true to return only the most critical recommendations. The default is false, which returns all recommendations. + Featured *bool + + // Return only channels specified in the filter. Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' + // or channel eq 'Notification' + Filter *string +} + +// RecommendationsClientResetAllFiltersForHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.ResetAllFiltersForHostingEnvironment +// method. +type RecommendationsClientResetAllFiltersForHostingEnvironmentOptions struct { + // placeholder for future optional parameters +} + +// RecommendationsClientResetAllFiltersForWebAppOptions contains the optional parameters for the RecommendationsClient.ResetAllFiltersForWebApp +// method. +type RecommendationsClientResetAllFiltersForWebAppOptions struct { + // placeholder for future optional parameters +} + +// RecommendationsClientResetAllFiltersOptions contains the optional parameters for the RecommendationsClient.ResetAllFilters +// method. +type RecommendationsClientResetAllFiltersOptions struct { + // placeholder for future optional parameters +} + +// ResourceHealthMetadataClientGetBySiteOptions contains the optional parameters for the ResourceHealthMetadataClient.GetBySite +// method. +type ResourceHealthMetadataClientGetBySiteOptions struct { + // placeholder for future optional parameters +} + +// ResourceHealthMetadataClientGetBySiteSlotOptions contains the optional parameters for the ResourceHealthMetadataClient.GetBySiteSlot +// method. +type ResourceHealthMetadataClientGetBySiteSlotOptions struct { + // placeholder for future optional parameters +} + +// ResourceHealthMetadataClientListByResourceGroupOptions contains the optional parameters for the ResourceHealthMetadataClient.NewListByResourceGroupPager +// method. +type ResourceHealthMetadataClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// ResourceHealthMetadataClientListBySiteOptions contains the optional parameters for the ResourceHealthMetadataClient.NewListBySitePager +// method. +type ResourceHealthMetadataClientListBySiteOptions struct { + // placeholder for future optional parameters +} + +// ResourceHealthMetadataClientListBySiteSlotOptions contains the optional parameters for the ResourceHealthMetadataClient.NewListBySiteSlotPager +// method. +type ResourceHealthMetadataClientListBySiteSlotOptions struct { + // placeholder for future optional parameters +} + +// ResourceHealthMetadataClientListOptions contains the optional parameters for the ResourceHealthMetadataClient.NewListPager +// method. +type ResourceHealthMetadataClientListOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientBeginApproveOrRejectPrivateEndpointConnectionOptions contains the optional parameters for the StaticSitesClient.BeginApproveOrRejectPrivateEndpointConnection +// method. +type StaticSitesClientBeginApproveOrRejectPrivateEndpointConnectionOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StaticSitesClientBeginCreateOrUpdateStaticSiteCustomDomainOptions contains the optional parameters for the StaticSitesClient.BeginCreateOrUpdateStaticSiteCustomDomain +// method. +type StaticSitesClientBeginCreateOrUpdateStaticSiteCustomDomainOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StaticSitesClientBeginCreateOrUpdateStaticSiteOptions contains the optional parameters for the StaticSitesClient.BeginCreateOrUpdateStaticSite +// method. +type StaticSitesClientBeginCreateOrUpdateStaticSiteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StaticSitesClientBeginCreateZipDeploymentForStaticSiteBuildOptions contains the optional parameters for the StaticSitesClient.BeginCreateZipDeploymentForStaticSiteBuild +// method. +type StaticSitesClientBeginCreateZipDeploymentForStaticSiteBuildOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StaticSitesClientBeginCreateZipDeploymentForStaticSiteOptions contains the optional parameters for the StaticSitesClient.BeginCreateZipDeploymentForStaticSite +// method. +type StaticSitesClientBeginCreateZipDeploymentForStaticSiteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StaticSitesClientBeginDeletePrivateEndpointConnectionOptions contains the optional parameters for the StaticSitesClient.BeginDeletePrivateEndpointConnection +// method. +type StaticSitesClientBeginDeletePrivateEndpointConnectionOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StaticSitesClientBeginDeleteStaticSiteBuildOptions contains the optional parameters for the StaticSitesClient.BeginDeleteStaticSiteBuild +// method. +type StaticSitesClientBeginDeleteStaticSiteBuildOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StaticSitesClientBeginDeleteStaticSiteCustomDomainOptions contains the optional parameters for the StaticSitesClient.BeginDeleteStaticSiteCustomDomain +// method. +type StaticSitesClientBeginDeleteStaticSiteCustomDomainOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StaticSitesClientBeginDeleteStaticSiteOptions contains the optional parameters for the StaticSitesClient.BeginDeleteStaticSite +// method. +type StaticSitesClientBeginDeleteStaticSiteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StaticSitesClientBeginDetachStaticSiteOptions contains the optional parameters for the StaticSitesClient.BeginDetachStaticSite +// method. +type StaticSitesClientBeginDetachStaticSiteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StaticSitesClientBeginLinkBackendOptions contains the optional parameters for the StaticSitesClient.BeginLinkBackend method. +type StaticSitesClientBeginLinkBackendOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StaticSitesClientBeginLinkBackendToBuildOptions contains the optional parameters for the StaticSitesClient.BeginLinkBackendToBuild +// method. +type StaticSitesClientBeginLinkBackendToBuildOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteBuildOptions contains the optional parameters for the +// StaticSitesClient.BeginRegisterUserProvidedFunctionAppWithStaticSiteBuild method. +type StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteBuildOptions struct { + // Specify true to force the update of the auth configuration on the function app even if an AzureStaticWebApps provider is + // already configured on the function app. The default is false. + IsForced *bool + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteOptions contains the optional parameters for the StaticSitesClient.BeginRegisterUserProvidedFunctionAppWithStaticSite +// method. +type StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteOptions struct { + // Specify true to force the update of the auth configuration on the function app even if an AzureStaticWebApps provider is + // already configured on the function app. The default is false. + IsForced *bool + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StaticSitesClientBeginValidateBackendForBuildOptions contains the optional parameters for the StaticSitesClient.BeginValidateBackendForBuild +// method. +type StaticSitesClientBeginValidateBackendForBuildOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StaticSitesClientBeginValidateBackendOptions contains the optional parameters for the StaticSitesClient.BeginValidateBackend +// method. +type StaticSitesClientBeginValidateBackendOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StaticSitesClientBeginValidateCustomDomainCanBeAddedToStaticSiteOptions contains the optional parameters for the StaticSitesClient.BeginValidateCustomDomainCanBeAddedToStaticSite +// method. +type StaticSitesClientBeginValidateCustomDomainCanBeAddedToStaticSiteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// StaticSitesClientCreateOrUpdateBasicAuthOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateBasicAuth +// method. +type StaticSitesClientCreateOrUpdateBasicAuthOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientCreateOrUpdateBuildDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateBuildDatabaseConnection +// method. +type StaticSitesClientCreateOrUpdateBuildDatabaseConnectionOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientCreateOrUpdateDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateDatabaseConnection +// method. +type StaticSitesClientCreateOrUpdateDatabaseConnectionOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientCreateOrUpdateStaticSiteAppSettingsOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateStaticSiteAppSettings +// method. +type StaticSitesClientCreateOrUpdateStaticSiteAppSettingsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateStaticSiteBuildAppSettings +// method. +type StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateStaticSiteBuildFunctionAppSettings +// method. +type StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateStaticSiteFunctionAppSettings +// method. +type StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientCreateUserRolesInvitationLinkOptions contains the optional parameters for the StaticSitesClient.CreateUserRolesInvitationLink +// method. +type StaticSitesClientCreateUserRolesInvitationLinkOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientDeleteBuildDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.DeleteBuildDatabaseConnection +// method. +type StaticSitesClientDeleteBuildDatabaseConnectionOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientDeleteDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.DeleteDatabaseConnection +// method. +type StaticSitesClientDeleteDatabaseConnectionOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientDeleteStaticSiteUserOptions contains the optional parameters for the StaticSitesClient.DeleteStaticSiteUser +// method. +type StaticSitesClientDeleteStaticSiteUserOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildOptions contains the optional parameters for the StaticSitesClient.DetachUserProvidedFunctionAppFromStaticSiteBuild +// method. +type StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteOptions contains the optional parameters for the StaticSitesClient.DetachUserProvidedFunctionAppFromStaticSite +// method. +type StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetBasicAuthOptions contains the optional parameters for the StaticSitesClient.GetBasicAuth method. +type StaticSitesClientGetBasicAuthOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetBuildDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.GetBuildDatabaseConnection +// method. +type StaticSitesClientGetBuildDatabaseConnectionOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetBuildDatabaseConnectionWithDetailsOptions contains the optional parameters for the StaticSitesClient.GetBuildDatabaseConnectionWithDetails +// method. +type StaticSitesClientGetBuildDatabaseConnectionWithDetailsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetBuildDatabaseConnectionsOptions contains the optional parameters for the StaticSitesClient.NewGetBuildDatabaseConnectionsPager +// method. +type StaticSitesClientGetBuildDatabaseConnectionsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetBuildDatabaseConnectionsWithDetailsOptions contains the optional parameters for the StaticSitesClient.NewGetBuildDatabaseConnectionsWithDetailsPager +// method. +type StaticSitesClientGetBuildDatabaseConnectionsWithDetailsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.GetDatabaseConnection +// method. +type StaticSitesClientGetDatabaseConnectionOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetDatabaseConnectionWithDetailsOptions contains the optional parameters for the StaticSitesClient.GetDatabaseConnectionWithDetails +// method. +type StaticSitesClientGetDatabaseConnectionWithDetailsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetDatabaseConnectionsOptions contains the optional parameters for the StaticSitesClient.NewGetDatabaseConnectionsPager +// method. +type StaticSitesClientGetDatabaseConnectionsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetDatabaseConnectionsWithDetailsOptions contains the optional parameters for the StaticSitesClient.NewGetDatabaseConnectionsWithDetailsPager +// method. +type StaticSitesClientGetDatabaseConnectionsWithDetailsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetLinkedBackendForBuildOptions contains the optional parameters for the StaticSitesClient.GetLinkedBackendForBuild +// method. +type StaticSitesClientGetLinkedBackendForBuildOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetLinkedBackendOptions contains the optional parameters for the StaticSitesClient.GetLinkedBackend method. +type StaticSitesClientGetLinkedBackendOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetLinkedBackendsForBuildOptions contains the optional parameters for the StaticSitesClient.NewGetLinkedBackendsForBuildPager +// method. +type StaticSitesClientGetLinkedBackendsForBuildOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetLinkedBackendsOptions contains the optional parameters for the StaticSitesClient.NewGetLinkedBackendsPager +// method. +type StaticSitesClientGetLinkedBackendsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetPrivateEndpointConnectionListOptions contains the optional parameters for the StaticSitesClient.NewGetPrivateEndpointConnectionListPager +// method. +type StaticSitesClientGetPrivateEndpointConnectionListOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetPrivateEndpointConnectionOptions contains the optional parameters for the StaticSitesClient.GetPrivateEndpointConnection +// method. +type StaticSitesClientGetPrivateEndpointConnectionOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetPrivateLinkResourcesOptions contains the optional parameters for the StaticSitesClient.GetPrivateLinkResources +// method. +type StaticSitesClientGetPrivateLinkResourcesOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetStaticSiteBuildOptions contains the optional parameters for the StaticSitesClient.GetStaticSiteBuild +// method. +type StaticSitesClientGetStaticSiteBuildOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetStaticSiteBuildsOptions contains the optional parameters for the StaticSitesClient.NewGetStaticSiteBuildsPager +// method. +type StaticSitesClientGetStaticSiteBuildsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetStaticSiteCustomDomainOptions contains the optional parameters for the StaticSitesClient.GetStaticSiteCustomDomain +// method. +type StaticSitesClientGetStaticSiteCustomDomainOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetStaticSiteOptions contains the optional parameters for the StaticSitesClient.GetStaticSite method. +type StaticSitesClientGetStaticSiteOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetStaticSitesByResourceGroupOptions contains the optional parameters for the StaticSitesClient.NewGetStaticSitesByResourceGroupPager +// method. +type StaticSitesClientGetStaticSitesByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildOptions contains the optional parameters for the StaticSitesClient.GetUserProvidedFunctionAppForStaticSiteBuild +// method. +type StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetUserProvidedFunctionAppForStaticSiteOptions contains the optional parameters for the StaticSitesClient.GetUserProvidedFunctionAppForStaticSite +// method. +type StaticSitesClientGetUserProvidedFunctionAppForStaticSiteOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildOptions contains the optional parameters for the StaticSitesClient.NewGetUserProvidedFunctionAppsForStaticSiteBuildPager +// method. +type StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteOptions contains the optional parameters for the StaticSitesClient.NewGetUserProvidedFunctionAppsForStaticSitePager +// method. +type StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientListBasicAuthOptions contains the optional parameters for the StaticSitesClient.NewListBasicAuthPager +// method. +type StaticSitesClientListBasicAuthOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientListOptions contains the optional parameters for the StaticSitesClient.NewListPager method. +type StaticSitesClientListOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientListStaticSiteAppSettingsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteAppSettings +// method. +type StaticSitesClientListStaticSiteAppSettingsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientListStaticSiteBuildAppSettingsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteBuildAppSettings +// method. +type StaticSitesClientListStaticSiteBuildAppSettingsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientListStaticSiteBuildFunctionAppSettingsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteBuildFunctionAppSettings +// method. +type StaticSitesClientListStaticSiteBuildFunctionAppSettingsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientListStaticSiteBuildFunctionsOptions contains the optional parameters for the StaticSitesClient.NewListStaticSiteBuildFunctionsPager +// method. +type StaticSitesClientListStaticSiteBuildFunctionsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientListStaticSiteConfiguredRolesOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteConfiguredRoles +// method. +type StaticSitesClientListStaticSiteConfiguredRolesOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientListStaticSiteCustomDomainsOptions contains the optional parameters for the StaticSitesClient.NewListStaticSiteCustomDomainsPager +// method. +type StaticSitesClientListStaticSiteCustomDomainsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientListStaticSiteFunctionAppSettingsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteFunctionAppSettings +// method. +type StaticSitesClientListStaticSiteFunctionAppSettingsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientListStaticSiteFunctionsOptions contains the optional parameters for the StaticSitesClient.NewListStaticSiteFunctionsPager +// method. +type StaticSitesClientListStaticSiteFunctionsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientListStaticSiteSecretsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteSecrets +// method. +type StaticSitesClientListStaticSiteSecretsOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientListStaticSiteUsersOptions contains the optional parameters for the StaticSitesClient.NewListStaticSiteUsersPager +// method. +type StaticSitesClientListStaticSiteUsersOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientPreviewWorkflowOptions contains the optional parameters for the StaticSitesClient.PreviewWorkflow method. +type StaticSitesClientPreviewWorkflowOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientResetStaticSiteAPIKeyOptions contains the optional parameters for the StaticSitesClient.ResetStaticSiteAPIKey +// method. +type StaticSitesClientResetStaticSiteAPIKeyOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientUnlinkBackendFromBuildOptions contains the optional parameters for the StaticSitesClient.UnlinkBackendFromBuild +// method. +type StaticSitesClientUnlinkBackendFromBuildOptions struct { + // Decides if auth will be removed from backend configuration + IsCleaningAuthConfig *bool +} + +// StaticSitesClientUnlinkBackendOptions contains the optional parameters for the StaticSitesClient.UnlinkBackend method. +type StaticSitesClientUnlinkBackendOptions struct { + // Decides if Easy Auth configuration will be removed from backend configuration + IsCleaningAuthConfig *bool +} + +// StaticSitesClientUpdateBuildDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.UpdateBuildDatabaseConnection +// method. +type StaticSitesClientUpdateBuildDatabaseConnectionOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientUpdateDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.UpdateDatabaseConnection +// method. +type StaticSitesClientUpdateDatabaseConnectionOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientUpdateStaticSiteOptions contains the optional parameters for the StaticSitesClient.UpdateStaticSite method. +type StaticSitesClientUpdateStaticSiteOptions struct { + // placeholder for future optional parameters +} + +// StaticSitesClientUpdateStaticSiteUserOptions contains the optional parameters for the StaticSitesClient.UpdateStaticSiteUser +// method. +type StaticSitesClientUpdateStaticSiteUserOptions struct { + // placeholder for future optional parameters +} + +// TopLevelDomainsClientGetOptions contains the optional parameters for the TopLevelDomainsClient.Get method. +type TopLevelDomainsClientGetOptions struct { + // placeholder for future optional parameters +} + +// TopLevelDomainsClientListAgreementsOptions contains the optional parameters for the TopLevelDomainsClient.NewListAgreementsPager +// method. +type TopLevelDomainsClientListAgreementsOptions struct { + // placeholder for future optional parameters +} + +// TopLevelDomainsClientListOptions contains the optional parameters for the TopLevelDomainsClient.NewListPager method. +type TopLevelDomainsClientListOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientAddPremierAddOnOptions contains the optional parameters for the WebAppsClient.AddPremierAddOn method. +type WebAppsClientAddPremierAddOnOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientAddPremierAddOnSlotOptions contains the optional parameters for the WebAppsClient.AddPremierAddOnSlot method. +type WebAppsClientAddPremierAddOnSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientAnalyzeCustomHostnameOptions contains the optional parameters for the WebAppsClient.AnalyzeCustomHostname +// method. +type WebAppsClientAnalyzeCustomHostnameOptions struct { + // Custom hostname. + HostName *string +} + +// WebAppsClientAnalyzeCustomHostnameSlotOptions contains the optional parameters for the WebAppsClient.AnalyzeCustomHostnameSlot +// method. +type WebAppsClientAnalyzeCustomHostnameSlotOptions struct { + // Custom hostname. + HostName *string +} + +// WebAppsClientApplySlotConfigToProductionOptions contains the optional parameters for the WebAppsClient.ApplySlotConfigToProduction +// method. +type WebAppsClientApplySlotConfigToProductionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientApplySlotConfigurationSlotOptions contains the optional parameters for the WebAppsClient.ApplySlotConfigurationSlot +// method. +type WebAppsClientApplySlotConfigurationSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientBackupOptions contains the optional parameters for the WebAppsClient.Backup method. +type WebAppsClientBackupOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientBackupSlotOptions contains the optional parameters for the WebAppsClient.BackupSlot method. +type WebAppsClientBackupSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionOptions contains the optional parameters for the WebAppsClient.BeginApproveOrRejectPrivateEndpointConnection +// method. +type WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionSlotOptions contains the optional parameters for the WebAppsClient.BeginApproveOrRejectPrivateEndpointConnectionSlot +// method. +type WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionSlotOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginCreateFunctionOptions contains the optional parameters for the WebAppsClient.BeginCreateFunction method. +type WebAppsClientBeginCreateFunctionOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginCreateInstanceFunctionSlotOptions contains the optional parameters for the WebAppsClient.BeginCreateInstanceFunctionSlot +// method. +type WebAppsClientBeginCreateInstanceFunctionSlotOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginCreateInstanceMSDeployOperationOptions contains the optional parameters for the WebAppsClient.BeginCreateInstanceMSDeployOperation +// method. +type WebAppsClientBeginCreateInstanceMSDeployOperationOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginCreateInstanceMSDeployOperationSlotOptions contains the optional parameters for the WebAppsClient.BeginCreateInstanceMSDeployOperationSlot +// method. +type WebAppsClientBeginCreateInstanceMSDeployOperationSlotOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginCreateMSDeployOperationOptions contains the optional parameters for the WebAppsClient.BeginCreateMSDeployOperation +// method. +type WebAppsClientBeginCreateMSDeployOperationOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginCreateMSDeployOperationSlotOptions contains the optional parameters for the WebAppsClient.BeginCreateMSDeployOperationSlot +// method. +type WebAppsClientBeginCreateMSDeployOperationSlotOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginCreateOrUpdateOptions contains the optional parameters for the WebAppsClient.BeginCreateOrUpdate method. +type WebAppsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginCreateOrUpdateSlotOptions contains the optional parameters for the WebAppsClient.BeginCreateOrUpdateSlot +// method. +type WebAppsClientBeginCreateOrUpdateSlotOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginCreateOrUpdateSourceControlOptions contains the optional parameters for the WebAppsClient.BeginCreateOrUpdateSourceControl +// method. +type WebAppsClientBeginCreateOrUpdateSourceControlOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginCreateOrUpdateSourceControlSlotOptions contains the optional parameters for the WebAppsClient.BeginCreateOrUpdateSourceControlSlot +// method. +type WebAppsClientBeginCreateOrUpdateSourceControlSlotOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginDeletePrivateEndpointConnectionOptions contains the optional parameters for the WebAppsClient.BeginDeletePrivateEndpointConnection +// method. +type WebAppsClientBeginDeletePrivateEndpointConnectionOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginDeletePrivateEndpointConnectionSlotOptions contains the optional parameters for the WebAppsClient.BeginDeletePrivateEndpointConnectionSlot +// method. +type WebAppsClientBeginDeletePrivateEndpointConnectionSlotOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginGetProductionSiteDeploymentStatusOptions contains the optional parameters for the WebAppsClient.BeginGetProductionSiteDeploymentStatus +// method. +type WebAppsClientBeginGetProductionSiteDeploymentStatusOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginGetSlotSiteDeploymentStatusSlotOptions contains the optional parameters for the WebAppsClient.BeginGetSlotSiteDeploymentStatusSlot +// method. +type WebAppsClientBeginGetSlotSiteDeploymentStatusSlotOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginInstallSiteExtensionOptions contains the optional parameters for the WebAppsClient.BeginInstallSiteExtension +// method. +type WebAppsClientBeginInstallSiteExtensionOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginInstallSiteExtensionSlotOptions contains the optional parameters for the WebAppsClient.BeginInstallSiteExtensionSlot +// method. +type WebAppsClientBeginInstallSiteExtensionSlotOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginListPublishingCredentialsOptions contains the optional parameters for the WebAppsClient.BeginListPublishingCredentials +// method. +type WebAppsClientBeginListPublishingCredentialsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginListPublishingCredentialsSlotOptions contains the optional parameters for the WebAppsClient.BeginListPublishingCredentialsSlot +// method. +type WebAppsClientBeginListPublishingCredentialsSlotOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginMigrateMySQLOptions contains the optional parameters for the WebAppsClient.BeginMigrateMySQL method. +type WebAppsClientBeginMigrateMySQLOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginMigrateStorageOptions contains the optional parameters for the WebAppsClient.BeginMigrateStorage method. +type WebAppsClientBeginMigrateStorageOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginRestoreFromBackupBlobOptions contains the optional parameters for the WebAppsClient.BeginRestoreFromBackupBlob +// method. +type WebAppsClientBeginRestoreFromBackupBlobOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginRestoreFromBackupBlobSlotOptions contains the optional parameters for the WebAppsClient.BeginRestoreFromBackupBlobSlot +// method. +type WebAppsClientBeginRestoreFromBackupBlobSlotOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginRestoreFromDeletedAppOptions contains the optional parameters for the WebAppsClient.BeginRestoreFromDeletedApp +// method. +type WebAppsClientBeginRestoreFromDeletedAppOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginRestoreFromDeletedAppSlotOptions contains the optional parameters for the WebAppsClient.BeginRestoreFromDeletedAppSlot +// method. +type WebAppsClientBeginRestoreFromDeletedAppSlotOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginRestoreOptions contains the optional parameters for the WebAppsClient.BeginRestore method. +type WebAppsClientBeginRestoreOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginRestoreSlotOptions contains the optional parameters for the WebAppsClient.BeginRestoreSlot method. +type WebAppsClientBeginRestoreSlotOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginRestoreSnapshotOptions contains the optional parameters for the WebAppsClient.BeginRestoreSnapshot method. +type WebAppsClientBeginRestoreSnapshotOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginRestoreSnapshotSlotOptions contains the optional parameters for the WebAppsClient.BeginRestoreSnapshotSlot +// method. +type WebAppsClientBeginRestoreSnapshotSlotOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginStartNetworkTraceOptions contains the optional parameters for the WebAppsClient.BeginStartNetworkTrace +// method. +type WebAppsClientBeginStartNetworkTraceOptions struct { + // The duration to keep capturing in seconds. + DurationInSeconds *int32 + + // The maximum frame length in bytes (Optional). + MaxFrameLength *int32 + + // Resumes the LRO from the provided token. + ResumeToken string + + // The Blob URL to store capture file. + SasURL *string +} + +// WebAppsClientBeginStartNetworkTraceSlotOptions contains the optional parameters for the WebAppsClient.BeginStartNetworkTraceSlot +// method. +type WebAppsClientBeginStartNetworkTraceSlotOptions struct { + // The duration to keep capturing in seconds. + DurationInSeconds *int32 + + // The maximum frame length in bytes (Optional). + MaxFrameLength *int32 + + // Resumes the LRO from the provided token. + ResumeToken string + + // The Blob URL to store capture file. + SasURL *string +} + +// WebAppsClientBeginStartWebSiteNetworkTraceOperationOptions contains the optional parameters for the WebAppsClient.BeginStartWebSiteNetworkTraceOperation +// method. +type WebAppsClientBeginStartWebSiteNetworkTraceOperationOptions struct { + // The duration to keep capturing in seconds. + DurationInSeconds *int32 + + // The maximum frame length in bytes (Optional). + MaxFrameLength *int32 + + // Resumes the LRO from the provided token. + ResumeToken string + + // The Blob URL to store capture file. + SasURL *string +} + +// WebAppsClientBeginStartWebSiteNetworkTraceOperationSlotOptions contains the optional parameters for the WebAppsClient.BeginStartWebSiteNetworkTraceOperationSlot +// method. +type WebAppsClientBeginStartWebSiteNetworkTraceOperationSlotOptions struct { + // The duration to keep capturing in seconds. + DurationInSeconds *int32 + + // The maximum frame length in bytes (Optional). + MaxFrameLength *int32 + + // Resumes the LRO from the provided token. + ResumeToken string + + // The Blob URL to store capture file. + SasURL *string +} + +// WebAppsClientBeginSwapSlotOptions contains the optional parameters for the WebAppsClient.BeginSwapSlot method. +type WebAppsClientBeginSwapSlotOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientBeginSwapSlotWithProductionOptions contains the optional parameters for the WebAppsClient.BeginSwapSlotWithProduction +// method. +type WebAppsClientBeginSwapSlotWithProductionOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebAppsClientCreateDeploymentOptions contains the optional parameters for the WebAppsClient.CreateDeployment method. +type WebAppsClientCreateDeploymentOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateDeploymentSlotOptions contains the optional parameters for the WebAppsClient.CreateDeploymentSlot method. +type WebAppsClientCreateDeploymentSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOneDeployOperationOptions contains the optional parameters for the WebAppsClient.CreateOneDeployOperation +// method. +type WebAppsClientCreateOneDeployOperationOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateConfigurationOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateConfiguration +// method. +type WebAppsClientCreateOrUpdateConfigurationOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateConfigurationSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateConfigurationSlot +// method. +type WebAppsClientCreateOrUpdateConfigurationSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateDomainOwnershipIdentifierOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateDomainOwnershipIdentifier +// method. +type WebAppsClientCreateOrUpdateDomainOwnershipIdentifierOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateDomainOwnershipIdentifierSlot +// method. +type WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateFunctionSecretOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateFunctionSecret +// method. +type WebAppsClientCreateOrUpdateFunctionSecretOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateFunctionSecretSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateFunctionSecretSlot +// method. +type WebAppsClientCreateOrUpdateFunctionSecretSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateHostNameBindingOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHostNameBinding +// method. +type WebAppsClientCreateOrUpdateHostNameBindingOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateHostNameBindingSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHostNameBindingSlot +// method. +type WebAppsClientCreateOrUpdateHostNameBindingSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateHostSecretOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHostSecret +// method. +type WebAppsClientCreateOrUpdateHostSecretOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateHostSecretSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHostSecretSlot +// method. +type WebAppsClientCreateOrUpdateHostSecretSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateHybridConnectionOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHybridConnection +// method. +type WebAppsClientCreateOrUpdateHybridConnectionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateHybridConnectionSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHybridConnectionSlot +// method. +type WebAppsClientCreateOrUpdateHybridConnectionSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdatePublicCertificateOptions contains the optional parameters for the WebAppsClient.CreateOrUpdatePublicCertificate +// method. +type WebAppsClientCreateOrUpdatePublicCertificateOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdatePublicCertificateSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdatePublicCertificateSlot +// method. +type WebAppsClientCreateOrUpdatePublicCertificateSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateRelayServiceConnectionOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateRelayServiceConnection +// method. +type WebAppsClientCreateOrUpdateRelayServiceConnectionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateRelayServiceConnectionSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateRelayServiceConnectionSlot +// method. +type WebAppsClientCreateOrUpdateRelayServiceConnectionSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck +// method. +type WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot +// method. +type WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateVnetConnectionGatewayOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateVnetConnectionGateway +// method. +type WebAppsClientCreateOrUpdateVnetConnectionGatewayOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateVnetConnectionGatewaySlot +// method. +type WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateVnetConnectionOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateVnetConnection +// method. +type WebAppsClientCreateOrUpdateVnetConnectionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientCreateOrUpdateVnetConnectionSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateVnetConnectionSlot +// method. +type WebAppsClientCreateOrUpdateVnetConnectionSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteBackupConfigurationOptions contains the optional parameters for the WebAppsClient.DeleteBackupConfiguration +// method. +type WebAppsClientDeleteBackupConfigurationOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteBackupConfigurationSlotOptions contains the optional parameters for the WebAppsClient.DeleteBackupConfigurationSlot +// method. +type WebAppsClientDeleteBackupConfigurationSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteBackupOptions contains the optional parameters for the WebAppsClient.DeleteBackup method. +type WebAppsClientDeleteBackupOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteBackupSlotOptions contains the optional parameters for the WebAppsClient.DeleteBackupSlot method. +type WebAppsClientDeleteBackupSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteContinuousWebJobOptions contains the optional parameters for the WebAppsClient.DeleteContinuousWebJob +// method. +type WebAppsClientDeleteContinuousWebJobOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteContinuousWebJobSlotOptions contains the optional parameters for the WebAppsClient.DeleteContinuousWebJobSlot +// method. +type WebAppsClientDeleteContinuousWebJobSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteDeploymentOptions contains the optional parameters for the WebAppsClient.DeleteDeployment method. +type WebAppsClientDeleteDeploymentOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteDeploymentSlotOptions contains the optional parameters for the WebAppsClient.DeleteDeploymentSlot method. +type WebAppsClientDeleteDeploymentSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteDomainOwnershipIdentifierOptions contains the optional parameters for the WebAppsClient.DeleteDomainOwnershipIdentifier +// method. +type WebAppsClientDeleteDomainOwnershipIdentifierOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteDomainOwnershipIdentifierSlotOptions contains the optional parameters for the WebAppsClient.DeleteDomainOwnershipIdentifierSlot +// method. +type WebAppsClientDeleteDomainOwnershipIdentifierSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteFunctionOptions contains the optional parameters for the WebAppsClient.DeleteFunction method. +type WebAppsClientDeleteFunctionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteFunctionSecretOptions contains the optional parameters for the WebAppsClient.DeleteFunctionSecret method. +type WebAppsClientDeleteFunctionSecretOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteFunctionSecretSlotOptions contains the optional parameters for the WebAppsClient.DeleteFunctionSecretSlot +// method. +type WebAppsClientDeleteFunctionSecretSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteHostNameBindingOptions contains the optional parameters for the WebAppsClient.DeleteHostNameBinding +// method. +type WebAppsClientDeleteHostNameBindingOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteHostNameBindingSlotOptions contains the optional parameters for the WebAppsClient.DeleteHostNameBindingSlot +// method. +type WebAppsClientDeleteHostNameBindingSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteHostSecretOptions contains the optional parameters for the WebAppsClient.DeleteHostSecret method. +type WebAppsClientDeleteHostSecretOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteHostSecretSlotOptions contains the optional parameters for the WebAppsClient.DeleteHostSecretSlot method. +type WebAppsClientDeleteHostSecretSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteHybridConnectionOptions contains the optional parameters for the WebAppsClient.DeleteHybridConnection +// method. +type WebAppsClientDeleteHybridConnectionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteHybridConnectionSlotOptions contains the optional parameters for the WebAppsClient.DeleteHybridConnectionSlot +// method. +type WebAppsClientDeleteHybridConnectionSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteInstanceFunctionSlotOptions contains the optional parameters for the WebAppsClient.DeleteInstanceFunctionSlot +// method. +type WebAppsClientDeleteInstanceFunctionSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteInstanceProcessOptions contains the optional parameters for the WebAppsClient.DeleteInstanceProcess +// method. +type WebAppsClientDeleteInstanceProcessOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteInstanceProcessSlotOptions contains the optional parameters for the WebAppsClient.DeleteInstanceProcessSlot +// method. +type WebAppsClientDeleteInstanceProcessSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteOptions contains the optional parameters for the WebAppsClient.Delete method. +type WebAppsClientDeleteOptions struct { + // Specify false if you want to keep empty App Service plan. By default, empty App Service plan is deleted. + DeleteEmptyServerFarm *bool + + // If true, web app metrics are also deleted. + DeleteMetrics *bool +} + +// WebAppsClientDeletePremierAddOnOptions contains the optional parameters for the WebAppsClient.DeletePremierAddOn method. +type WebAppsClientDeletePremierAddOnOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeletePremierAddOnSlotOptions contains the optional parameters for the WebAppsClient.DeletePremierAddOnSlot +// method. +type WebAppsClientDeletePremierAddOnSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteProcessOptions contains the optional parameters for the WebAppsClient.DeleteProcess method. +type WebAppsClientDeleteProcessOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteProcessSlotOptions contains the optional parameters for the WebAppsClient.DeleteProcessSlot method. +type WebAppsClientDeleteProcessSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeletePublicCertificateOptions contains the optional parameters for the WebAppsClient.DeletePublicCertificate +// method. +type WebAppsClientDeletePublicCertificateOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeletePublicCertificateSlotOptions contains the optional parameters for the WebAppsClient.DeletePublicCertificateSlot +// method. +type WebAppsClientDeletePublicCertificateSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteRelayServiceConnectionOptions contains the optional parameters for the WebAppsClient.DeleteRelayServiceConnection +// method. +type WebAppsClientDeleteRelayServiceConnectionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteRelayServiceConnectionSlotOptions contains the optional parameters for the WebAppsClient.DeleteRelayServiceConnectionSlot +// method. +type WebAppsClientDeleteRelayServiceConnectionSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteSiteExtensionOptions contains the optional parameters for the WebAppsClient.DeleteSiteExtension method. +type WebAppsClientDeleteSiteExtensionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteSiteExtensionSlotOptions contains the optional parameters for the WebAppsClient.DeleteSiteExtensionSlot +// method. +type WebAppsClientDeleteSiteExtensionSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteSlotOptions contains the optional parameters for the WebAppsClient.DeleteSlot method. +type WebAppsClientDeleteSlotOptions struct { + // Specify false if you want to keep empty App Service plan. By default, empty App Service plan is deleted. + DeleteEmptyServerFarm *bool + + // If true, web app metrics are also deleted. + DeleteMetrics *bool +} + +// WebAppsClientDeleteSourceControlOptions contains the optional parameters for the WebAppsClient.DeleteSourceControl method. +type WebAppsClientDeleteSourceControlOptions struct { + AdditionalFlags *string +} + +// WebAppsClientDeleteSourceControlSlotOptions contains the optional parameters for the WebAppsClient.DeleteSourceControlSlot +// method. +type WebAppsClientDeleteSourceControlSlotOptions struct { + AdditionalFlags *string +} + +// WebAppsClientDeleteSwiftVirtualNetworkOptions contains the optional parameters for the WebAppsClient.DeleteSwiftVirtualNetwork +// method. +type WebAppsClientDeleteSwiftVirtualNetworkOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteSwiftVirtualNetworkSlotOptions contains the optional parameters for the WebAppsClient.DeleteSwiftVirtualNetworkSlot +// method. +type WebAppsClientDeleteSwiftVirtualNetworkSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteTriggeredWebJobOptions contains the optional parameters for the WebAppsClient.DeleteTriggeredWebJob +// method. +type WebAppsClientDeleteTriggeredWebJobOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteTriggeredWebJobSlotOptions contains the optional parameters for the WebAppsClient.DeleteTriggeredWebJobSlot +// method. +type WebAppsClientDeleteTriggeredWebJobSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteVnetConnectionOptions contains the optional parameters for the WebAppsClient.DeleteVnetConnection method. +type WebAppsClientDeleteVnetConnectionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeleteVnetConnectionSlotOptions contains the optional parameters for the WebAppsClient.DeleteVnetConnectionSlot +// method. +type WebAppsClientDeleteVnetConnectionSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDeployWorkflowArtifactsOptions contains the optional parameters for the WebAppsClient.DeployWorkflowArtifacts +// method. +type WebAppsClientDeployWorkflowArtifactsOptions struct { + // Application settings and files of the workflow. + WorkflowArtifacts *WorkflowArtifacts +} + +// WebAppsClientDeployWorkflowArtifactsSlotOptions contains the optional parameters for the WebAppsClient.DeployWorkflowArtifactsSlot +// method. +type WebAppsClientDeployWorkflowArtifactsSlotOptions struct { + // Application settings and files of the workflow. + WorkflowArtifacts *WorkflowArtifacts +} + +// WebAppsClientDiscoverBackupOptions contains the optional parameters for the WebAppsClient.DiscoverBackup method. +type WebAppsClientDiscoverBackupOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientDiscoverBackupSlotOptions contains the optional parameters for the WebAppsClient.DiscoverBackupSlot method. +type WebAppsClientDiscoverBackupSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGenerateNewSitePublishingPasswordOptions contains the optional parameters for the WebAppsClient.GenerateNewSitePublishingPassword +// method. +type WebAppsClientGenerateNewSitePublishingPasswordOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGenerateNewSitePublishingPasswordSlotOptions contains the optional parameters for the WebAppsClient.GenerateNewSitePublishingPasswordSlot +// method. +type WebAppsClientGenerateNewSitePublishingPasswordSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetAppSettingKeyVaultReferenceOptions contains the optional parameters for the WebAppsClient.GetAppSettingKeyVaultReference +// method. +type WebAppsClientGetAppSettingKeyVaultReferenceOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetAppSettingKeyVaultReferenceSlotOptions contains the optional parameters for the WebAppsClient.GetAppSettingKeyVaultReferenceSlot +// method. +type WebAppsClientGetAppSettingKeyVaultReferenceSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetAppSettingsKeyVaultReferencesOptions contains the optional parameters for the WebAppsClient.NewGetAppSettingsKeyVaultReferencesPager +// method. +type WebAppsClientGetAppSettingsKeyVaultReferencesOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetAppSettingsKeyVaultReferencesSlotOptions contains the optional parameters for the WebAppsClient.NewGetAppSettingsKeyVaultReferencesSlotPager +// method. +type WebAppsClientGetAppSettingsKeyVaultReferencesSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetAuthSettingsOptions contains the optional parameters for the WebAppsClient.GetAuthSettings method. +type WebAppsClientGetAuthSettingsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetAuthSettingsSlotOptions contains the optional parameters for the WebAppsClient.GetAuthSettingsSlot method. +type WebAppsClientGetAuthSettingsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetAuthSettingsV2Options contains the optional parameters for the WebAppsClient.GetAuthSettingsV2 method. +type WebAppsClientGetAuthSettingsV2Options struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetAuthSettingsV2SlotOptions contains the optional parameters for the WebAppsClient.GetAuthSettingsV2Slot +// method. +type WebAppsClientGetAuthSettingsV2SlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetAuthSettingsV2WithoutSecretsOptions contains the optional parameters for the WebAppsClient.GetAuthSettingsV2WithoutSecrets +// method. +type WebAppsClientGetAuthSettingsV2WithoutSecretsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetAuthSettingsV2WithoutSecretsSlotOptions contains the optional parameters for the WebAppsClient.GetAuthSettingsV2WithoutSecretsSlot +// method. +type WebAppsClientGetAuthSettingsV2WithoutSecretsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetBackupConfigurationOptions contains the optional parameters for the WebAppsClient.GetBackupConfiguration +// method. +type WebAppsClientGetBackupConfigurationOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetBackupConfigurationSlotOptions contains the optional parameters for the WebAppsClient.GetBackupConfigurationSlot +// method. +type WebAppsClientGetBackupConfigurationSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetBackupStatusOptions contains the optional parameters for the WebAppsClient.GetBackupStatus method. +type WebAppsClientGetBackupStatusOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetBackupStatusSlotOptions contains the optional parameters for the WebAppsClient.GetBackupStatusSlot method. +type WebAppsClientGetBackupStatusSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetConfigurationOptions contains the optional parameters for the WebAppsClient.GetConfiguration method. +type WebAppsClientGetConfigurationOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetConfigurationSlotOptions contains the optional parameters for the WebAppsClient.GetConfigurationSlot method. +type WebAppsClientGetConfigurationSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetConfigurationSnapshotOptions contains the optional parameters for the WebAppsClient.GetConfigurationSnapshot +// method. +type WebAppsClientGetConfigurationSnapshotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetConfigurationSnapshotSlotOptions contains the optional parameters for the WebAppsClient.GetConfigurationSnapshotSlot +// method. +type WebAppsClientGetConfigurationSnapshotSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetContainerLogsZipOptions contains the optional parameters for the WebAppsClient.GetContainerLogsZip method. +type WebAppsClientGetContainerLogsZipOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetContainerLogsZipSlotOptions contains the optional parameters for the WebAppsClient.GetContainerLogsZipSlot +// method. +type WebAppsClientGetContainerLogsZipSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetContinuousWebJobOptions contains the optional parameters for the WebAppsClient.GetContinuousWebJob method. +type WebAppsClientGetContinuousWebJobOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetContinuousWebJobSlotOptions contains the optional parameters for the WebAppsClient.GetContinuousWebJobSlot +// method. +type WebAppsClientGetContinuousWebJobSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetDeploymentOptions contains the optional parameters for the WebAppsClient.GetDeployment method. +type WebAppsClientGetDeploymentOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetDeploymentSlotOptions contains the optional parameters for the WebAppsClient.GetDeploymentSlot method. +type WebAppsClientGetDeploymentSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetDiagnosticLogsConfigurationOptions contains the optional parameters for the WebAppsClient.GetDiagnosticLogsConfiguration +// method. +type WebAppsClientGetDiagnosticLogsConfigurationOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetDiagnosticLogsConfigurationSlotOptions contains the optional parameters for the WebAppsClient.GetDiagnosticLogsConfigurationSlot +// method. +type WebAppsClientGetDiagnosticLogsConfigurationSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetDomainOwnershipIdentifierOptions contains the optional parameters for the WebAppsClient.GetDomainOwnershipIdentifier +// method. +type WebAppsClientGetDomainOwnershipIdentifierOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetDomainOwnershipIdentifierSlotOptions contains the optional parameters for the WebAppsClient.GetDomainOwnershipIdentifierSlot +// method. +type WebAppsClientGetDomainOwnershipIdentifierSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetFtpAllowedOptions contains the optional parameters for the WebAppsClient.GetFtpAllowed method. +type WebAppsClientGetFtpAllowedOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetFtpAllowedSlotOptions contains the optional parameters for the WebAppsClient.GetFtpAllowedSlot method. +type WebAppsClientGetFtpAllowedSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetFunctionOptions contains the optional parameters for the WebAppsClient.GetFunction method. +type WebAppsClientGetFunctionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetFunctionsAdminTokenOptions contains the optional parameters for the WebAppsClient.GetFunctionsAdminToken +// method. +type WebAppsClientGetFunctionsAdminTokenOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetFunctionsAdminTokenSlotOptions contains the optional parameters for the WebAppsClient.GetFunctionsAdminTokenSlot +// method. +type WebAppsClientGetFunctionsAdminTokenSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetHostNameBindingOptions contains the optional parameters for the WebAppsClient.GetHostNameBinding method. +type WebAppsClientGetHostNameBindingOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetHostNameBindingSlotOptions contains the optional parameters for the WebAppsClient.GetHostNameBindingSlot +// method. +type WebAppsClientGetHostNameBindingSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetHybridConnectionOptions contains the optional parameters for the WebAppsClient.GetHybridConnection method. +type WebAppsClientGetHybridConnectionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetHybridConnectionSlotOptions contains the optional parameters for the WebAppsClient.GetHybridConnectionSlot +// method. +type WebAppsClientGetHybridConnectionSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetInstanceFunctionSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceFunctionSlot +// method. +type WebAppsClientGetInstanceFunctionSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetInstanceInfoOptions contains the optional parameters for the WebAppsClient.GetInstanceInfo method. +type WebAppsClientGetInstanceInfoOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetInstanceInfoSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceInfoSlot method. +type WebAppsClientGetInstanceInfoSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetInstanceMSDeployLogOptions contains the optional parameters for the WebAppsClient.GetInstanceMSDeployLog +// method. +type WebAppsClientGetInstanceMSDeployLogOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetInstanceMSDeployLogSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceMSDeployLogSlot +// method. +type WebAppsClientGetInstanceMSDeployLogSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetInstanceMsDeployStatusOptions contains the optional parameters for the WebAppsClient.GetInstanceMsDeployStatus +// method. +type WebAppsClientGetInstanceMsDeployStatusOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetInstanceMsDeployStatusSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceMsDeployStatusSlot +// method. +type WebAppsClientGetInstanceMsDeployStatusSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetInstanceProcessDumpOptions contains the optional parameters for the WebAppsClient.GetInstanceProcessDump +// method. +type WebAppsClientGetInstanceProcessDumpOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetInstanceProcessDumpSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceProcessDumpSlot +// method. +type WebAppsClientGetInstanceProcessDumpSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetInstanceProcessModuleOptions contains the optional parameters for the WebAppsClient.GetInstanceProcessModule +// method. +type WebAppsClientGetInstanceProcessModuleOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetInstanceProcessModuleSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceProcessModuleSlot +// method. +type WebAppsClientGetInstanceProcessModuleSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetInstanceProcessOptions contains the optional parameters for the WebAppsClient.GetInstanceProcess method. +type WebAppsClientGetInstanceProcessOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetInstanceProcessSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceProcessSlot +// method. +type WebAppsClientGetInstanceProcessSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetInstanceWorkflowSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceWorkflowSlot +// method. +type WebAppsClientGetInstanceWorkflowSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetMSDeployLogOptions contains the optional parameters for the WebAppsClient.GetMSDeployLog method. +type WebAppsClientGetMSDeployLogOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetMSDeployLogSlotOptions contains the optional parameters for the WebAppsClient.GetMSDeployLogSlot method. +type WebAppsClientGetMSDeployLogSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetMSDeployStatusOptions contains the optional parameters for the WebAppsClient.GetMSDeployStatus method. +type WebAppsClientGetMSDeployStatusOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetMSDeployStatusSlotOptions contains the optional parameters for the WebAppsClient.GetMSDeployStatusSlot +// method. +type WebAppsClientGetMSDeployStatusSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetMigrateMySQLStatusOptions contains the optional parameters for the WebAppsClient.GetMigrateMySQLStatus +// method. +type WebAppsClientGetMigrateMySQLStatusOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetMigrateMySQLStatusSlotOptions contains the optional parameters for the WebAppsClient.GetMigrateMySQLStatusSlot +// method. +type WebAppsClientGetMigrateMySQLStatusSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetNetworkTraceOperationOptions contains the optional parameters for the WebAppsClient.GetNetworkTraceOperation +// method. +type WebAppsClientGetNetworkTraceOperationOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetNetworkTraceOperationSlotOptions contains the optional parameters for the WebAppsClient.GetNetworkTraceOperationSlot +// method. +type WebAppsClientGetNetworkTraceOperationSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetNetworkTraceOperationSlotV2Options contains the optional parameters for the WebAppsClient.GetNetworkTraceOperationSlotV2 +// method. +type WebAppsClientGetNetworkTraceOperationSlotV2Options struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetNetworkTraceOperationV2Options contains the optional parameters for the WebAppsClient.GetNetworkTraceOperationV2 +// method. +type WebAppsClientGetNetworkTraceOperationV2Options struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetNetworkTracesOptions contains the optional parameters for the WebAppsClient.GetNetworkTraces method. +type WebAppsClientGetNetworkTracesOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetNetworkTracesSlotOptions contains the optional parameters for the WebAppsClient.GetNetworkTracesSlot method. +type WebAppsClientGetNetworkTracesSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetNetworkTracesSlotV2Options contains the optional parameters for the WebAppsClient.GetNetworkTracesSlotV2 +// method. +type WebAppsClientGetNetworkTracesSlotV2Options struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetNetworkTracesV2Options contains the optional parameters for the WebAppsClient.GetNetworkTracesV2 method. +type WebAppsClientGetNetworkTracesV2Options struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetOneDeployStatusOptions contains the optional parameters for the WebAppsClient.GetOneDeployStatus method. +type WebAppsClientGetOneDeployStatusOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetOptions contains the optional parameters for the WebAppsClient.Get method. +type WebAppsClientGetOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetPremierAddOnOptions contains the optional parameters for the WebAppsClient.GetPremierAddOn method. +type WebAppsClientGetPremierAddOnOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetPremierAddOnSlotOptions contains the optional parameters for the WebAppsClient.GetPremierAddOnSlot method. +type WebAppsClientGetPremierAddOnSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetPrivateAccessOptions contains the optional parameters for the WebAppsClient.GetPrivateAccess method. +type WebAppsClientGetPrivateAccessOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetPrivateAccessSlotOptions contains the optional parameters for the WebAppsClient.GetPrivateAccessSlot method. +type WebAppsClientGetPrivateAccessSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetPrivateEndpointConnectionListOptions contains the optional parameters for the WebAppsClient.NewGetPrivateEndpointConnectionListPager +// method. +type WebAppsClientGetPrivateEndpointConnectionListOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetPrivateEndpointConnectionListSlotOptions contains the optional parameters for the WebAppsClient.NewGetPrivateEndpointConnectionListSlotPager +// method. +type WebAppsClientGetPrivateEndpointConnectionListSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetPrivateEndpointConnectionOptions contains the optional parameters for the WebAppsClient.GetPrivateEndpointConnection +// method. +type WebAppsClientGetPrivateEndpointConnectionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetPrivateEndpointConnectionSlotOptions contains the optional parameters for the WebAppsClient.GetPrivateEndpointConnectionSlot +// method. +type WebAppsClientGetPrivateEndpointConnectionSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetPrivateLinkResourcesOptions contains the optional parameters for the WebAppsClient.GetPrivateLinkResources +// method. +type WebAppsClientGetPrivateLinkResourcesOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetPrivateLinkResourcesSlotOptions contains the optional parameters for the WebAppsClient.GetPrivateLinkResourcesSlot +// method. +type WebAppsClientGetPrivateLinkResourcesSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetProcessDumpOptions contains the optional parameters for the WebAppsClient.GetProcessDump method. +type WebAppsClientGetProcessDumpOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetProcessDumpSlotOptions contains the optional parameters for the WebAppsClient.GetProcessDumpSlot method. +type WebAppsClientGetProcessDumpSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetProcessModuleOptions contains the optional parameters for the WebAppsClient.GetProcessModule method. +type WebAppsClientGetProcessModuleOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetProcessModuleSlotOptions contains the optional parameters for the WebAppsClient.GetProcessModuleSlot method. +type WebAppsClientGetProcessModuleSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetProcessOptions contains the optional parameters for the WebAppsClient.GetProcess method. +type WebAppsClientGetProcessOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetProcessSlotOptions contains the optional parameters for the WebAppsClient.GetProcessSlot method. +type WebAppsClientGetProcessSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetPublicCertificateOptions contains the optional parameters for the WebAppsClient.GetPublicCertificate method. +type WebAppsClientGetPublicCertificateOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetPublicCertificateSlotOptions contains the optional parameters for the WebAppsClient.GetPublicCertificateSlot +// method. +type WebAppsClientGetPublicCertificateSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetRelayServiceConnectionOptions contains the optional parameters for the WebAppsClient.GetRelayServiceConnection +// method. +type WebAppsClientGetRelayServiceConnectionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetRelayServiceConnectionSlotOptions contains the optional parameters for the WebAppsClient.GetRelayServiceConnectionSlot +// method. +type WebAppsClientGetRelayServiceConnectionSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetScmAllowedOptions contains the optional parameters for the WebAppsClient.GetScmAllowed method. +type WebAppsClientGetScmAllowedOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetScmAllowedSlotOptions contains the optional parameters for the WebAppsClient.GetScmAllowedSlot method. +type WebAppsClientGetScmAllowedSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetSiteConnectionStringKeyVaultReferenceOptions contains the optional parameters for the WebAppsClient.GetSiteConnectionStringKeyVaultReference +// method. +type WebAppsClientGetSiteConnectionStringKeyVaultReferenceOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotOptions contains the optional parameters for the WebAppsClient.GetSiteConnectionStringKeyVaultReferenceSlot +// method. +type WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetSiteConnectionStringKeyVaultReferencesOptions contains the optional parameters for the WebAppsClient.NewGetSiteConnectionStringKeyVaultReferencesPager +// method. +type WebAppsClientGetSiteConnectionStringKeyVaultReferencesOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotOptions contains the optional parameters for the WebAppsClient.NewGetSiteConnectionStringKeyVaultReferencesSlotPager +// method. +type WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetSiteExtensionOptions contains the optional parameters for the WebAppsClient.GetSiteExtension method. +type WebAppsClientGetSiteExtensionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetSiteExtensionSlotOptions contains the optional parameters for the WebAppsClient.GetSiteExtensionSlot method. +type WebAppsClientGetSiteExtensionSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetSitePhpErrorLogFlagOptions contains the optional parameters for the WebAppsClient.GetSitePhpErrorLogFlag +// method. +type WebAppsClientGetSitePhpErrorLogFlagOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetSitePhpErrorLogFlagSlotOptions contains the optional parameters for the WebAppsClient.GetSitePhpErrorLogFlagSlot +// method. +type WebAppsClientGetSitePhpErrorLogFlagSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetSlotOptions contains the optional parameters for the WebAppsClient.GetSlot method. +type WebAppsClientGetSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetSourceControlOptions contains the optional parameters for the WebAppsClient.GetSourceControl method. +type WebAppsClientGetSourceControlOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetSourceControlSlotOptions contains the optional parameters for the WebAppsClient.GetSourceControlSlot method. +type WebAppsClientGetSourceControlSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetSwiftVirtualNetworkConnectionOptions contains the optional parameters for the WebAppsClient.GetSwiftVirtualNetworkConnection +// method. +type WebAppsClientGetSwiftVirtualNetworkConnectionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetSwiftVirtualNetworkConnectionSlotOptions contains the optional parameters for the WebAppsClient.GetSwiftVirtualNetworkConnectionSlot +// method. +type WebAppsClientGetSwiftVirtualNetworkConnectionSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetTriggeredWebJobHistoryOptions contains the optional parameters for the WebAppsClient.GetTriggeredWebJobHistory +// method. +type WebAppsClientGetTriggeredWebJobHistoryOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetTriggeredWebJobHistorySlotOptions contains the optional parameters for the WebAppsClient.GetTriggeredWebJobHistorySlot +// method. +type WebAppsClientGetTriggeredWebJobHistorySlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetTriggeredWebJobOptions contains the optional parameters for the WebAppsClient.GetTriggeredWebJob method. +type WebAppsClientGetTriggeredWebJobOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetTriggeredWebJobSlotOptions contains the optional parameters for the WebAppsClient.GetTriggeredWebJobSlot +// method. +type WebAppsClientGetTriggeredWebJobSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetVnetConnectionGatewayOptions contains the optional parameters for the WebAppsClient.GetVnetConnectionGateway +// method. +type WebAppsClientGetVnetConnectionGatewayOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetVnetConnectionGatewaySlotOptions contains the optional parameters for the WebAppsClient.GetVnetConnectionGatewaySlot +// method. +type WebAppsClientGetVnetConnectionGatewaySlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetVnetConnectionOptions contains the optional parameters for the WebAppsClient.GetVnetConnection method. +type WebAppsClientGetVnetConnectionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetVnetConnectionSlotOptions contains the optional parameters for the WebAppsClient.GetVnetConnectionSlot +// method. +type WebAppsClientGetVnetConnectionSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetWebJobOptions contains the optional parameters for the WebAppsClient.GetWebJob method. +type WebAppsClientGetWebJobOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetWebJobSlotOptions contains the optional parameters for the WebAppsClient.GetWebJobSlot method. +type WebAppsClientGetWebJobSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetWebSiteContainerLogsOptions contains the optional parameters for the WebAppsClient.GetWebSiteContainerLogs +// method. +type WebAppsClientGetWebSiteContainerLogsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetWebSiteContainerLogsSlotOptions contains the optional parameters for the WebAppsClient.GetWebSiteContainerLogsSlot +// method. +type WebAppsClientGetWebSiteContainerLogsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientGetWorkflowOptions contains the optional parameters for the WebAppsClient.GetWorkflow method. +type WebAppsClientGetWorkflowOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientIsCloneableOptions contains the optional parameters for the WebAppsClient.IsCloneable method. +type WebAppsClientIsCloneableOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientIsCloneableSlotOptions contains the optional parameters for the WebAppsClient.IsCloneableSlot method. +type WebAppsClientIsCloneableSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListApplicationSettingsOptions contains the optional parameters for the WebAppsClient.ListApplicationSettings +// method. +type WebAppsClientListApplicationSettingsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListApplicationSettingsSlotOptions contains the optional parameters for the WebAppsClient.ListApplicationSettingsSlot +// method. +type WebAppsClientListApplicationSettingsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListAzureStorageAccountsOptions contains the optional parameters for the WebAppsClient.ListAzureStorageAccounts +// method. +type WebAppsClientListAzureStorageAccountsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListAzureStorageAccountsSlotOptions contains the optional parameters for the WebAppsClient.ListAzureStorageAccountsSlot +// method. +type WebAppsClientListAzureStorageAccountsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListBackupStatusSecretsOptions contains the optional parameters for the WebAppsClient.ListBackupStatusSecrets +// method. +type WebAppsClientListBackupStatusSecretsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListBackupStatusSecretsSlotOptions contains the optional parameters for the WebAppsClient.ListBackupStatusSecretsSlot +// method. +type WebAppsClientListBackupStatusSecretsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListBackupsOptions contains the optional parameters for the WebAppsClient.NewListBackupsPager method. +type WebAppsClientListBackupsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListBackupsSlotOptions contains the optional parameters for the WebAppsClient.NewListBackupsSlotPager method. +type WebAppsClientListBackupsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListBasicPublishingCredentialsPoliciesOptions contains the optional parameters for the WebAppsClient.NewListBasicPublishingCredentialsPoliciesPager +// method. +type WebAppsClientListBasicPublishingCredentialsPoliciesOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListBasicPublishingCredentialsPoliciesSlotOptions contains the optional parameters for the WebAppsClient.NewListBasicPublishingCredentialsPoliciesSlotPager +// method. +type WebAppsClientListBasicPublishingCredentialsPoliciesSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListByResourceGroupOptions contains the optional parameters for the WebAppsClient.NewListByResourceGroupPager +// method. +type WebAppsClientListByResourceGroupOptions struct { + // Specify true to include deployment slots in results. The default is false, which only gives you the production slot of + // all apps. + IncludeSlots *bool +} + +// WebAppsClientListConfigurationSnapshotInfoOptions contains the optional parameters for the WebAppsClient.NewListConfigurationSnapshotInfoPager +// method. +type WebAppsClientListConfigurationSnapshotInfoOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListConfigurationSnapshotInfoSlotOptions contains the optional parameters for the WebAppsClient.NewListConfigurationSnapshotInfoSlotPager +// method. +type WebAppsClientListConfigurationSnapshotInfoSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListConfigurationsOptions contains the optional parameters for the WebAppsClient.NewListConfigurationsPager +// method. +type WebAppsClientListConfigurationsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListConfigurationsSlotOptions contains the optional parameters for the WebAppsClient.NewListConfigurationsSlotPager +// method. +type WebAppsClientListConfigurationsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListConnectionStringsOptions contains the optional parameters for the WebAppsClient.ListConnectionStrings +// method. +type WebAppsClientListConnectionStringsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListConnectionStringsSlotOptions contains the optional parameters for the WebAppsClient.ListConnectionStringsSlot +// method. +type WebAppsClientListConnectionStringsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListContinuousWebJobsOptions contains the optional parameters for the WebAppsClient.NewListContinuousWebJobsPager +// method. +type WebAppsClientListContinuousWebJobsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListContinuousWebJobsSlotOptions contains the optional parameters for the WebAppsClient.NewListContinuousWebJobsSlotPager +// method. +type WebAppsClientListContinuousWebJobsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListDeploymentLogOptions contains the optional parameters for the WebAppsClient.ListDeploymentLog method. +type WebAppsClientListDeploymentLogOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListDeploymentLogSlotOptions contains the optional parameters for the WebAppsClient.ListDeploymentLogSlot +// method. +type WebAppsClientListDeploymentLogSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListDeploymentsOptions contains the optional parameters for the WebAppsClient.NewListDeploymentsPager method. +type WebAppsClientListDeploymentsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListDeploymentsSlotOptions contains the optional parameters for the WebAppsClient.NewListDeploymentsSlotPager +// method. +type WebAppsClientListDeploymentsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListDomainOwnershipIdentifiersOptions contains the optional parameters for the WebAppsClient.NewListDomainOwnershipIdentifiersPager +// method. +type WebAppsClientListDomainOwnershipIdentifiersOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListDomainOwnershipIdentifiersSlotOptions contains the optional parameters for the WebAppsClient.NewListDomainOwnershipIdentifiersSlotPager +// method. +type WebAppsClientListDomainOwnershipIdentifiersSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListFunctionKeysOptions contains the optional parameters for the WebAppsClient.ListFunctionKeys method. +type WebAppsClientListFunctionKeysOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListFunctionKeysSlotOptions contains the optional parameters for the WebAppsClient.ListFunctionKeysSlot method. +type WebAppsClientListFunctionKeysSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListFunctionSecretsOptions contains the optional parameters for the WebAppsClient.ListFunctionSecrets method. +type WebAppsClientListFunctionSecretsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListFunctionSecretsSlotOptions contains the optional parameters for the WebAppsClient.ListFunctionSecretsSlot +// method. +type WebAppsClientListFunctionSecretsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListFunctionsOptions contains the optional parameters for the WebAppsClient.NewListFunctionsPager method. +type WebAppsClientListFunctionsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListHostKeysOptions contains the optional parameters for the WebAppsClient.ListHostKeys method. +type WebAppsClientListHostKeysOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListHostKeysSlotOptions contains the optional parameters for the WebAppsClient.ListHostKeysSlot method. +type WebAppsClientListHostKeysSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListHostNameBindingsOptions contains the optional parameters for the WebAppsClient.NewListHostNameBindingsPager +// method. +type WebAppsClientListHostNameBindingsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListHostNameBindingsSlotOptions contains the optional parameters for the WebAppsClient.NewListHostNameBindingsSlotPager +// method. +type WebAppsClientListHostNameBindingsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListHybridConnectionsOptions contains the optional parameters for the WebAppsClient.ListHybridConnections +// method. +type WebAppsClientListHybridConnectionsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListHybridConnectionsSlotOptions contains the optional parameters for the WebAppsClient.ListHybridConnectionsSlot +// method. +type WebAppsClientListHybridConnectionsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListInstanceFunctionsSlotOptions contains the optional parameters for the WebAppsClient.NewListInstanceFunctionsSlotPager +// method. +type WebAppsClientListInstanceFunctionsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListInstanceIdentifiersOptions contains the optional parameters for the WebAppsClient.NewListInstanceIdentifiersPager +// method. +type WebAppsClientListInstanceIdentifiersOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListInstanceIdentifiersSlotOptions contains the optional parameters for the WebAppsClient.NewListInstanceIdentifiersSlotPager +// method. +type WebAppsClientListInstanceIdentifiersSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListInstanceProcessModulesOptions contains the optional parameters for the WebAppsClient.NewListInstanceProcessModulesPager +// method. +type WebAppsClientListInstanceProcessModulesOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListInstanceProcessModulesSlotOptions contains the optional parameters for the WebAppsClient.NewListInstanceProcessModulesSlotPager +// method. +type WebAppsClientListInstanceProcessModulesSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListInstanceProcessThreadsOptions contains the optional parameters for the WebAppsClient.NewListInstanceProcessThreadsPager +// method. +type WebAppsClientListInstanceProcessThreadsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListInstanceProcessThreadsSlotOptions contains the optional parameters for the WebAppsClient.NewListInstanceProcessThreadsSlotPager +// method. +type WebAppsClientListInstanceProcessThreadsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListInstanceProcessesOptions contains the optional parameters for the WebAppsClient.NewListInstanceProcessesPager +// method. +type WebAppsClientListInstanceProcessesOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListInstanceProcessesSlotOptions contains the optional parameters for the WebAppsClient.NewListInstanceProcessesSlotPager +// method. +type WebAppsClientListInstanceProcessesSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListInstanceWorkflowsSlotOptions contains the optional parameters for the WebAppsClient.NewListInstanceWorkflowsSlotPager +// method. +type WebAppsClientListInstanceWorkflowsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListMetadataOptions contains the optional parameters for the WebAppsClient.ListMetadata method. +type WebAppsClientListMetadataOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListMetadataSlotOptions contains the optional parameters for the WebAppsClient.ListMetadataSlot method. +type WebAppsClientListMetadataSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListNetworkFeaturesOptions contains the optional parameters for the WebAppsClient.ListNetworkFeatures method. +type WebAppsClientListNetworkFeaturesOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListNetworkFeaturesSlotOptions contains the optional parameters for the WebAppsClient.ListNetworkFeaturesSlot +// method. +type WebAppsClientListNetworkFeaturesSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListOptions contains the optional parameters for the WebAppsClient.NewListPager method. +type WebAppsClientListOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListPerfMonCountersOptions contains the optional parameters for the WebAppsClient.NewListPerfMonCountersPager +// method. +type WebAppsClientListPerfMonCountersOptions struct { + // Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(startTime eq 2014-01-01T00:00:00Z + // and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + // duration'[Hour|Minute|Day]'. + Filter *string +} + +// WebAppsClientListPerfMonCountersSlotOptions contains the optional parameters for the WebAppsClient.NewListPerfMonCountersSlotPager +// method. +type WebAppsClientListPerfMonCountersSlotOptions struct { + // Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(startTime eq 2014-01-01T00:00:00Z + // and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + // duration'[Hour|Minute|Day]'. + Filter *string +} + +// WebAppsClientListPremierAddOnsOptions contains the optional parameters for the WebAppsClient.ListPremierAddOns method. +type WebAppsClientListPremierAddOnsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListPremierAddOnsSlotOptions contains the optional parameters for the WebAppsClient.ListPremierAddOnsSlot +// method. +type WebAppsClientListPremierAddOnsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListProcessModulesOptions contains the optional parameters for the WebAppsClient.NewListProcessModulesPager +// method. +type WebAppsClientListProcessModulesOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListProcessModulesSlotOptions contains the optional parameters for the WebAppsClient.NewListProcessModulesSlotPager +// method. +type WebAppsClientListProcessModulesSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListProcessThreadsOptions contains the optional parameters for the WebAppsClient.NewListProcessThreadsPager +// method. +type WebAppsClientListProcessThreadsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListProcessThreadsSlotOptions contains the optional parameters for the WebAppsClient.NewListProcessThreadsSlotPager +// method. +type WebAppsClientListProcessThreadsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListProcessesOptions contains the optional parameters for the WebAppsClient.NewListProcessesPager method. +type WebAppsClientListProcessesOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListProcessesSlotOptions contains the optional parameters for the WebAppsClient.NewListProcessesSlotPager +// method. +type WebAppsClientListProcessesSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListProductionSiteDeploymentStatusesOptions contains the optional parameters for the WebAppsClient.NewListProductionSiteDeploymentStatusesPager +// method. +type WebAppsClientListProductionSiteDeploymentStatusesOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListPublicCertificatesOptions contains the optional parameters for the WebAppsClient.NewListPublicCertificatesPager +// method. +type WebAppsClientListPublicCertificatesOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListPublicCertificatesSlotOptions contains the optional parameters for the WebAppsClient.NewListPublicCertificatesSlotPager +// method. +type WebAppsClientListPublicCertificatesSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListPublishingProfileXMLWithSecretsOptions contains the optional parameters for the WebAppsClient.ListPublishingProfileXMLWithSecrets +// method. +type WebAppsClientListPublishingProfileXMLWithSecretsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListPublishingProfileXMLWithSecretsSlotOptions contains the optional parameters for the WebAppsClient.ListPublishingProfileXMLWithSecretsSlot +// method. +type WebAppsClientListPublishingProfileXMLWithSecretsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListRelayServiceConnectionsOptions contains the optional parameters for the WebAppsClient.ListRelayServiceConnections +// method. +type WebAppsClientListRelayServiceConnectionsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListRelayServiceConnectionsSlotOptions contains the optional parameters for the WebAppsClient.ListRelayServiceConnectionsSlot +// method. +type WebAppsClientListRelayServiceConnectionsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSiteBackupsOptions contains the optional parameters for the WebAppsClient.NewListSiteBackupsPager method. +type WebAppsClientListSiteBackupsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSiteBackupsSlotOptions contains the optional parameters for the WebAppsClient.NewListSiteBackupsSlotPager +// method. +type WebAppsClientListSiteBackupsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSiteExtensionsOptions contains the optional parameters for the WebAppsClient.NewListSiteExtensionsPager +// method. +type WebAppsClientListSiteExtensionsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSiteExtensionsSlotOptions contains the optional parameters for the WebAppsClient.NewListSiteExtensionsSlotPager +// method. +type WebAppsClientListSiteExtensionsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSitePushSettingsOptions contains the optional parameters for the WebAppsClient.ListSitePushSettings method. +type WebAppsClientListSitePushSettingsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSitePushSettingsSlotOptions contains the optional parameters for the WebAppsClient.ListSitePushSettingsSlot +// method. +type WebAppsClientListSitePushSettingsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSlotConfigurationNamesOptions contains the optional parameters for the WebAppsClient.ListSlotConfigurationNames +// method. +type WebAppsClientListSlotConfigurationNamesOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSlotDifferencesFromProductionOptions contains the optional parameters for the WebAppsClient.NewListSlotDifferencesFromProductionPager +// method. +type WebAppsClientListSlotDifferencesFromProductionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSlotDifferencesSlotOptions contains the optional parameters for the WebAppsClient.NewListSlotDifferencesSlotPager +// method. +type WebAppsClientListSlotDifferencesSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSlotSiteDeploymentStatusesSlotOptions contains the optional parameters for the WebAppsClient.NewListSlotSiteDeploymentStatusesSlotPager +// method. +type WebAppsClientListSlotSiteDeploymentStatusesSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSlotsOptions contains the optional parameters for the WebAppsClient.NewListSlotsPager method. +type WebAppsClientListSlotsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSnapshotsFromDRSecondaryOptions contains the optional parameters for the WebAppsClient.NewListSnapshotsFromDRSecondaryPager +// method. +type WebAppsClientListSnapshotsFromDRSecondaryOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSnapshotsFromDRSecondarySlotOptions contains the optional parameters for the WebAppsClient.NewListSnapshotsFromDRSecondarySlotPager +// method. +type WebAppsClientListSnapshotsFromDRSecondarySlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSnapshotsOptions contains the optional parameters for the WebAppsClient.NewListSnapshotsPager method. +type WebAppsClientListSnapshotsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSnapshotsSlotOptions contains the optional parameters for the WebAppsClient.NewListSnapshotsSlotPager +// method. +type WebAppsClientListSnapshotsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSyncFunctionTriggersOptions contains the optional parameters for the WebAppsClient.ListSyncFunctionTriggers +// method. +type WebAppsClientListSyncFunctionTriggersOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSyncFunctionTriggersSlotOptions contains the optional parameters for the WebAppsClient.ListSyncFunctionTriggersSlot +// method. +type WebAppsClientListSyncFunctionTriggersSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSyncStatusOptions contains the optional parameters for the WebAppsClient.ListSyncStatus method. +type WebAppsClientListSyncStatusOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListSyncStatusSlotOptions contains the optional parameters for the WebAppsClient.ListSyncStatusSlot method. +type WebAppsClientListSyncStatusSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListTriggeredWebJobHistoryOptions contains the optional parameters for the WebAppsClient.NewListTriggeredWebJobHistoryPager +// method. +type WebAppsClientListTriggeredWebJobHistoryOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListTriggeredWebJobHistorySlotOptions contains the optional parameters for the WebAppsClient.NewListTriggeredWebJobHistorySlotPager +// method. +type WebAppsClientListTriggeredWebJobHistorySlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListTriggeredWebJobsOptions contains the optional parameters for the WebAppsClient.NewListTriggeredWebJobsPager +// method. +type WebAppsClientListTriggeredWebJobsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListTriggeredWebJobsSlotOptions contains the optional parameters for the WebAppsClient.NewListTriggeredWebJobsSlotPager +// method. +type WebAppsClientListTriggeredWebJobsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListUsagesOptions contains the optional parameters for the WebAppsClient.NewListUsagesPager method. +type WebAppsClientListUsagesOptions struct { + // Return only information specified in the filter (using OData syntax). For example: $filter=(name.value eq 'Metric1' or + // name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq + // 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. + Filter *string +} + +// WebAppsClientListUsagesSlotOptions contains the optional parameters for the WebAppsClient.NewListUsagesSlotPager method. +type WebAppsClientListUsagesSlotOptions struct { + // Return only information specified in the filter (using OData syntax). For example: $filter=(name.value eq 'Metric1' or + // name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq + // 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. + Filter *string +} + +// WebAppsClientListVnetConnectionsOptions contains the optional parameters for the WebAppsClient.ListVnetConnections method. +type WebAppsClientListVnetConnectionsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListVnetConnectionsSlotOptions contains the optional parameters for the WebAppsClient.ListVnetConnectionsSlot +// method. +type WebAppsClientListVnetConnectionsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListWebJobsOptions contains the optional parameters for the WebAppsClient.NewListWebJobsPager method. +type WebAppsClientListWebJobsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListWebJobsSlotOptions contains the optional parameters for the WebAppsClient.NewListWebJobsSlotPager method. +type WebAppsClientListWebJobsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListWorkflowsConnectionsOptions contains the optional parameters for the WebAppsClient.ListWorkflowsConnections +// method. +type WebAppsClientListWorkflowsConnectionsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListWorkflowsConnectionsSlotOptions contains the optional parameters for the WebAppsClient.ListWorkflowsConnectionsSlot +// method. +type WebAppsClientListWorkflowsConnectionsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientListWorkflowsOptions contains the optional parameters for the WebAppsClient.NewListWorkflowsPager method. +type WebAppsClientListWorkflowsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientPutPrivateAccessVnetOptions contains the optional parameters for the WebAppsClient.PutPrivateAccessVnet method. +type WebAppsClientPutPrivateAccessVnetOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientPutPrivateAccessVnetSlotOptions contains the optional parameters for the WebAppsClient.PutPrivateAccessVnetSlot +// method. +type WebAppsClientPutPrivateAccessVnetSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientRecoverSiteConfigurationSnapshotOptions contains the optional parameters for the WebAppsClient.RecoverSiteConfigurationSnapshot +// method. +type WebAppsClientRecoverSiteConfigurationSnapshotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientRecoverSiteConfigurationSnapshotSlotOptions contains the optional parameters for the WebAppsClient.RecoverSiteConfigurationSnapshotSlot +// method. +type WebAppsClientRecoverSiteConfigurationSnapshotSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientResetProductionSlotConfigOptions contains the optional parameters for the WebAppsClient.ResetProductionSlotConfig +// method. +type WebAppsClientResetProductionSlotConfigOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientResetSlotConfigurationSlotOptions contains the optional parameters for the WebAppsClient.ResetSlotConfigurationSlot +// method. +type WebAppsClientResetSlotConfigurationSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientRestartOptions contains the optional parameters for the WebAppsClient.Restart method. +type WebAppsClientRestartOptions struct { + // Specify true to apply the configuration settings and restarts the app only if necessary. By default, the API always restarts + // and reprovisions the app. + SoftRestart *bool + + // Specify true to block until the app is restarted. By default, it is set to false, and the API responds immediately (asynchronous). + Synchronous *bool +} + +// WebAppsClientRestartSlotOptions contains the optional parameters for the WebAppsClient.RestartSlot method. +type WebAppsClientRestartSlotOptions struct { + // Specify true to apply the configuration settings and restarts the app only if necessary. By default, the API always restarts + // and reprovisions the app. + SoftRestart *bool + + // Specify true to block until the app is restarted. By default, it is set to false, and the API responds immediately (asynchronous). + Synchronous *bool +} + +// WebAppsClientRunTriggeredWebJobOptions contains the optional parameters for the WebAppsClient.RunTriggeredWebJob method. +type WebAppsClientRunTriggeredWebJobOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientRunTriggeredWebJobSlotOptions contains the optional parameters for the WebAppsClient.RunTriggeredWebJobSlot +// method. +type WebAppsClientRunTriggeredWebJobSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientStartContinuousWebJobOptions contains the optional parameters for the WebAppsClient.StartContinuousWebJob +// method. +type WebAppsClientStartContinuousWebJobOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientStartContinuousWebJobSlotOptions contains the optional parameters for the WebAppsClient.StartContinuousWebJobSlot +// method. +type WebAppsClientStartContinuousWebJobSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientStartOptions contains the optional parameters for the WebAppsClient.Start method. +type WebAppsClientStartOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientStartSlotOptions contains the optional parameters for the WebAppsClient.StartSlot method. +type WebAppsClientStartSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientStartWebSiteNetworkTraceOptions contains the optional parameters for the WebAppsClient.StartWebSiteNetworkTrace +// method. +type WebAppsClientStartWebSiteNetworkTraceOptions struct { + // The duration to keep capturing in seconds. + DurationInSeconds *int32 + + // The maximum frame length in bytes (Optional). + MaxFrameLength *int32 + + // The Blob URL to store capture file. + SasURL *string +} + +// WebAppsClientStartWebSiteNetworkTraceSlotOptions contains the optional parameters for the WebAppsClient.StartWebSiteNetworkTraceSlot +// method. +type WebAppsClientStartWebSiteNetworkTraceSlotOptions struct { + // The duration to keep capturing in seconds. + DurationInSeconds *int32 + + // The maximum frame length in bytes (Optional). + MaxFrameLength *int32 + + // The Blob URL to store capture file. + SasURL *string +} + +// WebAppsClientStopContinuousWebJobOptions contains the optional parameters for the WebAppsClient.StopContinuousWebJob method. +type WebAppsClientStopContinuousWebJobOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientStopContinuousWebJobSlotOptions contains the optional parameters for the WebAppsClient.StopContinuousWebJobSlot +// method. +type WebAppsClientStopContinuousWebJobSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientStopNetworkTraceOptions contains the optional parameters for the WebAppsClient.StopNetworkTrace method. +type WebAppsClientStopNetworkTraceOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientStopNetworkTraceSlotOptions contains the optional parameters for the WebAppsClient.StopNetworkTraceSlot method. +type WebAppsClientStopNetworkTraceSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientStopOptions contains the optional parameters for the WebAppsClient.Stop method. +type WebAppsClientStopOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientStopSlotOptions contains the optional parameters for the WebAppsClient.StopSlot method. +type WebAppsClientStopSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientStopWebSiteNetworkTraceOptions contains the optional parameters for the WebAppsClient.StopWebSiteNetworkTrace +// method. +type WebAppsClientStopWebSiteNetworkTraceOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientStopWebSiteNetworkTraceSlotOptions contains the optional parameters for the WebAppsClient.StopWebSiteNetworkTraceSlot +// method. +type WebAppsClientStopWebSiteNetworkTraceSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientSyncFunctionTriggersOptions contains the optional parameters for the WebAppsClient.SyncFunctionTriggers method. +type WebAppsClientSyncFunctionTriggersOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientSyncFunctionTriggersSlotOptions contains the optional parameters for the WebAppsClient.SyncFunctionTriggersSlot +// method. +type WebAppsClientSyncFunctionTriggersSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientSyncFunctionsOptions contains the optional parameters for the WebAppsClient.SyncFunctions method. +type WebAppsClientSyncFunctionsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientSyncFunctionsSlotOptions contains the optional parameters for the WebAppsClient.SyncFunctionsSlot method. +type WebAppsClientSyncFunctionsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientSyncRepositoryOptions contains the optional parameters for the WebAppsClient.SyncRepository method. +type WebAppsClientSyncRepositoryOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientSyncRepositorySlotOptions contains the optional parameters for the WebAppsClient.SyncRepositorySlot method. +type WebAppsClientSyncRepositorySlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateApplicationSettingsOptions contains the optional parameters for the WebAppsClient.UpdateApplicationSettings +// method. +type WebAppsClientUpdateApplicationSettingsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateApplicationSettingsSlotOptions contains the optional parameters for the WebAppsClient.UpdateApplicationSettingsSlot +// method. +type WebAppsClientUpdateApplicationSettingsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateAuthSettingsOptions contains the optional parameters for the WebAppsClient.UpdateAuthSettings method. +type WebAppsClientUpdateAuthSettingsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateAuthSettingsSlotOptions contains the optional parameters for the WebAppsClient.UpdateAuthSettingsSlot +// method. +type WebAppsClientUpdateAuthSettingsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateAuthSettingsV2Options contains the optional parameters for the WebAppsClient.UpdateAuthSettingsV2 method. +type WebAppsClientUpdateAuthSettingsV2Options struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateAuthSettingsV2SlotOptions contains the optional parameters for the WebAppsClient.UpdateAuthSettingsV2Slot +// method. +type WebAppsClientUpdateAuthSettingsV2SlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateAzureStorageAccountsOptions contains the optional parameters for the WebAppsClient.UpdateAzureStorageAccounts +// method. +type WebAppsClientUpdateAzureStorageAccountsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateAzureStorageAccountsSlotOptions contains the optional parameters for the WebAppsClient.UpdateAzureStorageAccountsSlot +// method. +type WebAppsClientUpdateAzureStorageAccountsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateBackupConfigurationOptions contains the optional parameters for the WebAppsClient.UpdateBackupConfiguration +// method. +type WebAppsClientUpdateBackupConfigurationOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateBackupConfigurationSlotOptions contains the optional parameters for the WebAppsClient.UpdateBackupConfigurationSlot +// method. +type WebAppsClientUpdateBackupConfigurationSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateConfigurationOptions contains the optional parameters for the WebAppsClient.UpdateConfiguration method. +type WebAppsClientUpdateConfigurationOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateConfigurationSlotOptions contains the optional parameters for the WebAppsClient.UpdateConfigurationSlot +// method. +type WebAppsClientUpdateConfigurationSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateConnectionStringsOptions contains the optional parameters for the WebAppsClient.UpdateConnectionStrings +// method. +type WebAppsClientUpdateConnectionStringsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateConnectionStringsSlotOptions contains the optional parameters for the WebAppsClient.UpdateConnectionStringsSlot +// method. +type WebAppsClientUpdateConnectionStringsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateDiagnosticLogsConfigOptions contains the optional parameters for the WebAppsClient.UpdateDiagnosticLogsConfig +// method. +type WebAppsClientUpdateDiagnosticLogsConfigOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateDiagnosticLogsConfigSlotOptions contains the optional parameters for the WebAppsClient.UpdateDiagnosticLogsConfigSlot +// method. +type WebAppsClientUpdateDiagnosticLogsConfigSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateDomainOwnershipIdentifierOptions contains the optional parameters for the WebAppsClient.UpdateDomainOwnershipIdentifier +// method. +type WebAppsClientUpdateDomainOwnershipIdentifierOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateDomainOwnershipIdentifierSlotOptions contains the optional parameters for the WebAppsClient.UpdateDomainOwnershipIdentifierSlot +// method. +type WebAppsClientUpdateDomainOwnershipIdentifierSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateFtpAllowedOptions contains the optional parameters for the WebAppsClient.UpdateFtpAllowed method. +type WebAppsClientUpdateFtpAllowedOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateFtpAllowedSlotOptions contains the optional parameters for the WebAppsClient.UpdateFtpAllowedSlot method. +type WebAppsClientUpdateFtpAllowedSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateHybridConnectionOptions contains the optional parameters for the WebAppsClient.UpdateHybridConnection +// method. +type WebAppsClientUpdateHybridConnectionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateHybridConnectionSlotOptions contains the optional parameters for the WebAppsClient.UpdateHybridConnectionSlot +// method. +type WebAppsClientUpdateHybridConnectionSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateMetadataOptions contains the optional parameters for the WebAppsClient.UpdateMetadata method. +type WebAppsClientUpdateMetadataOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateMetadataSlotOptions contains the optional parameters for the WebAppsClient.UpdateMetadataSlot method. +type WebAppsClientUpdateMetadataSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateOptions contains the optional parameters for the WebAppsClient.Update method. +type WebAppsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdatePremierAddOnOptions contains the optional parameters for the WebAppsClient.UpdatePremierAddOn method. +type WebAppsClientUpdatePremierAddOnOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdatePremierAddOnSlotOptions contains the optional parameters for the WebAppsClient.UpdatePremierAddOnSlot +// method. +type WebAppsClientUpdatePremierAddOnSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateRelayServiceConnectionOptions contains the optional parameters for the WebAppsClient.UpdateRelayServiceConnection +// method. +type WebAppsClientUpdateRelayServiceConnectionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateRelayServiceConnectionSlotOptions contains the optional parameters for the WebAppsClient.UpdateRelayServiceConnectionSlot +// method. +type WebAppsClientUpdateRelayServiceConnectionSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateScmAllowedOptions contains the optional parameters for the WebAppsClient.UpdateScmAllowed method. +type WebAppsClientUpdateScmAllowedOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateScmAllowedSlotOptions contains the optional parameters for the WebAppsClient.UpdateScmAllowedSlot method. +type WebAppsClientUpdateScmAllowedSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateSitePushSettingsOptions contains the optional parameters for the WebAppsClient.UpdateSitePushSettings +// method. +type WebAppsClientUpdateSitePushSettingsOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateSitePushSettingsSlotOptions contains the optional parameters for the WebAppsClient.UpdateSitePushSettingsSlot +// method. +type WebAppsClientUpdateSitePushSettingsSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateSlotConfigurationNamesOptions contains the optional parameters for the WebAppsClient.UpdateSlotConfigurationNames +// method. +type WebAppsClientUpdateSlotConfigurationNamesOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateSlotOptions contains the optional parameters for the WebAppsClient.UpdateSlot method. +type WebAppsClientUpdateSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateSourceControlOptions contains the optional parameters for the WebAppsClient.UpdateSourceControl method. +type WebAppsClientUpdateSourceControlOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateSourceControlSlotOptions contains the optional parameters for the WebAppsClient.UpdateSourceControlSlot +// method. +type WebAppsClientUpdateSourceControlSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckOptions contains the optional parameters for the WebAppsClient.UpdateSwiftVirtualNetworkConnectionWithCheck +// method. +type WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions contains the optional parameters for the WebAppsClient.UpdateSwiftVirtualNetworkConnectionWithCheckSlot +// method. +type WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateVnetConnectionGatewayOptions contains the optional parameters for the WebAppsClient.UpdateVnetConnectionGateway +// method. +type WebAppsClientUpdateVnetConnectionGatewayOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateVnetConnectionGatewaySlotOptions contains the optional parameters for the WebAppsClient.UpdateVnetConnectionGatewaySlot +// method. +type WebAppsClientUpdateVnetConnectionGatewaySlotOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateVnetConnectionOptions contains the optional parameters for the WebAppsClient.UpdateVnetConnection method. +type WebAppsClientUpdateVnetConnectionOptions struct { + // placeholder for future optional parameters +} + +// WebAppsClientUpdateVnetConnectionSlotOptions contains the optional parameters for the WebAppsClient.UpdateVnetConnectionSlot +// method. +type WebAppsClientUpdateVnetConnectionSlotOptions struct { + // placeholder for future optional parameters +} + +// WebSiteManagementClientCheckNameAvailabilityOptions contains the optional parameters for the WebSiteManagementClient.CheckNameAvailability +// method. +type WebSiteManagementClientCheckNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// WebSiteManagementClientGetPublishingUserOptions contains the optional parameters for the WebSiteManagementClient.GetPublishingUser +// method. +type WebSiteManagementClientGetPublishingUserOptions struct { + // placeholder for future optional parameters +} + +// WebSiteManagementClientGetSourceControlOptions contains the optional parameters for the WebSiteManagementClient.GetSourceControl +// method. +type WebSiteManagementClientGetSourceControlOptions struct { + // placeholder for future optional parameters +} + +// WebSiteManagementClientGetSubscriptionDeploymentLocationsOptions contains the optional parameters for the WebSiteManagementClient.GetSubscriptionDeploymentLocations +// method. +type WebSiteManagementClientGetSubscriptionDeploymentLocationsOptions struct { + // placeholder for future optional parameters +} + +// WebSiteManagementClientListAseRegionsOptions contains the optional parameters for the WebSiteManagementClient.NewListAseRegionsPager +// method. +type WebSiteManagementClientListAseRegionsOptions struct { + // placeholder for future optional parameters +} + +// WebSiteManagementClientListBillingMetersOptions contains the optional parameters for the WebSiteManagementClient.NewListBillingMetersPager +// method. +type WebSiteManagementClientListBillingMetersOptions struct { + // Azure Location of billable resource + BillingLocation *string + + // App Service OS type meters used for + OSType *string +} + +// WebSiteManagementClientListCustomHostNameSitesOptions contains the optional parameters for the WebSiteManagementClient.NewListCustomHostNameSitesPager +// method. +type WebSiteManagementClientListCustomHostNameSitesOptions struct { + // Specific hostname + Hostname *string +} + +// WebSiteManagementClientListGeoRegionsOptions contains the optional parameters for the WebSiteManagementClient.NewListGeoRegionsPager +// method. +type WebSiteManagementClientListGeoRegionsOptions struct { + // Specify true if you want to filter to only regions that support Linux Consumption Workers. + LinuxDynamicWorkersEnabled *bool + + // Specify true if you want to filter to only regions that support Linux workers. + LinuxWorkersEnabled *bool + + // Name of SKU used to filter the regions. + SKU *SKUName + + // Specify true if you want to filter to only regions that support Xenon workers. + XenonWorkersEnabled *bool +} + +// WebSiteManagementClientListPremierAddOnOffersOptions contains the optional parameters for the WebSiteManagementClient.NewListPremierAddOnOffersPager +// method. +type WebSiteManagementClientListPremierAddOnOffersOptions struct { + // placeholder for future optional parameters +} + +// WebSiteManagementClientListSKUsOptions contains the optional parameters for the WebSiteManagementClient.ListSKUs method. +type WebSiteManagementClientListSKUsOptions struct { + // placeholder for future optional parameters +} + +// WebSiteManagementClientListSiteIdentifiersAssignedToHostNameOptions contains the optional parameters for the WebSiteManagementClient.NewListSiteIdentifiersAssignedToHostNamePager +// method. +type WebSiteManagementClientListSiteIdentifiersAssignedToHostNameOptions struct { + // placeholder for future optional parameters +} + +// WebSiteManagementClientListSourceControlsOptions contains the optional parameters for the WebSiteManagementClient.NewListSourceControlsPager +// method. +type WebSiteManagementClientListSourceControlsOptions struct { + // placeholder for future optional parameters +} + +// WebSiteManagementClientMoveOptions contains the optional parameters for the WebSiteManagementClient.Move method. +type WebSiteManagementClientMoveOptions struct { + // placeholder for future optional parameters +} + +// WebSiteManagementClientUpdatePublishingUserOptions contains the optional parameters for the WebSiteManagementClient.UpdatePublishingUser +// method. +type WebSiteManagementClientUpdatePublishingUserOptions struct { + // placeholder for future optional parameters +} + +// WebSiteManagementClientUpdateSourceControlOptions contains the optional parameters for the WebSiteManagementClient.UpdateSourceControl +// method. +type WebSiteManagementClientUpdateSourceControlOptions struct { + // placeholder for future optional parameters +} + +// WebSiteManagementClientValidateMoveOptions contains the optional parameters for the WebSiteManagementClient.ValidateMove +// method. +type WebSiteManagementClientValidateMoveOptions struct { + // placeholder for future optional parameters +} + +// WebSiteManagementClientValidateOptions contains the optional parameters for the WebSiteManagementClient.Validate method. +type WebSiteManagementClientValidateOptions struct { + // placeholder for future optional parameters +} + +// WebSiteManagementClientVerifyHostingEnvironmentVnetOptions contains the optional parameters for the WebSiteManagementClient.VerifyHostingEnvironmentVnet +// method. +type WebSiteManagementClientVerifyHostingEnvironmentVnetOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunActionRepetitionsClientGetOptions contains the optional parameters for the WorkflowRunActionRepetitionsClient.Get +// method. +type WorkflowRunActionRepetitionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunActionRepetitionsClientListExpressionTracesOptions contains the optional parameters for the WorkflowRunActionRepetitionsClient.NewListExpressionTracesPager +// method. +type WorkflowRunActionRepetitionsClientListExpressionTracesOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunActionRepetitionsClientListOptions contains the optional parameters for the WorkflowRunActionRepetitionsClient.NewListPager +// method. +type WorkflowRunActionRepetitionsClientListOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunActionRepetitionsRequestHistoriesClientGetOptions contains the optional parameters for the WorkflowRunActionRepetitionsRequestHistoriesClient.Get +// method. +type WorkflowRunActionRepetitionsRequestHistoriesClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunActionRepetitionsRequestHistoriesClientListOptions contains the optional parameters for the WorkflowRunActionRepetitionsRequestHistoriesClient.NewListPager +// method. +type WorkflowRunActionRepetitionsRequestHistoriesClientListOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunActionScopeRepetitionsClientGetOptions contains the optional parameters for the WorkflowRunActionScopeRepetitionsClient.Get +// method. +type WorkflowRunActionScopeRepetitionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunActionScopeRepetitionsClientListOptions contains the optional parameters for the WorkflowRunActionScopeRepetitionsClient.NewListPager +// method. +type WorkflowRunActionScopeRepetitionsClientListOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunActionsClientGetOptions contains the optional parameters for the WorkflowRunActionsClient.Get method. +type WorkflowRunActionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunActionsClientListExpressionTracesOptions contains the optional parameters for the WorkflowRunActionsClient.NewListExpressionTracesPager +// method. +type WorkflowRunActionsClientListExpressionTracesOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunActionsClientListOptions contains the optional parameters for the WorkflowRunActionsClient.NewListPager method. +type WorkflowRunActionsClientListOptions struct { + // The filter to apply on the operation. Options for filters include: Status. + Filter *string + + // The number of items to be included in the result. + Top *int32 +} + +// WorkflowRunsClientCancelOptions contains the optional parameters for the WorkflowRunsClient.Cancel method. +type WorkflowRunsClientCancelOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunsClientGetOptions contains the optional parameters for the WorkflowRunsClient.Get method. +type WorkflowRunsClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkflowRunsClientListOptions contains the optional parameters for the WorkflowRunsClient.NewListPager method. +type WorkflowRunsClientListOptions struct { + // The filter to apply on the operation. Options for filters include: Status, StartTime, and ClientTrackingId. + Filter *string + + // The number of items to be included in the result. + Top *int32 +} + +// WorkflowTriggerHistoriesClientBeginResubmitOptions contains the optional parameters for the WorkflowTriggerHistoriesClient.BeginResubmit +// method. +type WorkflowTriggerHistoriesClientBeginResubmitOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WorkflowTriggerHistoriesClientGetOptions contains the optional parameters for the WorkflowTriggerHistoriesClient.Get method. +type WorkflowTriggerHistoriesClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkflowTriggerHistoriesClientListOptions contains the optional parameters for the WorkflowTriggerHistoriesClient.NewListPager +// method. +type WorkflowTriggerHistoriesClientListOptions struct { + // The filter to apply on the operation. Options for filters include: Status, StartTime, and ClientTrackingId. + Filter *string + + // The number of items to be included in the result. + Top *int32 +} + +// WorkflowTriggersClientBeginRunOptions contains the optional parameters for the WorkflowTriggersClient.BeginRun method. +type WorkflowTriggersClientBeginRunOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WorkflowTriggersClientGetOptions contains the optional parameters for the WorkflowTriggersClient.Get method. +type WorkflowTriggersClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkflowTriggersClientGetSchemaJSONOptions contains the optional parameters for the WorkflowTriggersClient.GetSchemaJSON +// method. +type WorkflowTriggersClientGetSchemaJSONOptions struct { + // placeholder for future optional parameters +} + +// WorkflowTriggersClientListCallbackURLOptions contains the optional parameters for the WorkflowTriggersClient.ListCallbackURL +// method. +type WorkflowTriggersClientListCallbackURLOptions struct { + // placeholder for future optional parameters +} + +// WorkflowTriggersClientListOptions contains the optional parameters for the WorkflowTriggersClient.NewListPager method. +type WorkflowTriggersClientListOptions struct { + // The filter to apply on the operation. + Filter *string + + // The number of items to be included in the result. + Top *int32 +} + +// WorkflowVersionsClientGetOptions contains the optional parameters for the WorkflowVersionsClient.Get method. +type WorkflowVersionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// WorkflowVersionsClientListOptions contains the optional parameters for the WorkflowVersionsClient.NewListPager method. +type WorkflowVersionsClientListOptions struct { + // The number of items to be included in the result. + Top *int32 +} + +// WorkflowsClientRegenerateAccessKeyOptions contains the optional parameters for the WorkflowsClient.RegenerateAccessKey +// method. +type WorkflowsClientRegenerateAccessKeyOptions struct { + // placeholder for future optional parameters +} + +// WorkflowsClientValidateOptions contains the optional parameters for the WorkflowsClient.Validate method. +type WorkflowsClientValidateOptions struct { + // placeholder for future optional parameters +} diff --git a/sdk/resourcemanager/appservice/armappservice/plans_client.go b/sdk/resourcemanager/appservice/armappservice/plans_client.go index 9f7fb5e04cb7..3d6c6d81cbd9 100644 --- a/sdk/resourcemanager/appservice/armappservice/plans_client.go +++ b/sdk/resourcemanager/appservice/armappservice/plans_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappservice @@ -34,7 +33,7 @@ type PlansClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewPlansClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PlansClient, error) { - cl, err := arm.NewClient(moduleName+".PlansClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,7 +47,7 @@ func NewPlansClient(subscriptionID string, credential azcore.TokenCredential, op // BeginCreateOrUpdate - Description for Creates or updates an App Service Plan. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service plan. // - appServicePlan - Details of the App Service plan. @@ -60,29 +59,40 @@ func (client *PlansClient) BeginCreateOrUpdate(ctx context.Context, resourceGrou if err != nil { return nil, err } - return runtime.NewPoller[PlansClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[PlansClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[PlansClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[PlansClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateOrUpdate - Description for Creates or updates an App Service Plan. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *PlansClient) createOrUpdate(ctx context.Context, resourceGroupName string, name string, appServicePlan Plan, options *PlansClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "PlansClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, name, appServicePlan, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -105,16 +115,19 @@ func (client *PlansClient) createOrUpdateCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, appServicePlan) + if err := runtime.MarshalAsJSON(req, appServicePlan); err != nil { + return nil, err + } + return req, nil } // CreateOrUpdateVnetRoute - Description for Create or update a Virtual Network route in an App Service plan. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service plan. // - vnetName - Name of the Virtual Network. @@ -123,18 +136,25 @@ func (client *PlansClient) createOrUpdateCreateRequest(ctx context.Context, reso // - options - PlansClientCreateOrUpdateVnetRouteOptions contains the optional parameters for the PlansClient.CreateOrUpdateVnetRoute // method. func (client *PlansClient) CreateOrUpdateVnetRoute(ctx context.Context, resourceGroupName string, name string, vnetName string, routeName string, route VnetRoute, options *PlansClientCreateOrUpdateVnetRouteOptions) (PlansClientCreateOrUpdateVnetRouteResponse, error) { + var err error + const operationName = "PlansClient.CreateOrUpdateVnetRoute" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateVnetRouteCreateRequest(ctx, resourceGroupName, name, vnetName, routeName, route, options) if err != nil { return PlansClientCreateOrUpdateVnetRouteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PlansClientCreateOrUpdateVnetRouteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientCreateOrUpdateVnetRouteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PlansClientCreateOrUpdateVnetRouteResponse{}, err } - return client.createOrUpdateVnetRouteHandleResponse(resp) + resp, err := client.createOrUpdateVnetRouteHandleResponse(httpResp) + return resp, err } // createOrUpdateVnetRouteCreateRequest creates the CreateOrUpdateVnetRoute request. @@ -165,10 +185,13 @@ func (client *PlansClient) createOrUpdateVnetRouteCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, route) + if err := runtime.MarshalAsJSON(req, route); err != nil { + return nil, err + } + return req, nil } // createOrUpdateVnetRouteHandleResponse handles the CreateOrUpdateVnetRoute response. @@ -183,21 +206,27 @@ func (client *PlansClient) createOrUpdateVnetRouteHandleResponse(resp *http.Resp // Delete - Description for Delete an App Service plan. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service plan. // - options - PlansClientDeleteOptions contains the optional parameters for the PlansClient.Delete method. func (client *PlansClient) Delete(ctx context.Context, resourceGroupName string, name string, options *PlansClientDeleteOptions) (PlansClientDeleteResponse, error) { + var err error + const operationName = "PlansClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return PlansClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PlansClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return PlansClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return PlansClientDeleteResponse{}, err } return PlansClientDeleteResponse{}, nil } @@ -222,7 +251,7 @@ func (client *PlansClient) deleteCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -231,7 +260,7 @@ func (client *PlansClient) deleteCreateRequest(ctx context.Context, resourceGrou // DeleteHybridConnection - Description for Delete a Hybrid Connection in use in an App Service plan. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service plan. // - namespaceName - Name of the Service Bus namespace. @@ -239,16 +268,22 @@ func (client *PlansClient) deleteCreateRequest(ctx context.Context, resourceGrou // - options - PlansClientDeleteHybridConnectionOptions contains the optional parameters for the PlansClient.DeleteHybridConnection // method. func (client *PlansClient) DeleteHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, options *PlansClientDeleteHybridConnectionOptions) (PlansClientDeleteHybridConnectionResponse, error) { + var err error + const operationName = "PlansClient.DeleteHybridConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteHybridConnectionCreateRequest(ctx, resourceGroupName, name, namespaceName, relayName, options) if err != nil { return PlansClientDeleteHybridConnectionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PlansClientDeleteHybridConnectionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return PlansClientDeleteHybridConnectionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return PlansClientDeleteHybridConnectionResponse{}, err } return PlansClientDeleteHybridConnectionResponse{}, nil } @@ -281,7 +316,7 @@ func (client *PlansClient) deleteHybridConnectionCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -290,23 +325,29 @@ func (client *PlansClient) deleteHybridConnectionCreateRequest(ctx context.Conte // DeleteVnetRoute - Description for Delete a Virtual Network route in an App Service plan. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service plan. // - vnetName - Name of the Virtual Network. // - routeName - Name of the Virtual Network route. // - options - PlansClientDeleteVnetRouteOptions contains the optional parameters for the PlansClient.DeleteVnetRoute method. func (client *PlansClient) DeleteVnetRoute(ctx context.Context, resourceGroupName string, name string, vnetName string, routeName string, options *PlansClientDeleteVnetRouteOptions) (PlansClientDeleteVnetRouteResponse, error) { + var err error + const operationName = "PlansClient.DeleteVnetRoute" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteVnetRouteCreateRequest(ctx, resourceGroupName, name, vnetName, routeName, options) if err != nil { return PlansClientDeleteVnetRouteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PlansClientDeleteVnetRouteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientDeleteVnetRouteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PlansClientDeleteVnetRouteResponse{}, err } return PlansClientDeleteVnetRouteResponse{}, nil } @@ -339,7 +380,7 @@ func (client *PlansClient) deleteVnetRouteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -348,23 +389,30 @@ func (client *PlansClient) deleteVnetRouteCreateRequest(ctx context.Context, res // Get - Description for Get an App Service plan. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service plan. // - options - PlansClientGetOptions contains the optional parameters for the PlansClient.Get method. func (client *PlansClient) Get(ctx context.Context, resourceGroupName string, name string, options *PlansClientGetOptions) (PlansClientGetResponse, error) { + var err error + const operationName = "PlansClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return PlansClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PlansClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PlansClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -387,7 +435,7 @@ func (client *PlansClient) getCreateRequest(ctx context.Context, resourceGroupNa return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -405,7 +453,7 @@ func (client *PlansClient) getHandleResponse(resp *http.Response) (PlansClientGe // GetHybridConnection - Description for Retrieve a Hybrid Connection in use in an App Service plan. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service plan. // - namespaceName - Name of the Service Bus namespace. @@ -413,18 +461,25 @@ func (client *PlansClient) getHandleResponse(resp *http.Response) (PlansClientGe // - options - PlansClientGetHybridConnectionOptions contains the optional parameters for the PlansClient.GetHybridConnection // method. func (client *PlansClient) GetHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, options *PlansClientGetHybridConnectionOptions) (PlansClientGetHybridConnectionResponse, error) { + var err error + const operationName = "PlansClient.GetHybridConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getHybridConnectionCreateRequest(ctx, resourceGroupName, name, namespaceName, relayName, options) if err != nil { return PlansClientGetHybridConnectionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PlansClientGetHybridConnectionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientGetHybridConnectionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PlansClientGetHybridConnectionResponse{}, err } - return client.getHybridConnectionHandleResponse(resp) + resp, err := client.getHybridConnectionHandleResponse(httpResp) + return resp, err } // getHybridConnectionCreateRequest creates the GetHybridConnection request. @@ -455,7 +510,7 @@ func (client *PlansClient) getHybridConnectionCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -473,24 +528,31 @@ func (client *PlansClient) getHybridConnectionHandleResponse(resp *http.Response // GetHybridConnectionPlanLimit - Description for Get the maximum number of Hybrid Connections allowed in an App Service plan. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service plan. // - options - PlansClientGetHybridConnectionPlanLimitOptions contains the optional parameters for the PlansClient.GetHybridConnectionPlanLimit // method. func (client *PlansClient) GetHybridConnectionPlanLimit(ctx context.Context, resourceGroupName string, name string, options *PlansClientGetHybridConnectionPlanLimitOptions) (PlansClientGetHybridConnectionPlanLimitResponse, error) { + var err error + const operationName = "PlansClient.GetHybridConnectionPlanLimit" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getHybridConnectionPlanLimitCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return PlansClientGetHybridConnectionPlanLimitResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PlansClientGetHybridConnectionPlanLimitResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientGetHybridConnectionPlanLimitResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PlansClientGetHybridConnectionPlanLimitResponse{}, err } - return client.getHybridConnectionPlanLimitHandleResponse(resp) + resp, err := client.getHybridConnectionPlanLimitHandleResponse(httpResp) + return resp, err } // getHybridConnectionPlanLimitCreateRequest creates the GetHybridConnectionPlanLimit request. @@ -513,7 +575,7 @@ func (client *PlansClient) getHybridConnectionPlanLimitCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -531,25 +593,32 @@ func (client *PlansClient) getHybridConnectionPlanLimitHandleResponse(resp *http // GetRouteForVnet - Description for Get a Virtual Network route in an App Service plan. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service plan. // - vnetName - Name of the Virtual Network. // - routeName - Name of the Virtual Network route. // - options - PlansClientGetRouteForVnetOptions contains the optional parameters for the PlansClient.GetRouteForVnet method. func (client *PlansClient) GetRouteForVnet(ctx context.Context, resourceGroupName string, name string, vnetName string, routeName string, options *PlansClientGetRouteForVnetOptions) (PlansClientGetRouteForVnetResponse, error) { + var err error + const operationName = "PlansClient.GetRouteForVnet" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getRouteForVnetCreateRequest(ctx, resourceGroupName, name, vnetName, routeName, options) if err != nil { return PlansClientGetRouteForVnetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PlansClientGetRouteForVnetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientGetRouteForVnetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PlansClientGetRouteForVnetResponse{}, err } - return client.getRouteForVnetHandleResponse(resp) + resp, err := client.getRouteForVnetHandleResponse(httpResp) + return resp, err } // getRouteForVnetCreateRequest creates the GetRouteForVnet request. @@ -580,7 +649,7 @@ func (client *PlansClient) getRouteForVnetCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -598,23 +667,30 @@ func (client *PlansClient) getRouteForVnetHandleResponse(resp *http.Response) (P // GetServerFarmSKUs - Description for Gets all selectable SKUs for a given App Service Plan // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of App Service Plan // - options - PlansClientGetServerFarmSKUsOptions contains the optional parameters for the PlansClient.GetServerFarmSKUs method. func (client *PlansClient) GetServerFarmSKUs(ctx context.Context, resourceGroupName string, name string, options *PlansClientGetServerFarmSKUsOptions) (PlansClientGetServerFarmSKUsResponse, error) { + var err error + const operationName = "PlansClient.GetServerFarmSKUs" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getServerFarmSKUsCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return PlansClientGetServerFarmSKUsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PlansClientGetServerFarmSKUsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientGetServerFarmSKUsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PlansClientGetServerFarmSKUsResponse{}, err } - return client.getServerFarmSKUsHandleResponse(resp) + resp, err := client.getServerFarmSKUsHandleResponse(httpResp) + return resp, err } // getServerFarmSKUsCreateRequest creates the GetServerFarmSKUs request. @@ -637,7 +713,7 @@ func (client *PlansClient) getServerFarmSKUsCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -655,25 +731,32 @@ func (client *PlansClient) getServerFarmSKUsHandleResponse(resp *http.Response) // GetVnetFromServerFarm - Description for Get a Virtual Network associated with an App Service plan. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service plan. // - vnetName - Name of the Virtual Network. // - options - PlansClientGetVnetFromServerFarmOptions contains the optional parameters for the PlansClient.GetVnetFromServerFarm // method. func (client *PlansClient) GetVnetFromServerFarm(ctx context.Context, resourceGroupName string, name string, vnetName string, options *PlansClientGetVnetFromServerFarmOptions) (PlansClientGetVnetFromServerFarmResponse, error) { + var err error + const operationName = "PlansClient.GetVnetFromServerFarm" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getVnetFromServerFarmCreateRequest(ctx, resourceGroupName, name, vnetName, options) if err != nil { return PlansClientGetVnetFromServerFarmResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PlansClientGetVnetFromServerFarmResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientGetVnetFromServerFarmResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PlansClientGetVnetFromServerFarmResponse{}, err } - return client.getVnetFromServerFarmHandleResponse(resp) + resp, err := client.getVnetFromServerFarmHandleResponse(httpResp) + return resp, err } // getVnetFromServerFarmCreateRequest creates the GetVnetFromServerFarm request. @@ -700,7 +783,7 @@ func (client *PlansClient) getVnetFromServerFarmCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -718,25 +801,32 @@ func (client *PlansClient) getVnetFromServerFarmHandleResponse(resp *http.Respon // GetVnetGateway - Description for Get a Virtual Network gateway. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service plan. // - vnetName - Name of the Virtual Network. // - gatewayName - Name of the gateway. Only the 'primary' gateway is supported. // - options - PlansClientGetVnetGatewayOptions contains the optional parameters for the PlansClient.GetVnetGateway method. func (client *PlansClient) GetVnetGateway(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, options *PlansClientGetVnetGatewayOptions) (PlansClientGetVnetGatewayResponse, error) { + var err error + const operationName = "PlansClient.GetVnetGateway" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getVnetGatewayCreateRequest(ctx, resourceGroupName, name, vnetName, gatewayName, options) if err != nil { return PlansClientGetVnetGatewayResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PlansClientGetVnetGatewayResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientGetVnetGatewayResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PlansClientGetVnetGatewayResponse{}, err } - return client.getVnetGatewayHandleResponse(resp) + resp, err := client.getVnetGatewayHandleResponse(httpResp) + return resp, err } // getVnetGatewayCreateRequest creates the GetVnetGateway request. @@ -767,7 +857,7 @@ func (client *PlansClient) getVnetGatewayCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -784,7 +874,7 @@ func (client *PlansClient) getVnetGatewayHandleResponse(resp *http.Response) (Pl // NewListPager - Description for Get all App Service plans for a subscription. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - options - PlansClientListOptions contains the optional parameters for the PlansClient.NewListPager method. func (client *PlansClient) NewListPager(options *PlansClientListOptions) *runtime.Pager[PlansClientListResponse] { return runtime.NewPager(runtime.PagingHandler[PlansClientListResponse]{ @@ -792,25 +882,20 @@ func (client *PlansClient) NewListPager(options *PlansClientListOptions) *runtim return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *PlansClientListResponse) (PlansClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PlansClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PlansClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return PlansClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -829,7 +914,7 @@ func (client *PlansClient) listCreateRequest(ctx context.Context, options *Plans if options != nil && options.Detailed != nil { reqQP.Set("detailed", strconv.FormatBool(*options.Detailed)) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -846,7 +931,7 @@ func (client *PlansClient) listHandleResponse(resp *http.Response) (PlansClientL // NewListByResourceGroupPager - Description for Get all App Service plans in a resource group. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - options - PlansClientListByResourceGroupOptions contains the optional parameters for the PlansClient.NewListByResourceGroupPager // method. @@ -856,25 +941,20 @@ func (client *PlansClient) NewListByResourceGroupPager(resourceGroupName string, return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *PlansClientListByResourceGroupResponse) (PlansClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PlansClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return PlansClientListByResourceGroupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return PlansClientListByResourceGroupResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -894,7 +974,7 @@ func (client *PlansClient) listByResourceGroupCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -912,23 +992,30 @@ func (client *PlansClient) listByResourceGroupHandleResponse(resp *http.Response // ListCapabilities - Description for List all capabilities of an App Service plan. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service plan. // - options - PlansClientListCapabilitiesOptions contains the optional parameters for the PlansClient.ListCapabilities method. func (client *PlansClient) ListCapabilities(ctx context.Context, resourceGroupName string, name string, options *PlansClientListCapabilitiesOptions) (PlansClientListCapabilitiesResponse, error) { + var err error + const operationName = "PlansClient.ListCapabilities" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listCapabilitiesCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return PlansClientListCapabilitiesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PlansClientListCapabilitiesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientListCapabilitiesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PlansClientListCapabilitiesResponse{}, err } - return client.listCapabilitiesHandleResponse(resp) + resp, err := client.listCapabilitiesHandleResponse(httpResp) + return resp, err } // listCapabilitiesCreateRequest creates the ListCapabilities request. @@ -951,7 +1038,7 @@ func (client *PlansClient) listCapabilitiesCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -969,7 +1056,7 @@ func (client *PlansClient) listCapabilitiesHandleResponse(resp *http.Response) ( // ListHybridConnectionKeys - Description for Get the send key name and value of a Hybrid Connection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service plan. // - namespaceName - The name of the Service Bus namespace. @@ -977,18 +1064,25 @@ func (client *PlansClient) listCapabilitiesHandleResponse(resp *http.Response) ( // - options - PlansClientListHybridConnectionKeysOptions contains the optional parameters for the PlansClient.ListHybridConnectionKeys // method. func (client *PlansClient) ListHybridConnectionKeys(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, options *PlansClientListHybridConnectionKeysOptions) (PlansClientListHybridConnectionKeysResponse, error) { + var err error + const operationName = "PlansClient.ListHybridConnectionKeys" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listHybridConnectionKeysCreateRequest(ctx, resourceGroupName, name, namespaceName, relayName, options) if err != nil { return PlansClientListHybridConnectionKeysResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PlansClientListHybridConnectionKeysResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientListHybridConnectionKeysResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PlansClientListHybridConnectionKeysResponse{}, err } - return client.listHybridConnectionKeysHandleResponse(resp) + resp, err := client.listHybridConnectionKeysHandleResponse(httpResp) + return resp, err } // listHybridConnectionKeysCreateRequest creates the ListHybridConnectionKeys request. @@ -1019,7 +1113,7 @@ func (client *PlansClient) listHybridConnectionKeysCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1036,7 +1130,7 @@ func (client *PlansClient) listHybridConnectionKeysHandleResponse(resp *http.Res // NewListHybridConnectionsPager - Description for Retrieve all Hybrid Connections in use in an App Service plan. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service plan. // - options - PlansClientListHybridConnectionsOptions contains the optional parameters for the PlansClient.NewListHybridConnectionsPager @@ -1047,25 +1141,20 @@ func (client *PlansClient) NewListHybridConnectionsPager(resourceGroupName strin return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *PlansClientListHybridConnectionsResponse) (PlansClientListHybridConnectionsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listHybridConnectionsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PlansClientListHybridConnectionsResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PlansClient.NewListHybridConnectionsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listHybridConnectionsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return PlansClientListHybridConnectionsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientListHybridConnectionsResponse{}, runtime.NewResponseError(resp) - } return client.listHybridConnectionsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -1089,7 +1178,7 @@ func (client *PlansClient) listHybridConnectionsCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1107,24 +1196,31 @@ func (client *PlansClient) listHybridConnectionsHandleResponse(resp *http.Respon // ListRoutesForVnet - Description for Get all routes that are associated with a Virtual Network in an App Service plan. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service plan. // - vnetName - Name of the Virtual Network. // - options - PlansClientListRoutesForVnetOptions contains the optional parameters for the PlansClient.ListRoutesForVnet method. func (client *PlansClient) ListRoutesForVnet(ctx context.Context, resourceGroupName string, name string, vnetName string, options *PlansClientListRoutesForVnetOptions) (PlansClientListRoutesForVnetResponse, error) { + var err error + const operationName = "PlansClient.ListRoutesForVnet" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listRoutesForVnetCreateRequest(ctx, resourceGroupName, name, vnetName, options) if err != nil { return PlansClientListRoutesForVnetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PlansClientListRoutesForVnetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientListRoutesForVnetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PlansClientListRoutesForVnetResponse{}, err } - return client.listRoutesForVnetHandleResponse(resp) + resp, err := client.listRoutesForVnetHandleResponse(httpResp) + return resp, err } // listRoutesForVnetCreateRequest creates the ListRoutesForVnet request. @@ -1151,7 +1247,7 @@ func (client *PlansClient) listRoutesForVnetCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1168,7 +1264,7 @@ func (client *PlansClient) listRoutesForVnetHandleResponse(resp *http.Response) // NewListUsagesPager - Description for Gets server farm usage information // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of App Service Plan // - options - PlansClientListUsagesOptions contains the optional parameters for the PlansClient.NewListUsagesPager method. @@ -1178,25 +1274,20 @@ func (client *PlansClient) NewListUsagesPager(resourceGroupName string, name str return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *PlansClientListUsagesResponse) (PlansClientListUsagesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listUsagesCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PlansClientListUsagesResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PlansClient.NewListUsagesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listUsagesCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return PlansClientListUsagesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientListUsagesResponse{}, runtime.NewResponseError(resp) - } return client.listUsagesHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -1220,7 +1311,7 @@ func (client *PlansClient) listUsagesCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() unencodedParams := []string{req.Raw().URL.RawQuery} if options != nil && options.Filter != nil { @@ -1243,23 +1334,30 @@ func (client *PlansClient) listUsagesHandleResponse(resp *http.Response) (PlansC // ListVnets - Description for Get all Virtual Networks associated with an App Service plan. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service plan. // - options - PlansClientListVnetsOptions contains the optional parameters for the PlansClient.ListVnets method. func (client *PlansClient) ListVnets(ctx context.Context, resourceGroupName string, name string, options *PlansClientListVnetsOptions) (PlansClientListVnetsResponse, error) { + var err error + const operationName = "PlansClient.ListVnets" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listVnetsCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return PlansClientListVnetsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PlansClientListVnetsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientListVnetsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PlansClientListVnetsResponse{}, err } - return client.listVnetsHandleResponse(resp) + resp, err := client.listVnetsHandleResponse(httpResp) + return resp, err } // listVnetsCreateRequest creates the ListVnets request. @@ -1282,7 +1380,7 @@ func (client *PlansClient) listVnetsCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1299,7 +1397,7 @@ func (client *PlansClient) listVnetsHandleResponse(resp *http.Response) (PlansCl // NewListWebAppsPager - Description for Get all apps associated with an App Service plan. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service plan. // - options - PlansClientListWebAppsOptions contains the optional parameters for the PlansClient.NewListWebAppsPager method. @@ -1309,25 +1407,20 @@ func (client *PlansClient) NewListWebAppsPager(resourceGroupName string, name st return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *PlansClientListWebAppsResponse) (PlansClientListWebAppsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listWebAppsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PlansClient.NewListWebAppsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listWebAppsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return PlansClientListWebAppsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return PlansClientListWebAppsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientListWebAppsResponse{}, runtime.NewResponseError(resp) - } return client.listWebAppsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -1351,7 +1444,7 @@ func (client *PlansClient) listWebAppsCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") if options != nil && options.SkipToken != nil { reqQP.Set("$skipToken", *options.SkipToken) } @@ -1379,7 +1472,7 @@ func (client *PlansClient) listWebAppsHandleResponse(resp *http.Response) (Plans // NewListWebAppsByHybridConnectionPager - Description for Get all apps that use a Hybrid Connection in an App Service Plan. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service plan. // - namespaceName - Name of the Hybrid Connection namespace. @@ -1392,25 +1485,20 @@ func (client *PlansClient) NewListWebAppsByHybridConnectionPager(resourceGroupNa return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *PlansClientListWebAppsByHybridConnectionResponse) (PlansClientListWebAppsByHybridConnectionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listWebAppsByHybridConnectionCreateRequest(ctx, resourceGroupName, name, namespaceName, relayName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return PlansClientListWebAppsByHybridConnectionResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "PlansClient.NewListWebAppsByHybridConnectionPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listWebAppsByHybridConnectionCreateRequest(ctx, resourceGroupName, name, namespaceName, relayName, options) + }, nil) if err != nil { return PlansClientListWebAppsByHybridConnectionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientListWebAppsByHybridConnectionResponse{}, runtime.NewResponseError(resp) - } return client.listWebAppsByHybridConnectionHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -1442,7 +1530,7 @@ func (client *PlansClient) listWebAppsByHybridConnectionCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1460,22 +1548,28 @@ func (client *PlansClient) listWebAppsByHybridConnectionHandleResponse(resp *htt // RebootWorker - Description for Reboot a worker machine in an App Service plan. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service plan. // - workerName - Name of worker machine, which typically starts with RD. // - options - PlansClientRebootWorkerOptions contains the optional parameters for the PlansClient.RebootWorker method. func (client *PlansClient) RebootWorker(ctx context.Context, resourceGroupName string, name string, workerName string, options *PlansClientRebootWorkerOptions) (PlansClientRebootWorkerResponse, error) { + var err error + const operationName = "PlansClient.RebootWorker" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.rebootWorkerCreateRequest(ctx, resourceGroupName, name, workerName, options) if err != nil { return PlansClientRebootWorkerResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PlansClientRebootWorkerResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return PlansClientRebootWorkerResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return PlansClientRebootWorkerResponse{}, err } return PlansClientRebootWorkerResponse{}, nil } @@ -1504,7 +1598,7 @@ func (client *PlansClient) rebootWorkerCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1513,21 +1607,27 @@ func (client *PlansClient) rebootWorkerCreateRequest(ctx context.Context, resour // RestartWebApps - Description for Restart all apps in an App Service plan. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service plan. // - options - PlansClientRestartWebAppsOptions contains the optional parameters for the PlansClient.RestartWebApps method. func (client *PlansClient) RestartWebApps(ctx context.Context, resourceGroupName string, name string, options *PlansClientRestartWebAppsOptions) (PlansClientRestartWebAppsResponse, error) { + var err error + const operationName = "PlansClient.RestartWebApps" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.restartWebAppsCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return PlansClientRestartWebAppsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PlansClientRestartWebAppsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return PlansClientRestartWebAppsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return PlansClientRestartWebAppsResponse{}, err } return PlansClientRestartWebAppsResponse{}, nil } @@ -1555,7 +1655,7 @@ func (client *PlansClient) restartWebAppsCreateRequest(ctx context.Context, reso if options != nil && options.SoftRestart != nil { reqQP.Set("softRestart", strconv.FormatBool(*options.SoftRestart)) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1564,24 +1664,31 @@ func (client *PlansClient) restartWebAppsCreateRequest(ctx context.Context, reso // Update - Description for Creates or updates an App Service Plan. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service plan. // - appServicePlan - Details of the App Service plan. // - options - PlansClientUpdateOptions contains the optional parameters for the PlansClient.Update method. func (client *PlansClient) Update(ctx context.Context, resourceGroupName string, name string, appServicePlan PlanPatchResource, options *PlansClientUpdateOptions) (PlansClientUpdateResponse, error) { + var err error + const operationName = "PlansClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, name, appServicePlan, options) if err != nil { return PlansClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PlansClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return PlansClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return PlansClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -1604,10 +1711,13 @@ func (client *PlansClient) updateCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, appServicePlan) + if err := runtime.MarshalAsJSON(req, appServicePlan); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. @@ -1622,7 +1732,7 @@ func (client *PlansClient) updateHandleResponse(resp *http.Response) (PlansClien // UpdateVnetGateway - Description for Update a Virtual Network gateway. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service plan. // - vnetName - Name of the Virtual Network. @@ -1630,18 +1740,25 @@ func (client *PlansClient) updateHandleResponse(resp *http.Response) (PlansClien // - connectionEnvelope - Definition of the gateway. // - options - PlansClientUpdateVnetGatewayOptions contains the optional parameters for the PlansClient.UpdateVnetGateway method. func (client *PlansClient) UpdateVnetGateway(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway, options *PlansClientUpdateVnetGatewayOptions) (PlansClientUpdateVnetGatewayResponse, error) { + var err error + const operationName = "PlansClient.UpdateVnetGateway" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateVnetGatewayCreateRequest(ctx, resourceGroupName, name, vnetName, gatewayName, connectionEnvelope, options) if err != nil { return PlansClientUpdateVnetGatewayResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PlansClientUpdateVnetGatewayResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientUpdateVnetGatewayResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PlansClientUpdateVnetGatewayResponse{}, err } - return client.updateVnetGatewayHandleResponse(resp) + resp, err := client.updateVnetGatewayHandleResponse(httpResp) + return resp, err } // updateVnetGatewayCreateRequest creates the UpdateVnetGateway request. @@ -1672,10 +1789,13 @@ func (client *PlansClient) updateVnetGatewayCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil } // updateVnetGatewayHandleResponse handles the UpdateVnetGateway response. @@ -1690,7 +1810,7 @@ func (client *PlansClient) updateVnetGatewayHandleResponse(resp *http.Response) // UpdateVnetRoute - Description for Create or update a Virtual Network route in an App Service plan. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the App Service plan. // - vnetName - Name of the Virtual Network. @@ -1698,18 +1818,25 @@ func (client *PlansClient) updateVnetGatewayHandleResponse(resp *http.Response) // - route - Definition of the Virtual Network route. // - options - PlansClientUpdateVnetRouteOptions contains the optional parameters for the PlansClient.UpdateVnetRoute method. func (client *PlansClient) UpdateVnetRoute(ctx context.Context, resourceGroupName string, name string, vnetName string, routeName string, route VnetRoute, options *PlansClientUpdateVnetRouteOptions) (PlansClientUpdateVnetRouteResponse, error) { + var err error + const operationName = "PlansClient.UpdateVnetRoute" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateVnetRouteCreateRequest(ctx, resourceGroupName, name, vnetName, routeName, route, options) if err != nil { return PlansClientUpdateVnetRouteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return PlansClientUpdateVnetRouteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PlansClientUpdateVnetRouteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return PlansClientUpdateVnetRouteResponse{}, err } - return client.updateVnetRouteHandleResponse(resp) + resp, err := client.updateVnetRouteHandleResponse(httpResp) + return resp, err } // updateVnetRouteCreateRequest creates the UpdateVnetRoute request. @@ -1740,10 +1867,13 @@ func (client *PlansClient) updateVnetRouteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, route) + if err := runtime.MarshalAsJSON(req, route); err != nil { + return nil, err + } + return req, nil } // updateVnetRouteHandleResponse handles the UpdateVnetRoute response. diff --git a/sdk/resourcemanager/appservice/armappservice/plans_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/plans_client_example_test.go deleted file mode 100644 index 6eb13dcebef0..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/plans_client_example_test.go +++ /dev/null @@ -1,348 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListAppServicePlans.json -func ExamplePlansClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewPlansClient().NewListPager(&armappservice.PlansClientListOptions{Detailed: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.PlanCollection = armappservice.PlanCollection{ - // Value: []*armappservice.Plan{ - // { - // Name: to.Ptr("testsf6141"), - // Type: to.Ptr("Microsoft.Web/serverfarms"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/testsf6141"), - // Kind: to.Ptr("app"), - // Location: to.Ptr("East US"), - // Properties: &armappservice.PlanProperties{ - // GeoRegion: to.Ptr("East US"), - // IsSpot: to.Ptr(false), - // MaximumNumberOfWorkers: to.Ptr[int32](20), - // NumberOfSites: to.Ptr[int32](4), - // NumberOfWorkers: to.Ptr[int32](19), - // ProvisioningState: to.Ptr(armappservice.ProvisioningStateSucceeded), - // Reserved: to.Ptr(false), - // Status: to.Ptr(armappservice.StatusOptionsReady), - // TargetWorkerCount: to.Ptr[int32](0), - // TargetWorkerSizeID: to.Ptr[int32](0), - // }, - // SKU: &armappservice.SKUDescription{ - // Name: to.Ptr("P1"), - // Capacity: to.Ptr[int32](1), - // Family: to.Ptr("P"), - // Size: to.Ptr("P1"), - // Tier: to.Ptr("Premium"), - // }, - // }, - // { - // Name: to.Ptr("testsf7252"), - // Type: to.Ptr("Microsoft.Web/serverfarms"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/testsf7252"), - // Kind: to.Ptr("app"), - // Location: to.Ptr("East US"), - // Properties: &armappservice.PlanProperties{ - // GeoRegion: to.Ptr("East US"), - // IsSpot: to.Ptr(false), - // MaximumNumberOfWorkers: to.Ptr[int32](20), - // NumberOfSites: to.Ptr[int32](4), - // NumberOfWorkers: to.Ptr[int32](19), - // ProvisioningState: to.Ptr(armappservice.ProvisioningStateSucceeded), - // Reserved: to.Ptr(false), - // Status: to.Ptr(armappservice.StatusOptionsReady), - // TargetWorkerCount: to.Ptr[int32](0), - // TargetWorkerSizeID: to.Ptr[int32](0), - // }, - // SKU: &armappservice.SKUDescription{ - // Name: to.Ptr("P1"), - // Capacity: to.Ptr[int32](1), - // Family: to.Ptr("P"), - // Size: to.Ptr("P1"), - // Tier: to.Ptr("Premium"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListAppServicePlansByResourceGroup.json -func ExamplePlansClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewPlansClient().NewListByResourceGroupPager("testrg123", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.PlanCollection = armappservice.PlanCollection{ - // Value: []*armappservice.Plan{ - // { - // Name: to.Ptr("testsf6141"), - // Type: to.Ptr("Microsoft.Web/serverfarms"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/testsf6141"), - // Kind: to.Ptr("app"), - // Location: to.Ptr("East US"), - // Properties: &armappservice.PlanProperties{ - // GeoRegion: to.Ptr("East US"), - // IsSpot: to.Ptr(false), - // MaximumNumberOfWorkers: to.Ptr[int32](20), - // NumberOfSites: to.Ptr[int32](4), - // NumberOfWorkers: to.Ptr[int32](19), - // ProvisioningState: to.Ptr(armappservice.ProvisioningStateSucceeded), - // Reserved: to.Ptr(false), - // Status: to.Ptr(armappservice.StatusOptionsReady), - // TargetWorkerCount: to.Ptr[int32](0), - // TargetWorkerSizeID: to.Ptr[int32](0), - // }, - // SKU: &armappservice.SKUDescription{ - // Name: to.Ptr("P1"), - // Capacity: to.Ptr[int32](1), - // Family: to.Ptr("P"), - // Size: to.Ptr("P1"), - // Tier: to.Ptr("Premium"), - // }, - // }, - // { - // Name: to.Ptr("testsf7252"), - // Type: to.Ptr("Microsoft.Web/serverfarms"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/testsf7252"), - // Kind: to.Ptr("app"), - // Location: to.Ptr("East US"), - // Properties: &armappservice.PlanProperties{ - // GeoRegion: to.Ptr("East US"), - // IsSpot: to.Ptr(false), - // MaximumNumberOfWorkers: to.Ptr[int32](20), - // NumberOfSites: to.Ptr[int32](4), - // NumberOfWorkers: to.Ptr[int32](19), - // ProvisioningState: to.Ptr(armappservice.ProvisioningStateSucceeded), - // Reserved: to.Ptr(false), - // Status: to.Ptr(armappservice.StatusOptionsReady), - // TargetWorkerCount: to.Ptr[int32](0), - // TargetWorkerSizeID: to.Ptr[int32](0), - // }, - // SKU: &armappservice.SKUDescription{ - // Name: to.Ptr("P1"), - // Capacity: to.Ptr[int32](1), - // Family: to.Ptr("P"), - // Size: to.Ptr("P1"), - // Tier: to.Ptr("Premium"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetAppServicePlan.json -func ExamplePlansClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPlansClient().Get(ctx, "testrg123", "testsf6141", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Plan = armappservice.Plan{ - // Name: to.Ptr("testsf6141"), - // Type: to.Ptr("Microsoft.Web/serverfarms"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/testsf6141"), - // Kind: to.Ptr("app"), - // Location: to.Ptr("East US"), - // Properties: &armappservice.PlanProperties{ - // GeoRegion: to.Ptr("East US"), - // IsSpot: to.Ptr(false), - // MaximumNumberOfWorkers: to.Ptr[int32](20), - // NumberOfSites: to.Ptr[int32](4), - // NumberOfWorkers: to.Ptr[int32](19), - // ProvisioningState: to.Ptr(armappservice.ProvisioningStateSucceeded), - // Reserved: to.Ptr(false), - // Status: to.Ptr(armappservice.StatusOptionsReady), - // TargetWorkerCount: to.Ptr[int32](0), - // TargetWorkerSizeID: to.Ptr[int32](0), - // }, - // SKU: &armappservice.SKUDescription{ - // Name: to.Ptr("P1"), - // Capacity: to.Ptr[int32](1), - // Family: to.Ptr("P"), - // Size: to.Ptr("P1"), - // Tier: to.Ptr("Premium"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/CreateOrUpdateAppServicePlan.json -func ExamplePlansClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPlansClient().BeginCreateOrUpdate(ctx, "testrg123", "testsf6141", armappservice.Plan{ - Kind: to.Ptr("app"), - Location: to.Ptr("East US"), - Properties: &armappservice.PlanProperties{}, - SKU: &armappservice.SKUDescription{ - Name: to.Ptr("P1"), - Capacity: to.Ptr[int32](1), - Family: to.Ptr("P"), - Size: to.Ptr("P1"), - Tier: to.Ptr("Premium"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Plan = armappservice.Plan{ - // Name: to.Ptr("testsf6141"), - // Type: to.Ptr("Microsoft.Web/serverfarms"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/testsf6141"), - // Kind: to.Ptr("app"), - // Location: to.Ptr("East US"), - // Properties: &armappservice.PlanProperties{ - // GeoRegion: to.Ptr("East US"), - // MaximumNumberOfWorkers: to.Ptr[int32](20), - // NumberOfSites: to.Ptr[int32](4), - // ProvisioningState: to.Ptr(armappservice.ProvisioningStateSucceeded), - // Reserved: to.Ptr(false), - // Status: to.Ptr(armappservice.StatusOptionsReady), - // TargetWorkerCount: to.Ptr[int32](0), - // TargetWorkerSizeID: to.Ptr[int32](0), - // }, - // SKU: &armappservice.SKUDescription{ - // Name: to.Ptr("P1"), - // Capacity: to.Ptr[int32](1), - // Family: to.Ptr("P"), - // Size: to.Ptr("P1"), - // Tier: to.Ptr("Premium"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/DeleteAppServicePlan.json -func ExamplePlansClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewPlansClient().Delete(ctx, "testrg123", "testsf6141", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/PatchAppServicePlan.json -func ExamplePlansClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewPlansClient().Update(ctx, "testrg123", "testsf6141", armappservice.PlanPatchResource{ - Kind: to.Ptr("app"), - Properties: &armappservice.PlanPatchResourceProperties{}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Plan = armappservice.Plan{ - // Name: to.Ptr("testsf6141"), - // Type: to.Ptr("Microsoft.Web/serverfarms"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/testsf6141"), - // Kind: to.Ptr("app"), - // Location: to.Ptr("East US"), - // Properties: &armappservice.PlanProperties{ - // GeoRegion: to.Ptr("East US"), - // MaximumNumberOfWorkers: to.Ptr[int32](20), - // NumberOfSites: to.Ptr[int32](4), - // ProvisioningState: to.Ptr(armappservice.ProvisioningStateSucceeded), - // Reserved: to.Ptr(false), - // Status: to.Ptr(armappservice.StatusOptionsReady), - // TargetWorkerCount: to.Ptr[int32](0), - // TargetWorkerSizeID: to.Ptr[int32](0), - // }, - // SKU: &armappservice.SKUDescription{ - // Name: to.Ptr("P1"), - // Capacity: to.Ptr[int32](1), - // Family: to.Ptr("P"), - // Size: to.Ptr("P1"), - // Tier: to.Ptr("Premium"), - // }, - // } -} diff --git a/sdk/resourcemanager/appservice/armappservice/provider_client.go b/sdk/resourcemanager/appservice/armappservice/provider_client.go index 26ecb945c209..67504aaedf67 100644 --- a/sdk/resourcemanager/appservice/armappservice/provider_client.go +++ b/sdk/resourcemanager/appservice/armappservice/provider_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappservice @@ -33,7 +32,7 @@ type ProviderClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewProviderClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProviderClient, error) { - cl, err := arm.NewClient(moduleName+".ProviderClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -46,7 +45,7 @@ func NewProviderClient(subscriptionID string, credential azcore.TokenCredential, // NewGetAvailableStacksPager - Description for Get available application frameworks and their versions // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - options - ProviderClientGetAvailableStacksOptions contains the optional parameters for the ProviderClient.NewGetAvailableStacksPager // method. func (client *ProviderClient) NewGetAvailableStacksPager(options *ProviderClientGetAvailableStacksOptions) *runtime.Pager[ProviderClientGetAvailableStacksResponse] { @@ -55,25 +54,20 @@ func (client *ProviderClient) NewGetAvailableStacksPager(options *ProviderClient return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ProviderClientGetAvailableStacksResponse) (ProviderClientGetAvailableStacksResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getAvailableStacksCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ProviderClient.NewGetAvailableStacksPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getAvailableStacksCreateRequest(ctx, options) + }, nil) if err != nil { return ProviderClientGetAvailableStacksResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ProviderClientGetAvailableStacksResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProviderClientGetAvailableStacksResponse{}, runtime.NewResponseError(resp) - } return client.getAvailableStacksHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -88,7 +82,7 @@ func (client *ProviderClient) getAvailableStacksCreateRequest(ctx context.Contex if options != nil && options.OSTypeSelected != nil { reqQP.Set("osTypeSelected", string(*options.OSTypeSelected)) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -105,7 +99,7 @@ func (client *ProviderClient) getAvailableStacksHandleResponse(resp *http.Respon // NewGetAvailableStacksOnPremPager - Description for Get available application frameworks and their versions // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - options - ProviderClientGetAvailableStacksOnPremOptions contains the optional parameters for the ProviderClient.NewGetAvailableStacksOnPremPager // method. func (client *ProviderClient) NewGetAvailableStacksOnPremPager(options *ProviderClientGetAvailableStacksOnPremOptions) *runtime.Pager[ProviderClientGetAvailableStacksOnPremResponse] { @@ -114,25 +108,20 @@ func (client *ProviderClient) NewGetAvailableStacksOnPremPager(options *Provider return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ProviderClientGetAvailableStacksOnPremResponse) (ProviderClientGetAvailableStacksOnPremResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getAvailableStacksOnPremCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ProviderClientGetAvailableStacksOnPremResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ProviderClient.NewGetAvailableStacksOnPremPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getAvailableStacksOnPremCreateRequest(ctx, options) + }, nil) if err != nil { return ProviderClientGetAvailableStacksOnPremResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProviderClientGetAvailableStacksOnPremResponse{}, runtime.NewResponseError(resp) - } return client.getAvailableStacksOnPremHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -151,7 +140,7 @@ func (client *ProviderClient) getAvailableStacksOnPremCreateRequest(ctx context. if options != nil && options.OSTypeSelected != nil { reqQP.Set("osTypeSelected", string(*options.OSTypeSelected)) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -168,7 +157,7 @@ func (client *ProviderClient) getAvailableStacksOnPremHandleResponse(resp *http. // NewGetFunctionAppStacksPager - Description for Get available Function app frameworks and their versions // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - options - ProviderClientGetFunctionAppStacksOptions contains the optional parameters for the ProviderClient.NewGetFunctionAppStacksPager // method. func (client *ProviderClient) NewGetFunctionAppStacksPager(options *ProviderClientGetFunctionAppStacksOptions) *runtime.Pager[ProviderClientGetFunctionAppStacksResponse] { @@ -177,25 +166,20 @@ func (client *ProviderClient) NewGetFunctionAppStacksPager(options *ProviderClie return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ProviderClientGetFunctionAppStacksResponse) (ProviderClientGetFunctionAppStacksResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getFunctionAppStacksCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ProviderClientGetFunctionAppStacksResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ProviderClient.NewGetFunctionAppStacksPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getFunctionAppStacksCreateRequest(ctx, options) + }, nil) if err != nil { return ProviderClientGetFunctionAppStacksResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProviderClientGetFunctionAppStacksResponse{}, runtime.NewResponseError(resp) - } return client.getFunctionAppStacksHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -210,7 +194,7 @@ func (client *ProviderClient) getFunctionAppStacksCreateRequest(ctx context.Cont if options != nil && options.StackOsType != nil { reqQP.Set("stackOsType", string(*options.StackOsType)) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -228,7 +212,7 @@ func (client *ProviderClient) getFunctionAppStacksHandleResponse(resp *http.Resp // NewGetFunctionAppStacksForLocationPager - Description for Get available Function app frameworks and their versions for // location // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - location - Function App stack location. // - options - ProviderClientGetFunctionAppStacksForLocationOptions contains the optional parameters for the ProviderClient.NewGetFunctionAppStacksForLocationPager // method. @@ -238,25 +222,20 @@ func (client *ProviderClient) NewGetFunctionAppStacksForLocationPager(location s return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ProviderClientGetFunctionAppStacksForLocationResponse) (ProviderClientGetFunctionAppStacksForLocationResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getFunctionAppStacksForLocationCreateRequest(ctx, location, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ProviderClientGetFunctionAppStacksForLocationResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ProviderClient.NewGetFunctionAppStacksForLocationPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getFunctionAppStacksForLocationCreateRequest(ctx, location, options) + }, nil) if err != nil { return ProviderClientGetFunctionAppStacksForLocationResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProviderClientGetFunctionAppStacksForLocationResponse{}, runtime.NewResponseError(resp) - } return client.getFunctionAppStacksForLocationHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -275,7 +254,7 @@ func (client *ProviderClient) getFunctionAppStacksForLocationCreateRequest(ctx c if options != nil && options.StackOsType != nil { reqQP.Set("stackOsType", string(*options.StackOsType)) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -292,7 +271,7 @@ func (client *ProviderClient) getFunctionAppStacksForLocationHandleResponse(resp // NewGetWebAppStacksPager - Description for Get available Web app frameworks and their versions // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - options - ProviderClientGetWebAppStacksOptions contains the optional parameters for the ProviderClient.NewGetWebAppStacksPager // method. func (client *ProviderClient) NewGetWebAppStacksPager(options *ProviderClientGetWebAppStacksOptions) *runtime.Pager[ProviderClientGetWebAppStacksResponse] { @@ -301,25 +280,20 @@ func (client *ProviderClient) NewGetWebAppStacksPager(options *ProviderClientGet return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ProviderClientGetWebAppStacksResponse) (ProviderClientGetWebAppStacksResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getWebAppStacksCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ProviderClient.NewGetWebAppStacksPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getWebAppStacksCreateRequest(ctx, options) + }, nil) if err != nil { return ProviderClientGetWebAppStacksResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ProviderClientGetWebAppStacksResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProviderClientGetWebAppStacksResponse{}, runtime.NewResponseError(resp) - } return client.getWebAppStacksHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -334,7 +308,7 @@ func (client *ProviderClient) getWebAppStacksCreateRequest(ctx context.Context, if options != nil && options.StackOsType != nil { reqQP.Set("stackOsType", string(*options.StackOsType)) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -351,7 +325,7 @@ func (client *ProviderClient) getWebAppStacksHandleResponse(resp *http.Response) // NewGetWebAppStacksForLocationPager - Description for Get available Web app frameworks and their versions for location // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - location - Web App stack location. // - options - ProviderClientGetWebAppStacksForLocationOptions contains the optional parameters for the ProviderClient.NewGetWebAppStacksForLocationPager // method. @@ -361,25 +335,20 @@ func (client *ProviderClient) NewGetWebAppStacksForLocationPager(location string return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ProviderClientGetWebAppStacksForLocationResponse) (ProviderClientGetWebAppStacksForLocationResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getWebAppStacksForLocationCreateRequest(ctx, location, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ProviderClientGetWebAppStacksForLocationResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ProviderClient.NewGetWebAppStacksForLocationPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getWebAppStacksForLocationCreateRequest(ctx, location, options) + }, nil) if err != nil { return ProviderClientGetWebAppStacksForLocationResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProviderClientGetWebAppStacksForLocationResponse{}, runtime.NewResponseError(resp) - } return client.getWebAppStacksForLocationHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -398,7 +367,7 @@ func (client *ProviderClient) getWebAppStacksForLocationCreateRequest(ctx contex if options != nil && options.StackOsType != nil { reqQP.Set("stackOsType", string(*options.StackOsType)) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -416,7 +385,7 @@ func (client *ProviderClient) getWebAppStacksForLocationHandleResponse(resp *htt // NewListOperationsPager - Description for Gets all available operations for the Microsoft.Web resource provider. Also exposes // resource metric definitions // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - options - ProviderClientListOperationsOptions contains the optional parameters for the ProviderClient.NewListOperationsPager // method. func (client *ProviderClient) NewListOperationsPager(options *ProviderClientListOperationsOptions) *runtime.Pager[ProviderClientListOperationsResponse] { @@ -425,25 +394,20 @@ func (client *ProviderClient) NewListOperationsPager(options *ProviderClientList return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ProviderClientListOperationsResponse) (ProviderClientListOperationsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listOperationsCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ProviderClient.NewListOperationsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listOperationsCreateRequest(ctx, options) + }, nil) if err != nil { return ProviderClientListOperationsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ProviderClientListOperationsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ProviderClientListOperationsResponse{}, runtime.NewResponseError(resp) - } return client.listOperationsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -455,7 +419,7 @@ func (client *ProviderClient) listOperationsCreateRequest(ctx context.Context, o return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/provider_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/provider_client_example_test.go deleted file mode 100644 index 8519278178b4..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/provider_client_example_test.go +++ /dev/null @@ -1,13014 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetFunctionAppStacks.json -func ExampleProviderClient_NewGetFunctionAppStacksPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewProviderClient().NewGetFunctionAppStacksPager(&armappservice.ProviderClientGetFunctionAppStacksOptions{StackOsType: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.FunctionAppStackCollection = armappservice.FunctionAppStackCollection{ - // Value: []*armappservice.FunctionAppStack{ - // { - // Name: to.Ptr("dotnet"), - // Type: to.Ptr("Microsoft.Web/functionAppStacks"), - // ID: to.Ptr("/providers/Microsoft.Web/functionAppStacks/dotnet"), - // Properties: &armappservice.FunctionAppStackProperties{ - // DisplayText: to.Ptr(".NET"), - // MajorVersions: []*armappservice.FunctionAppMajorVersion{ - // { - // DisplayText: to.Ptr(".NET Core 3"), - // MinorVersions: []*armappservice.FunctionAppMinorVersion{ - // { - // DisplayText: to.Ptr(".NET Core 3.1"), - // StackSettings: &armappservice.FunctionAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("dotnet"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("3.1.301"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("dotnet|3.1"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // LinuxFxVersion: to.Ptr("dotnet|3.1"), - // Use32BitWorkerProcess: to.Ptr(false), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~3")}, - // }, - // WindowsRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("dotnet"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("3.1.301"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("3.1"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // Use32BitWorkerProcess: to.Ptr(true), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~3")}, - // }, - // }, - // Value: to.Ptr("3.1"), - // }}, - // Value: to.Ptr("3"), - // }, - // { - // DisplayText: to.Ptr(".NET Core 2"), - // MinorVersions: []*armappservice.FunctionAppMinorVersion{ - // { - // DisplayText: to.Ptr(".NET Core 2.2"), - // StackSettings: &armappservice.FunctionAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("dotnet"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("2.2.207"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("dotnet|2.2"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // LinuxFxVersion: to.Ptr("dotnet|2.2"), - // Use32BitWorkerProcess: to.Ptr(false), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~2")}, - // }, - // WindowsRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("dotnet"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("2.2.207"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("2.2"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // Use32BitWorkerProcess: to.Ptr(true), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~2")}, - // }, - // }, - // Value: to.Ptr("2.2"), - // }}, - // Value: to.Ptr("2"), - // }, - // { - // DisplayText: to.Ptr(".NET Framework 4"), - // MinorVersions: []*armappservice.FunctionAppMinorVersion{ - // { - // DisplayText: to.Ptr(".NET Framework 4.7"), - // StackSettings: &armappservice.FunctionAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("4.7"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // Use32BitWorkerProcess: to.Ptr(true), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~1")}, - // }, - // }, - // Value: to.Ptr("4.7"), - // }}, - // Value: to.Ptr("2"), - // }}, - // PreferredOs: to.Ptr(armappservice.StackPreferredOsWindows), - // Value: to.Ptr("dotnet"), - // }, - // }, - // { - // Name: to.Ptr("node"), - // Type: to.Ptr("Microsoft.Web/functionAppStacks"), - // ID: to.Ptr("/providers/Microsoft.Web/functionAppStacks/node"), - // Properties: &armappservice.FunctionAppStackProperties{ - // DisplayText: to.Ptr("Node.js"), - // MajorVersions: []*armappservice.FunctionAppMajorVersion{ - // { - // DisplayText: to.Ptr("Node.js 14"), - // MinorVersions: []*armappservice.FunctionAppMinorVersion{ - // { - // DisplayText: to.Ptr("Node.js 14 LTS"), - // StackSettings: &armappservice.FunctionAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("node"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("14.x"), - // }, - // IsHidden: to.Ptr(true), - // IsPreview: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("Node|14"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // LinuxFxVersion: to.Ptr("Node|14"), - // Use32BitWorkerProcess: to.Ptr(false), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~3")}, - // }, - // WindowsRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("node"), - // "WEBSITE_NODE_DEFAULT_VERSION": to.Ptr("~14"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("14.x"), - // }, - // IsHidden: to.Ptr(true), - // IsPreview: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("~14"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // Use32BitWorkerProcess: to.Ptr(true), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~3")}, - // }, - // }, - // Value: to.Ptr("14 LTS"), - // }}, - // Value: to.Ptr("14"), - // }, - // { - // DisplayText: to.Ptr("Node.js 12"), - // MinorVersions: []*armappservice.FunctionAppMinorVersion{ - // { - // DisplayText: to.Ptr("Node.js 12 LTS"), - // StackSettings: &armappservice.FunctionAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("node"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("12.x"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("Node|12"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // LinuxFxVersion: to.Ptr("Node|12"), - // Use32BitWorkerProcess: to.Ptr(false), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~3")}, - // }, - // WindowsRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("node"), - // "WEBSITE_NODE_DEFAULT_VERSION": to.Ptr("~12"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("12.x"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("~12"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // Use32BitWorkerProcess: to.Ptr(true), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~3")}, - // }, - // }, - // Value: to.Ptr("12 LTS"), - // }}, - // Value: to.Ptr("12"), - // }, - // { - // DisplayText: to.Ptr("Node.js 10"), - // MinorVersions: []*armappservice.FunctionAppMinorVersion{ - // { - // DisplayText: to.Ptr("Node.js 10 LTS"), - // StackSettings: &armappservice.FunctionAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("node"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("10.x"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("Node|10"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // LinuxFxVersion: to.Ptr("Node|10"), - // Use32BitWorkerProcess: to.Ptr(false), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~2"), - // to.Ptr("~3")}, - // }, - // WindowsRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("node"), - // "WEBSITE_NODE_DEFAULT_VERSION": to.Ptr("~10"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("10.x"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("~10"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // Use32BitWorkerProcess: to.Ptr(true), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~2"), - // to.Ptr("~3")}, - // }, - // }, - // Value: to.Ptr("10 LTS"), - // }}, - // Value: to.Ptr("10"), - // }, - // { - // DisplayText: to.Ptr("Node.js 8"), - // MinorVersions: []*armappservice.FunctionAppMinorVersion{ - // { - // DisplayText: to.Ptr("Node.js 8 LTS"), - // StackSettings: &armappservice.FunctionAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("node"), - // "WEBSITE_NODE_DEFAULT_VERSION": to.Ptr("~8"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8.x"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("~8"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // Use32BitWorkerProcess: to.Ptr(true), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~2")}, - // }, - // }, - // Value: to.Ptr("8 LTS"), - // }}, - // Value: to.Ptr("8"), - // }, - // { - // DisplayText: to.Ptr("Node.js 6"), - // MinorVersions: []*armappservice.FunctionAppMinorVersion{ - // { - // DisplayText: to.Ptr("Node.js 6 LTS"), - // StackSettings: &armappservice.FunctionAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "WEBSITE_NODE_DEFAULT_VERSION": to.Ptr("~6"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("~6"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // Use32BitWorkerProcess: to.Ptr(true), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~1")}, - // }, - // }, - // Value: to.Ptr("6 LTS"), - // }}, - // Value: to.Ptr("6"), - // }}, - // PreferredOs: to.Ptr(armappservice.StackPreferredOsWindows), - // Value: to.Ptr("node"), - // }, - // }, - // { - // Name: to.Ptr("python"), - // Type: to.Ptr("Microsoft.Web/functionAppStacks"), - // ID: to.Ptr("/providers/Microsoft.Web/functionAppStacks/python"), - // Properties: &armappservice.FunctionAppStackProperties{ - // DisplayText: to.Ptr("Python"), - // MajorVersions: []*armappservice.FunctionAppMajorVersion{ - // { - // DisplayText: to.Ptr("Python 3"), - // MinorVersions: []*armappservice.FunctionAppMinorVersion{ - // { - // DisplayText: to.Ptr("Python 3.8"), - // StackSettings: &armappservice.FunctionAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("python"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("3.8"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("Python|3.8"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // LinuxFxVersion: to.Ptr("Python|3.8"), - // Use32BitWorkerProcess: to.Ptr(false), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~3")}, - // }, - // }, - // Value: to.Ptr("3.8"), - // }, - // { - // DisplayText: to.Ptr("Python 3.7"), - // StackSettings: &armappservice.FunctionAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("python"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("3.7"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("Python|3.7"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // LinuxFxVersion: to.Ptr("Python|3.7"), - // Use32BitWorkerProcess: to.Ptr(false), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~2"), - // to.Ptr("~3")}, - // }, - // }, - // Value: to.Ptr("3.7"), - // }, - // { - // DisplayText: to.Ptr("Python 3.6"), - // StackSettings: &armappservice.FunctionAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("python"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("3.6"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("Python|3.6"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // LinuxFxVersion: to.Ptr("Python|3.6"), - // Use32BitWorkerProcess: to.Ptr(false), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~2"), - // to.Ptr("~3")}, - // }, - // }, - // Value: to.Ptr("3.6"), - // }}, - // Value: to.Ptr("3"), - // }}, - // PreferredOs: to.Ptr(armappservice.StackPreferredOsLinux), - // Value: to.Ptr("python"), - // }, - // }, - // { - // Name: to.Ptr("java"), - // Type: to.Ptr("Microsoft.Web/functionAppStacks"), - // ID: to.Ptr("/providers/Microsoft.Web/functionAppStacks/java"), - // Properties: &armappservice.FunctionAppStackProperties{ - // DisplayText: to.Ptr("Java"), - // MajorVersions: []*armappservice.FunctionAppMajorVersion{ - // { - // DisplayText: to.Ptr("Java 11"), - // MinorVersions: []*armappservice.FunctionAppMinorVersion{ - // { - // DisplayText: to.Ptr("Java 11"), - // StackSettings: &armappservice.FunctionAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("java"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("11"), - // }, - // IsAutoUpdate: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("Java|11"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // LinuxFxVersion: to.Ptr("Java|11"), - // Use32BitWorkerProcess: to.Ptr(false), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~3")}, - // }, - // WindowsRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("java"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("11"), - // }, - // IsAutoUpdate: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("11"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // JavaVersion: to.Ptr("11"), - // Use32BitWorkerProcess: to.Ptr(true), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~3")}, - // }, - // }, - // Value: to.Ptr("11.0"), - // }}, - // Value: to.Ptr("11"), - // }, - // { - // DisplayText: to.Ptr("Java 8"), - // MinorVersions: []*armappservice.FunctionAppMinorVersion{ - // { - // DisplayText: to.Ptr("Java 8"), - // StackSettings: &armappservice.FunctionAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("java"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // IsAutoUpdate: to.Ptr(true), - // IsDefault: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("Java|8"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // LinuxFxVersion: to.Ptr("Java|8"), - // Use32BitWorkerProcess: to.Ptr(false), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~3")}, - // }, - // WindowsRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("java"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // IsAutoUpdate: to.Ptr(true), - // IsDefault: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.8"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // JavaVersion: to.Ptr("1.8"), - // Use32BitWorkerProcess: to.Ptr(true), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~2"), - // to.Ptr("~3")}, - // }, - // }, - // Value: to.Ptr("8.0"), - // }}, - // Value: to.Ptr("8"), - // }}, - // PreferredOs: to.Ptr(armappservice.StackPreferredOsWindows), - // Value: to.Ptr("java"), - // }, - // }, - // { - // Name: to.Ptr("powershell"), - // Type: to.Ptr("Microsoft.Web/functionAppStacks"), - // ID: to.Ptr("/providers/Microsoft.Web/functionAppStacks/powershell"), - // Properties: &armappservice.FunctionAppStackProperties{ - // DisplayText: to.Ptr("PowerShell Core"), - // MajorVersions: []*armappservice.FunctionAppMajorVersion{ - // { - // DisplayText: to.Ptr("PowerShell 7"), - // MinorVersions: []*armappservice.FunctionAppMinorVersion{ - // { - // DisplayText: to.Ptr("PowerShell 7.0"), - // StackSettings: &armappservice.FunctionAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("powershell"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("~7"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // PowerShellVersion: to.Ptr("~7"), - // Use32BitWorkerProcess: to.Ptr(true), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~3")}, - // }, - // }, - // Value: to.Ptr("7.0"), - // }}, - // Value: to.Ptr("7"), - // }, - // { - // DisplayText: to.Ptr("PowerShell Core 6"), - // MinorVersions: []*armappservice.FunctionAppMinorVersion{ - // { - // DisplayText: to.Ptr("PowerShell Core 6.2"), - // StackSettings: &armappservice.FunctionAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("powershell"), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-04T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("~6"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // PowerShellVersion: to.Ptr("~6"), - // Use32BitWorkerProcess: to.Ptr(true), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~2"), - // to.Ptr("~3")}, - // }, - // }, - // Value: to.Ptr("6.2"), - // }}, - // Value: to.Ptr("6"), - // }}, - // PreferredOs: to.Ptr(armappservice.StackPreferredOsWindows), - // Value: to.Ptr("powershell"), - // }, - // }, - // { - // Name: to.Ptr("custom"), - // Type: to.Ptr("Microsoft.Web/functionAppStacks"), - // ID: to.Ptr("/providers/Microsoft.Web/functionAppStacks/custom"), - // Properties: &armappservice.FunctionAppStackProperties{ - // DisplayText: to.Ptr("Custom"), - // MajorVersions: []*armappservice.FunctionAppMajorVersion{ - // { - // DisplayText: to.Ptr("Custom"), - // MinorVersions: []*armappservice.FunctionAppMinorVersion{ - // { - // DisplayText: to.Ptr("Custom Handler"), - // StackSettings: &armappservice.FunctionAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("custom"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsPreview: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr(""), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // LinuxFxVersion: to.Ptr(""), - // Use32BitWorkerProcess: to.Ptr(false), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~3"), - // to.Ptr("~2")}, - // }, - // WindowsRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("custom"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsPreview: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("custom"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // Use32BitWorkerProcess: to.Ptr(true), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~3"), - // to.Ptr("~2")}, - // }, - // }, - // Value: to.Ptr("custom"), - // }}, - // Value: to.Ptr("custom"), - // }}, - // PreferredOs: to.Ptr(armappservice.StackPreferredOsWindows), - // Value: to.Ptr("custom"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetFunctionAppStacksForLocation.json -func ExampleProviderClient_NewGetFunctionAppStacksForLocationPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewProviderClient().NewGetFunctionAppStacksForLocationPager("westus", &armappservice.ProviderClientGetFunctionAppStacksForLocationOptions{StackOsType: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.FunctionAppStackCollection = armappservice.FunctionAppStackCollection{ - // Value: []*armappservice.FunctionAppStack{ - // { - // Name: to.Ptr("dotnet"), - // Type: to.Ptr("Microsoft.Web/locations/functionAppStacks"), - // ID: to.Ptr("/providers/Microsoft.Web/locations/functionAppStacks/dotnet"), - // Location: to.Ptr("westus"), - // Properties: &armappservice.FunctionAppStackProperties{ - // DisplayText: to.Ptr(".NET"), - // MajorVersions: []*armappservice.FunctionAppMajorVersion{ - // { - // DisplayText: to.Ptr(".NET Core 3"), - // MinorVersions: []*armappservice.FunctionAppMinorVersion{ - // { - // DisplayText: to.Ptr(".NET Core 3.1"), - // StackSettings: &armappservice.FunctionAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("dotnet"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("3.1.301"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("dotnet|3.1"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // LinuxFxVersion: to.Ptr("dotnet|3.1"), - // Use32BitWorkerProcess: to.Ptr(false), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~3")}, - // }, - // WindowsRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("dotnet"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("3.1.301"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("3.1"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // Use32BitWorkerProcess: to.Ptr(true), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~3")}, - // }, - // }, - // Value: to.Ptr("3.1"), - // }}, - // Value: to.Ptr("3"), - // }, - // { - // DisplayText: to.Ptr(".NET Core 2"), - // MinorVersions: []*armappservice.FunctionAppMinorVersion{ - // { - // DisplayText: to.Ptr(".NET Core 2.2"), - // StackSettings: &armappservice.FunctionAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("dotnet"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("2.2.207"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("dotnet|2.2"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // LinuxFxVersion: to.Ptr("dotnet|2.2"), - // Use32BitWorkerProcess: to.Ptr(false), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~2")}, - // }, - // WindowsRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("dotnet"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("2.2.207"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("2.2"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // Use32BitWorkerProcess: to.Ptr(true), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~2")}, - // }, - // }, - // Value: to.Ptr("2.2"), - // }}, - // Value: to.Ptr("2"), - // }, - // { - // DisplayText: to.Ptr(".NET Framework 4"), - // MinorVersions: []*armappservice.FunctionAppMinorVersion{ - // { - // DisplayText: to.Ptr(".NET Framework 4.7"), - // StackSettings: &armappservice.FunctionAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("4.7"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // Use32BitWorkerProcess: to.Ptr(true), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~1")}, - // }, - // }, - // Value: to.Ptr("4.7"), - // }}, - // Value: to.Ptr("2"), - // }}, - // PreferredOs: to.Ptr(armappservice.StackPreferredOsWindows), - // Value: to.Ptr("dotnet"), - // }, - // }, - // { - // Name: to.Ptr("node"), - // Type: to.Ptr("Microsoft.Web/locations/functionAppStacks"), - // ID: to.Ptr("/providers/Microsoft.Web/locations/functionAppStacks/node"), - // Location: to.Ptr("westus"), - // Properties: &armappservice.FunctionAppStackProperties{ - // DisplayText: to.Ptr("Node.js"), - // MajorVersions: []*armappservice.FunctionAppMajorVersion{ - // { - // DisplayText: to.Ptr("Node.js 14"), - // MinorVersions: []*armappservice.FunctionAppMinorVersion{ - // { - // DisplayText: to.Ptr("Node.js 14 LTS"), - // StackSettings: &armappservice.FunctionAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("node"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("14.x"), - // }, - // IsHidden: to.Ptr(true), - // IsPreview: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("Node|14"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // LinuxFxVersion: to.Ptr("Node|14"), - // Use32BitWorkerProcess: to.Ptr(false), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~3")}, - // }, - // WindowsRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("node"), - // "WEBSITE_NODE_DEFAULT_VERSION": to.Ptr("~14"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("14.x"), - // }, - // IsHidden: to.Ptr(true), - // IsPreview: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("~14"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // Use32BitWorkerProcess: to.Ptr(true), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~3")}, - // }, - // }, - // Value: to.Ptr("14 LTS"), - // }}, - // Value: to.Ptr("14"), - // }, - // { - // DisplayText: to.Ptr("Node.js 12"), - // MinorVersions: []*armappservice.FunctionAppMinorVersion{ - // { - // DisplayText: to.Ptr("Node.js 12 LTS"), - // StackSettings: &armappservice.FunctionAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("node"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("12.x"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("Node|12"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // LinuxFxVersion: to.Ptr("Node|12"), - // Use32BitWorkerProcess: to.Ptr(false), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~3")}, - // }, - // WindowsRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("node"), - // "WEBSITE_NODE_DEFAULT_VERSION": to.Ptr("~12"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("12.x"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("~12"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // Use32BitWorkerProcess: to.Ptr(true), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~3")}, - // }, - // }, - // Value: to.Ptr("12 LTS"), - // }}, - // Value: to.Ptr("12"), - // }, - // { - // DisplayText: to.Ptr("Node.js 10"), - // MinorVersions: []*armappservice.FunctionAppMinorVersion{ - // { - // DisplayText: to.Ptr("Node.js 10 LTS"), - // StackSettings: &armappservice.FunctionAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("node"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("10.x"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("Node|10"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // LinuxFxVersion: to.Ptr("Node|10"), - // Use32BitWorkerProcess: to.Ptr(false), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~2"), - // to.Ptr("~3")}, - // }, - // WindowsRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("node"), - // "WEBSITE_NODE_DEFAULT_VERSION": to.Ptr("~10"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("10.x"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("~10"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // Use32BitWorkerProcess: to.Ptr(true), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~2"), - // to.Ptr("~3")}, - // }, - // }, - // Value: to.Ptr("10 LTS"), - // }}, - // Value: to.Ptr("10"), - // }, - // { - // DisplayText: to.Ptr("Node.js 8"), - // MinorVersions: []*armappservice.FunctionAppMinorVersion{ - // { - // DisplayText: to.Ptr("Node.js 8 LTS"), - // StackSettings: &armappservice.FunctionAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("node"), - // "WEBSITE_NODE_DEFAULT_VERSION": to.Ptr("~8"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8.x"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("~8"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // Use32BitWorkerProcess: to.Ptr(true), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~2")}, - // }, - // }, - // Value: to.Ptr("8 LTS"), - // }}, - // Value: to.Ptr("8"), - // }, - // { - // DisplayText: to.Ptr("Node.js 6"), - // MinorVersions: []*armappservice.FunctionAppMinorVersion{ - // { - // DisplayText: to.Ptr("Node.js 6 LTS"), - // StackSettings: &armappservice.FunctionAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "WEBSITE_NODE_DEFAULT_VERSION": to.Ptr("~6"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("~6"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // Use32BitWorkerProcess: to.Ptr(true), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~1")}, - // }, - // }, - // Value: to.Ptr("6 LTS"), - // }}, - // Value: to.Ptr("6"), - // }}, - // PreferredOs: to.Ptr(armappservice.StackPreferredOsWindows), - // Value: to.Ptr("node"), - // }, - // }, - // { - // Name: to.Ptr("python"), - // Type: to.Ptr("Microsoft.Web/locations/functionAppStacks"), - // ID: to.Ptr("/providers/Microsoft.Web/locations/functionAppStacks/python"), - // Location: to.Ptr("westus"), - // Properties: &armappservice.FunctionAppStackProperties{ - // DisplayText: to.Ptr("Python"), - // MajorVersions: []*armappservice.FunctionAppMajorVersion{ - // { - // DisplayText: to.Ptr("Python 3"), - // MinorVersions: []*armappservice.FunctionAppMinorVersion{ - // { - // DisplayText: to.Ptr("Python 3.8"), - // StackSettings: &armappservice.FunctionAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("python"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("3.8"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("Python|3.8"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // LinuxFxVersion: to.Ptr("Python|3.8"), - // Use32BitWorkerProcess: to.Ptr(false), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~3")}, - // }, - // }, - // Value: to.Ptr("3.8"), - // }, - // { - // DisplayText: to.Ptr("Python 3.7"), - // StackSettings: &armappservice.FunctionAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("python"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("3.7"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("Python|3.7"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // LinuxFxVersion: to.Ptr("Python|3.7"), - // Use32BitWorkerProcess: to.Ptr(false), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~2"), - // to.Ptr("~3")}, - // }, - // }, - // Value: to.Ptr("3.7"), - // }, - // { - // DisplayText: to.Ptr("Python 3.6"), - // StackSettings: &armappservice.FunctionAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("python"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("3.6"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("Python|3.6"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // LinuxFxVersion: to.Ptr("Python|3.6"), - // Use32BitWorkerProcess: to.Ptr(false), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~2"), - // to.Ptr("~3")}, - // }, - // }, - // Value: to.Ptr("3.6"), - // }}, - // Value: to.Ptr("3"), - // }}, - // PreferredOs: to.Ptr(armappservice.StackPreferredOsLinux), - // Value: to.Ptr("python"), - // }, - // }, - // { - // Name: to.Ptr("java"), - // Type: to.Ptr("Microsoft.Web/locations/functionAppStacks"), - // ID: to.Ptr("/providers/Microsoft.Web/locations/functionAppStacks/java"), - // Location: to.Ptr("westus"), - // Properties: &armappservice.FunctionAppStackProperties{ - // DisplayText: to.Ptr("Java"), - // MajorVersions: []*armappservice.FunctionAppMajorVersion{ - // { - // DisplayText: to.Ptr("Java 11"), - // MinorVersions: []*armappservice.FunctionAppMinorVersion{ - // { - // DisplayText: to.Ptr("Java 11"), - // StackSettings: &armappservice.FunctionAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("java"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("11"), - // }, - // IsAutoUpdate: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("Java|11"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // LinuxFxVersion: to.Ptr("Java|11"), - // Use32BitWorkerProcess: to.Ptr(false), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~3")}, - // }, - // WindowsRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("java"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("11"), - // }, - // IsAutoUpdate: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("11"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // JavaVersion: to.Ptr("11"), - // Use32BitWorkerProcess: to.Ptr(true), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~3")}, - // }, - // }, - // Value: to.Ptr("11.0"), - // }}, - // Value: to.Ptr("11"), - // }, - // { - // DisplayText: to.Ptr("Java 8"), - // MinorVersions: []*armappservice.FunctionAppMinorVersion{ - // { - // DisplayText: to.Ptr("Java 8"), - // StackSettings: &armappservice.FunctionAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("java"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // IsAutoUpdate: to.Ptr(true), - // IsDefault: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("Java|8"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // LinuxFxVersion: to.Ptr("Java|8"), - // Use32BitWorkerProcess: to.Ptr(false), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~3")}, - // }, - // WindowsRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("java"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // IsAutoUpdate: to.Ptr(true), - // IsDefault: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.8"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // JavaVersion: to.Ptr("1.8"), - // Use32BitWorkerProcess: to.Ptr(true), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~2"), - // to.Ptr("~3")}, - // }, - // }, - // Value: to.Ptr("8.0"), - // }}, - // Value: to.Ptr("8"), - // }}, - // PreferredOs: to.Ptr(armappservice.StackPreferredOsWindows), - // Value: to.Ptr("java"), - // }, - // }, - // { - // Name: to.Ptr("powershell"), - // Type: to.Ptr("Microsoft.Web/locations/functionAppStacks"), - // ID: to.Ptr("/providers/Microsoft.Web/locations/functionAppStacks/powershell"), - // Location: to.Ptr("westus"), - // Properties: &armappservice.FunctionAppStackProperties{ - // DisplayText: to.Ptr("PowerShell Core"), - // MajorVersions: []*armappservice.FunctionAppMajorVersion{ - // { - // DisplayText: to.Ptr("PowerShell 7"), - // MinorVersions: []*armappservice.FunctionAppMinorVersion{ - // { - // DisplayText: to.Ptr("PowerShell 7.0"), - // StackSettings: &armappservice.FunctionAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("powershell"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("~7"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // PowerShellVersion: to.Ptr("~7"), - // Use32BitWorkerProcess: to.Ptr(true), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~3")}, - // }, - // }, - // Value: to.Ptr("7.0"), - // }}, - // Value: to.Ptr("7"), - // }, - // { - // DisplayText: to.Ptr("PowerShell Core 6"), - // MinorVersions: []*armappservice.FunctionAppMinorVersion{ - // { - // DisplayText: to.Ptr("PowerShell Core 6.2"), - // StackSettings: &armappservice.FunctionAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("powershell"), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-04T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("~6"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // PowerShellVersion: to.Ptr("~6"), - // Use32BitWorkerProcess: to.Ptr(true), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~2"), - // to.Ptr("~3")}, - // }, - // }, - // Value: to.Ptr("6.2"), - // }}, - // Value: to.Ptr("6"), - // }}, - // PreferredOs: to.Ptr(armappservice.StackPreferredOsWindows), - // Value: to.Ptr("powershell"), - // }, - // }, - // { - // Name: to.Ptr("custom"), - // Type: to.Ptr("Microsoft.Web/locations/functionAppStacks"), - // ID: to.Ptr("/providers/Microsoft.Web/locations/functionAppStacks/custom"), - // Location: to.Ptr("westus"), - // Properties: &armappservice.FunctionAppStackProperties{ - // DisplayText: to.Ptr("Custom"), - // MajorVersions: []*armappservice.FunctionAppMajorVersion{ - // { - // DisplayText: to.Ptr("Custom"), - // MinorVersions: []*armappservice.FunctionAppMinorVersion{ - // { - // DisplayText: to.Ptr("Custom Handler"), - // StackSettings: &armappservice.FunctionAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("custom"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsPreview: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr(""), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // LinuxFxVersion: to.Ptr(""), - // Use32BitWorkerProcess: to.Ptr(false), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~3"), - // to.Ptr("~2")}, - // }, - // WindowsRuntimeSettings: &armappservice.FunctionAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // AppSettingsDictionary: map[string]*string{ - // "FUNCTIONS_WORKER_RUNTIME": to.Ptr("custom"), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsPreview: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("custom"), - // SiteConfigPropertiesDictionary: &armappservice.SiteConfigPropertiesDictionary{ - // Use32BitWorkerProcess: to.Ptr(true), - // }, - // SupportedFunctionsExtensionVersions: []*string{ - // to.Ptr("~3"), - // to.Ptr("~2")}, - // }, - // }, - // Value: to.Ptr("custom"), - // }}, - // Value: to.Ptr("custom"), - // }}, - // PreferredOs: to.Ptr(armappservice.StackPreferredOsWindows), - // Value: to.Ptr("custom"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetWebAppStacksForLocation.json -func ExampleProviderClient_NewGetWebAppStacksForLocationPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewProviderClient().NewGetWebAppStacksForLocationPager("westus", &armappservice.ProviderClientGetWebAppStacksForLocationOptions{StackOsType: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.WebAppStackCollection = armappservice.WebAppStackCollection{ - // Value: []*armappservice.WebAppStack{ - // { - // Name: to.Ptr("dotnet"), - // Type: to.Ptr("Microsoft.Web/locations/webAppStacks"), - // ID: to.Ptr("/providers/Microsoft.Web/locations/webAppStacks/dotnet"), - // Location: to.Ptr("westus"), - // Properties: &armappservice.WebAppStackProperties{ - // DisplayText: to.Ptr(".NET"), - // MajorVersions: []*armappservice.WebAppMajorVersion{ - // { - // DisplayText: to.Ptr(".NET 5"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr(".NET 5"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("5.0.x"), - // }, - // IsEarlyAccess: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("DOTNETCORE|5.0"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("5.0.x"), - // }, - // IsEarlyAccess: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("v5.0"), - // }, - // }, - // Value: to.Ptr("5"), - // }}, - // Value: to.Ptr("5"), - // }, - // { - // DisplayText: to.Ptr(".NET Core 3"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr(".NET Core 3.1 (LTS)"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("3.1.301"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("DOTNETCORE|3.1"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("3.1.301"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("3.1"), - // }, - // }, - // Value: to.Ptr("3.1"), - // }, - // { - // DisplayText: to.Ptr(".NET Core 3.0"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-03T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("3.0.103"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("DOTNETCORE|3.0"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-03T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("3.0.103"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("3.0"), - // }, - // }, - // Value: to.Ptr("3.0"), - // }}, - // Value: to.Ptr("3"), - // }, - // { - // DisplayText: to.Ptr(".NET Core 2"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr(".NET Core 2.2"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-23T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("2.2.207"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("DOTNETCORE|2.2"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-23T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("2.2.207"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("2.2"), - // }, - // }, - // Value: to.Ptr("2.2"), - // }, - // { - // DisplayText: to.Ptr(".NET Core 2.1 (LTS)"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-21T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("2.1.807"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("DOTNETCORE|2.1"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-21T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("2.1.807"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("2.1"), - // }, - // }, - // Value: to.Ptr("2.1"), - // }, - // { - // DisplayText: to.Ptr(".NET Core 2.0"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-11-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("2.1.202"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("DOTNETCORE|2.0"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-11-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("2.1.202"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("2.0"), - // }, - // }, - // Value: to.Ptr("2.0"), - // }}, - // Value: to.Ptr("dotnetcore2"), - // }, - // { - // DisplayText: to.Ptr(".NET Core 1"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr(".NET Core 1.1"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-27T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("1.1.14"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("DOTNETCORE|1.1"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-27T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("1.1.14"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.1"), - // }, - // }, - // Value: to.Ptr("1.1"), - // }, - // { - // DisplayText: to.Ptr(".NET Core 1.0"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-27T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("1.1.14"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("DOTNETCORE|1.0"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-27T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("1.1.14"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.0"), - // }, - // }, - // Value: to.Ptr("1.0"), - // }}, - // Value: to.Ptr("1"), - // }, - // { - // DisplayText: to.Ptr("ASP.NET V4"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("ASP.NET V4.8"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("3.1"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("v4.0"), - // }, - // }, - // Value: to.Ptr("v4.8"), - // }}, - // Value: to.Ptr("v4"), - // }, - // { - // DisplayText: to.Ptr("ASP.NET V3"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("ASP.NET V3.5"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("2.1"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("v2.0"), - // }, - // }, - // Value: to.Ptr("v3.5"), - // }}, - // Value: to.Ptr("v3"), - // }}, - // PreferredOs: to.Ptr(armappservice.StackPreferredOsWindows), - // Value: to.Ptr("dotnet"), - // }, - // }, - // { - // Name: to.Ptr("node"), - // Type: to.Ptr("Microsoft.Web/locations/webAppStacks"), - // ID: to.Ptr("/providers/Microsoft.Web/locations/webAppStacks/node"), - // Location: to.Ptr("westus"), - // Properties: &armappservice.WebAppStackProperties{ - // DisplayText: to.Ptr("Node"), - // MajorVersions: []*armappservice.WebAppMajorVersion{ - // { - // DisplayText: to.Ptr("Node LTS"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Node LTS"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|lts"), - // }, - // }, - // Value: to.Ptr("lts"), - // }}, - // Value: to.Ptr("lts"), - // }, - // { - // DisplayText: to.Ptr("Node 14"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Node 14 LTS"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-30T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("14.x"), - // }, - // IsPreview: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|14-lts"), - // }, - // }, - // Value: to.Ptr("14-lts"), - // }}, - // Value: to.Ptr("14"), - // }, - // { - // DisplayText: to.Ptr("Node 12"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Node 12 LTS"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("12.x"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|12-lts"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("12.13.0"), - // }, - // }, - // Value: to.Ptr("12-lts"), - // }, - // { - // DisplayText: to.Ptr("Node 12.9"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("12.x"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(true), - // RuntimeVersion: to.Ptr("NODE|12.9"), - // }, - // }, - // Value: to.Ptr("12.9"), - // }}, - // Value: to.Ptr("12"), - // }, - // { - // DisplayText: to.Ptr("Node 10"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Node 10 LTS"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("10.x"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|10-lts"), - // }, - // }, - // Value: to.Ptr("10-LTS"), - // }, - // { - // DisplayText: to.Ptr("Node 10.16"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("10.x"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|10.16"), - // }, - // }, - // Value: to.Ptr("10.16"), - // }, - // { - // DisplayText: to.Ptr("Node 10.15"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("10.x"), - // }, - // IsHidden: to.Ptr(true), - // IsPreview: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("10.15.2"), - // }, - // }, - // Value: to.Ptr("10.15"), - // }, - // { - // DisplayText: to.Ptr("Node 10.14"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("10.x"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|10.14"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("10.x"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("10.14.1"), - // }, - // }, - // Value: to.Ptr("10.14"), - // }, - // { - // DisplayText: to.Ptr("Node 10.12"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("10.x"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|10.12"), - // }, - // }, - // Value: to.Ptr("10.12"), - // }, - // { - // DisplayText: to.Ptr("Node 10.10"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("10.x"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|10.10"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("10.x"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("10.0.0"), - // }, - // }, - // Value: to.Ptr("10.10"), - // }, - // { - // DisplayText: to.Ptr("Node 10.6"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("10.x"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|10.6"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("10.6.0"), - // }, - // }, - // Value: to.Ptr("10.6"), - // }, - // { - // DisplayText: to.Ptr("Node 10.1"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("10.x"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|10.1"), - // }, - // }, - // Value: to.Ptr("10.1"), - // }}, - // Value: to.Ptr("10"), - // }, - // { - // DisplayText: to.Ptr("Node 9"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Node 9.4"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-30T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|9.4"), - // }, - // }, - // Value: to.Ptr("9.4"), - // }}, - // Value: to.Ptr("9"), - // }, - // { - // DisplayText: to.Ptr("Node 8"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Node 8 LTS"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-31T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|8-lts"), - // }, - // }, - // Value: to.Ptr("8-lts"), - // }, - // { - // DisplayText: to.Ptr("Node 8.12"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-31T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|8.12"), - // }, - // }, - // Value: to.Ptr("8.12"), - // }, - // { - // DisplayText: to.Ptr("Node 8.11"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-31T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|8.11"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-31T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("8.11"), - // }, - // }, - // Value: to.Ptr("8.11"), - // }, - // { - // DisplayText: to.Ptr("Node 8.10"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-31T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("8.10"), - // }, - // }, - // Value: to.Ptr("8.10"), - // }, - // { - // DisplayText: to.Ptr("Node 8.9"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-31T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|8.9"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-31T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("8.9"), - // }, - // }, - // Value: to.Ptr("8.9"), - // }, - // { - // DisplayText: to.Ptr("Node 8.8"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-31T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|8.8"), - // }, - // }, - // Value: to.Ptr("8.8"), - // }, - // { - // DisplayText: to.Ptr("Node 8.5"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-31T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("8.5"), - // }, - // }, - // Value: to.Ptr("8.5"), - // }, - // { - // DisplayText: to.Ptr("Node 8.4"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-31T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("8.4"), - // }, - // }, - // Value: to.Ptr("8.4"), - // }, - // { - // DisplayText: to.Ptr("Node 8.2"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-31T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|8.2"), - // }, - // }, - // Value: to.Ptr("8.2"), - // }, - // { - // DisplayText: to.Ptr("Node 8.1"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-31T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|8.1"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-31T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("8.1.4"), - // }, - // }, - // Value: to.Ptr("8.1"), - // }, - // { - // DisplayText: to.Ptr("Node 8.0"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-31T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|8.0"), - // }, - // }, - // Value: to.Ptr("8.0"), - // }}, - // Value: to.Ptr("8"), - // }, - // { - // DisplayText: to.Ptr("Node 7"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Node 7.10"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-07-30T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("7.10.1"), - // }, - // }, - // Value: to.Ptr("7.10"), - // }}, - // Value: to.Ptr("7"), - // }, - // { - // DisplayText: to.Ptr("Node 6"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Node 6 LTS"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-30T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|6-lts"), - // }, - // }, - // Value: to.Ptr("6-LTS"), - // }, - // { - // DisplayText: to.Ptr("Node 6.12"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-30T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("6.12"), - // }, - // }, - // Value: to.Ptr("6.12"), - // }, - // { - // DisplayText: to.Ptr("Node 6.11"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-30T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|6.11"), - // }, - // }, - // Value: to.Ptr("6.11"), - // }, - // { - // DisplayText: to.Ptr("Node 6.10"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-30T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|6.10"), - // }, - // }, - // Value: to.Ptr("6.10"), - // }, - // { - // DisplayText: to.Ptr("Node 6.9"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-30T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|6.9"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-30T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("6.9.5"), - // }, - // }, - // Value: to.Ptr("6.9"), - // }, - // { - // DisplayText: to.Ptr("Node 6.6"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-30T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|6.6"), - // }, - // }, - // Value: to.Ptr("6.6"), - // }, - // { - // DisplayText: to.Ptr("Node 6.5"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-30T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("6.5.0"), - // }, - // }, - // Value: to.Ptr("6.5"), - // }, - // { - // DisplayText: to.Ptr("Node 6.2"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-30T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|6.2"), - // }, - // }, - // Value: to.Ptr("6.2"), - // }}, - // Value: to.Ptr("6"), - // }, - // { - // DisplayText: to.Ptr("Node 4"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Node 4.8"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-05-30T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|4.8"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-05-30T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("4.8"), - // }, - // }, - // Value: to.Ptr("4.8"), - // }, - // { - // DisplayText: to.Ptr("Node 4.5"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-05-30T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|4.5"), - // }, - // }, - // Value: to.Ptr("4.5"), - // }, - // { - // DisplayText: to.Ptr("Node 4.4"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-05-30T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|4.4"), - // }, - // }, - // Value: to.Ptr("4.4"), - // }}, - // Value: to.Ptr("4"), - // }}, - // PreferredOs: to.Ptr(armappservice.StackPreferredOsLinux), - // Value: to.Ptr("node"), - // }, - // }, - // { - // Name: to.Ptr("python"), - // Type: to.Ptr("Microsoft.Web/locations/webAppStacks"), - // ID: to.Ptr("/providers/Microsoft.Web/locations/webAppStacks/python"), - // Location: to.Ptr("westus"), - // Properties: &armappservice.WebAppStackProperties{ - // DisplayText: to.Ptr("Python"), - // MajorVersions: []*armappservice.WebAppMajorVersion{ - // { - // DisplayText: to.Ptr("Python 3"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Python 3.8"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("3.8"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("PYTHON|3.8"), - // }, - // }, - // Value: to.Ptr("3.8"), - // }, - // { - // DisplayText: to.Ptr("Python 3.7"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("3.7"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("PYTHON|3.7"), - // }, - // }, - // Value: to.Ptr("3.7"), - // }, - // { - // DisplayText: to.Ptr("Python 3.6"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("3.6"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("PYTHON|3.6"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("3.6"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("3.4.0"), - // }, - // }, - // Value: to.Ptr("3.6"), - // }}, - // Value: to.Ptr("3"), - // }, - // { - // DisplayText: to.Ptr("Python 2"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Python 2.7"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("2.7"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("PYTHON|2.7"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("2.7"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("2.7.3"), - // }, - // }, - // Value: to.Ptr("2.7"), - // }}, - // Value: to.Ptr("2"), - // }}, - // PreferredOs: to.Ptr(armappservice.StackPreferredOsLinux), - // Value: to.Ptr("python"), - // }, - // }, - // { - // Name: to.Ptr("php"), - // Type: to.Ptr("Microsoft.Web/locations/webAppStacks"), - // ID: to.Ptr("/providers/Microsoft.Web/locations/webAppStacks/php"), - // Location: to.Ptr("westus"), - // Properties: &armappservice.WebAppStackProperties{ - // DisplayText: to.Ptr("PHP"), - // MajorVersions: []*armappservice.WebAppMajorVersion{ - // { - // DisplayText: to.Ptr("PHP 7"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("PHP 7.4"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-28T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("PHP|7.4"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-28T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("7.4"), - // }, - // }, - // Value: to.Ptr("7.4"), - // }, - // { - // DisplayText: to.Ptr("PHP 7.3"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-01-06T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("PHP|7.3"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-01-06T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("7.3"), - // }, - // }, - // Value: to.Ptr("7.3"), - // }, - // { - // DisplayText: to.Ptr("PHP 7.2"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-30T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("PHP|7.2"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-30T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("7.2"), - // }, - // }, - // Value: to.Ptr("7.2"), - // }, - // { - // DisplayText: to.Ptr("PHP 7.1"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("7.1"), - // }, - // }, - // Value: to.Ptr("7.1"), - // }, - // { - // DisplayText: to.Ptr("7.0"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("PHP|7.0"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("7.0"), - // }, - // }, - // Value: to.Ptr("7.0"), - // }}, - // Value: to.Ptr("7"), - // }, - // { - // DisplayText: to.Ptr("PHP 5"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("PHP 5.6"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("PHP|5.6"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("5.6"), - // }, - // }, - // Value: to.Ptr("5.6"), - // }}, - // Value: to.Ptr("5"), - // }}, - // PreferredOs: to.Ptr(armappservice.StackPreferredOsLinux), - // Value: to.Ptr("php"), - // }, - // }, - // { - // Name: to.Ptr("ruby"), - // Type: to.Ptr("Microsoft.Web/locations/webAppStacks"), - // ID: to.Ptr("/providers/Microsoft.Web/locations/webAppStacks/ruby"), - // Location: to.Ptr("westus"), - // Properties: &armappservice.WebAppStackProperties{ - // DisplayText: to.Ptr("Ruby"), - // MajorVersions: []*armappservice.WebAppMajorVersion{ - // { - // DisplayText: to.Ptr("Ruby 2"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Ruby 2.6"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("RUBY|2.6"), - // }, - // }, - // Value: to.Ptr("2.6"), - // }, - // { - // DisplayText: to.Ptr("Ruby 2.6.2"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("RUBY|2.6.2"), - // }, - // }, - // Value: to.Ptr("2.6.2"), - // }, - // { - // DisplayText: to.Ptr("Ruby 2.5"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("RUBY|2.5"), - // }, - // }, - // Value: to.Ptr("2.5"), - // }, - // { - // DisplayText: to.Ptr("Ruby 2.5.5"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("RUBY|2.5.5"), - // }, - // }, - // Value: to.Ptr("2.5.5"), - // }, - // { - // DisplayText: to.Ptr("Ruby 2.4"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("RUBY|2.4"), - // }, - // }, - // Value: to.Ptr("2.4"), - // }, - // { - // DisplayText: to.Ptr("Ruby 2.4.5"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("RUBY|2.4.5"), - // }, - // }, - // Value: to.Ptr("2.4.5"), - // }, - // { - // DisplayText: to.Ptr("Ruby 2.3"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("RUBY|2.3"), - // }, - // }, - // Value: to.Ptr("2.3"), - // }, - // { - // DisplayText: to.Ptr("Ruby 2.3.8"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("RUBY|2.3.8"), - // }, - // }, - // Value: to.Ptr("2.3.8"), - // }, - // { - // DisplayText: to.Ptr("Ruby 2.3.3"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("RUBY|2.3.3"), - // }, - // }, - // Value: to.Ptr("2.3.3"), - // }}, - // Value: to.Ptr("2"), - // }}, - // PreferredOs: to.Ptr(armappservice.StackPreferredOsLinux), - // Value: to.Ptr("ruby"), - // }, - // }, - // { - // Name: to.Ptr("java"), - // Type: to.Ptr("Microsoft.Web/locations/webAppStacks"), - // ID: to.Ptr("/providers/Microsoft.Web/locations/webAppStacks/java"), - // Location: to.Ptr("westus"), - // Properties: &armappservice.WebAppStackProperties{ - // DisplayText: to.Ptr("Java"), - // MajorVersions: []*armappservice.WebAppMajorVersion{ - // { - // DisplayText: to.Ptr("Java 11"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Java 11"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-10-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("11"), - // }, - // IsAutoUpdate: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr(""), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-10-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("11"), - // }, - // IsAutoUpdate: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("11"), - // }, - // }, - // Value: to.Ptr("11.0"), - // }, - // { - // DisplayText: to.Ptr("Java 11.0.7"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-10-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("11"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr(""), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-10-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("11"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("11.0.7"), - // }, - // }, - // Value: to.Ptr("11.0.7"), - // }, - // { - // DisplayText: to.Ptr("Java 11.0.6"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-10-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("11"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr(""), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-10-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("11"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("11.0.6"), - // }, - // }, - // Value: to.Ptr("11.0.6"), - // }, - // { - // DisplayText: to.Ptr("Java 11.0.5"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-10-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("11"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr(""), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-10-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("11"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("11.0.5_ZULU"), - // }, - // }, - // Value: to.Ptr("11.0.5"), - // }, - // { - // DisplayText: to.Ptr("Java 11.0.3"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-10-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("11"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("11.0.3_ZULU"), - // }, - // }, - // Value: to.Ptr("11.0.3"), - // }, - // { - // DisplayText: to.Ptr("Java 11.0.2"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-10-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("11"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("11.0.2_ZULU"), - // }, - // }, - // Value: to.Ptr("11.0.2"), - // }}, - // Value: to.Ptr("11"), - // }, - // { - // DisplayText: to.Ptr("Java 8"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Java 8"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // IsAutoUpdate: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr(""), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // IsAutoUpdate: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.8"), - // }, - // }, - // Value: to.Ptr("8.0"), - // }, - // { - // DisplayText: to.Ptr("Java 1.8.0_252"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr(""), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.8.0_252"), - // }, - // }, - // Value: to.Ptr("8.0.252"), - // }, - // { - // DisplayText: to.Ptr("Java 1.8.0_242"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr(""), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.8.0_242"), - // }, - // }, - // Value: to.Ptr("8.0.242"), - // }, - // { - // DisplayText: to.Ptr("Java 1.8.0_232"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr(""), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.8.0_232_ZULU"), - // }, - // }, - // Value: to.Ptr("8.0.232"), - // }, - // { - // DisplayText: to.Ptr("Java 1.8.0_212"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.8.0_212_ZULU"), - // }, - // }, - // Value: to.Ptr("8.0.212"), - // }, - // { - // DisplayText: to.Ptr("Java 1.8.0_202"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.8.0_202_ZULU"), - // }, - // }, - // Value: to.Ptr("8.0.202"), - // }, - // { - // DisplayText: to.Ptr("Java 1.8.0_202 (Oracle)"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.8.0_202"), - // }, - // }, - // Value: to.Ptr("8.0.202 (Oracle)"), - // }, - // { - // DisplayText: to.Ptr("Java 1.8.0_181"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.8.0_181_ZULU"), - // }, - // }, - // Value: to.Ptr("8.0.181"), - // }, - // { - // DisplayText: to.Ptr("Java 1.8.0_181 (Oracle)"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.8.0_181"), - // }, - // }, - // Value: to.Ptr("8.0.181 (Oracle)"), - // }, - // { - // DisplayText: to.Ptr("Java 1.8.0_172"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.8.0_172_ZULU"), - // }, - // }, - // Value: to.Ptr("8.0.172"), - // }, - // { - // DisplayText: to.Ptr("Java 1.8.0_172 (Oracle)"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.8.0_172"), - // }, - // }, - // Value: to.Ptr("8.0.172 (Oracle)"), - // }, - // { - // DisplayText: to.Ptr("Java 1.8.0_144"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.8.0_144"), - // }, - // }, - // Value: to.Ptr("8.0.144"), - // }, - // { - // DisplayText: to.Ptr("Java 1.8.0_111 (Oracle)"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.8.0_111"), - // }, - // }, - // Value: to.Ptr("8.0.111 (Oracle)"), - // }, - // { - // DisplayText: to.Ptr("Java 1.8.0_102"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.8.0_102"), - // }, - // }, - // Value: to.Ptr("8.0.102"), - // }, - // { - // DisplayText: to.Ptr("Java 1.8.0_92"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.8.0_92"), - // }, - // }, - // Value: to.Ptr("8.0.92"), - // }, - // { - // DisplayText: to.Ptr("Java 1.8.0_73 (Oracle)"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.8.0_73"), - // }, - // }, - // Value: to.Ptr("8.0.73 (Oracle)"), - // }, - // { - // DisplayText: to.Ptr("Java 1.8.0_60 (Oracle)"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.8.0_60"), - // }, - // }, - // Value: to.Ptr("8.0.60 (Oracle)"), - // }, - // { - // DisplayText: to.Ptr("Java 1.8.0_25 (Oracle)"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.8.0_25"), - // }, - // }, - // Value: to.Ptr("8.0.25 (Oracle)"), - // }}, - // Value: to.Ptr("8"), - // }, - // { - // DisplayText: to.Ptr("Java 7"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Java 7"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsAutoUpdate: to.Ptr(true), - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.7"), - // }, - // }, - // Value: to.Ptr("7.0"), - // }, - // { - // DisplayText: to.Ptr("Java 1.7.0_262"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.7.0_262_ZULU"), - // }, - // }, - // Value: to.Ptr("7.0.262"), - // }, - // { - // DisplayText: to.Ptr("Java 1.7.0_242"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.7.0_242_ZULU"), - // }, - // }, - // Value: to.Ptr("7.0.242"), - // }, - // { - // DisplayText: to.Ptr("Java 1.7.0_222"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.7.0_222_ZULU"), - // }, - // }, - // Value: to.Ptr("7.0.222"), - // }, - // { - // DisplayText: to.Ptr("Java 1.7.0_191"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.7.0_191_ZULU"), - // }, - // }, - // Value: to.Ptr("7.0.191"), - // }, - // { - // DisplayText: to.Ptr("Java 1.7.0_80 (Oracle)"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.7.0_80"), - // }, - // }, - // Value: to.Ptr("7.0.80 (Oracle)"), - // }, - // { - // DisplayText: to.Ptr("Java 1.7.0_71 (Oracle)"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.7.0_71"), - // }, - // }, - // Value: to.Ptr("7.0.71 (Oracle)"), - // }, - // { - // DisplayText: to.Ptr("Java 1.7.0_51 (Oracle)"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.7.0_51"), - // }, - // }, - // Value: to.Ptr("7.0.51 (Oracle)"), - // }}, - // Value: to.Ptr("7"), - // }}, - // PreferredOs: to.Ptr(armappservice.StackPreferredOsLinux), - // Value: to.Ptr("java"), - // }, - // }, - // { - // Name: to.Ptr("javacontainers"), - // Type: to.Ptr("Microsoft.Web/locations/webAppStacks"), - // ID: to.Ptr("/providers/Microsoft.Web/locations/webAppStacks/javacontainers"), - // Location: to.Ptr("westus"), - // Properties: &armappservice.WebAppStackProperties{ - // DisplayText: to.Ptr("Java Containers"), - // MajorVersions: []*armappservice.WebAppMajorVersion{ - // { - // DisplayText: to.Ptr("Java SE (Embedded Web Server)"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Java SE (Embedded Web Server)"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxContainerSettings: &armappservice.LinuxJavaContainerSettings{ - // IsAutoUpdate: to.Ptr(true), - // Java11Runtime: to.Ptr("JAVA|11-java11"), - // Java8Runtime: to.Ptr("JAVA|8-jre8"), - // }, - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // IsAutoUpdate: to.Ptr(true), - // JavaContainer: to.Ptr("JAVA"), - // JavaContainerVersion: to.Ptr("SE"), - // }, - // }, - // Value: to.Ptr("SE"), - // }, - // { - // DisplayText: to.Ptr("Java SE 11.0.7"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxContainerSettings: &armappservice.LinuxJavaContainerSettings{ - // Java11Runtime: to.Ptr("JAVA|11.0.7"), - // }, - // }, - // Value: to.Ptr("11.0.7"), - // }, - // { - // DisplayText: to.Ptr("Java SE 11.0.6"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxContainerSettings: &armappservice.LinuxJavaContainerSettings{ - // Java11Runtime: to.Ptr("JAVA|11.0.6"), - // }, - // }, - // Value: to.Ptr("11.0.6"), - // }, - // { - // DisplayText: to.Ptr("Java SE 11.0.5"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxContainerSettings: &armappservice.LinuxJavaContainerSettings{ - // Java11Runtime: to.Ptr("JAVA|11.0.5"), - // }, - // }, - // Value: to.Ptr("11.0.5"), - // }, - // { - // DisplayText: to.Ptr("Java SE 8u252"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxContainerSettings: &armappservice.LinuxJavaContainerSettings{ - // Java8Runtime: to.Ptr("JAVA|8u252"), - // }, - // }, - // Value: to.Ptr("1.8.252"), - // }, - // { - // DisplayText: to.Ptr("Java SE 8u242"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxContainerSettings: &armappservice.LinuxJavaContainerSettings{ - // Java8Runtime: to.Ptr("JAVA|8u242"), - // }, - // }, - // Value: to.Ptr("1.8.242"), - // }, - // { - // DisplayText: to.Ptr("Java SE 8u232"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxContainerSettings: &armappservice.LinuxJavaContainerSettings{ - // Java8Runtime: to.Ptr("JAVA|8u232"), - // }, - // }, - // Value: to.Ptr("1.8.232"), - // }}, - // Value: to.Ptr("javase"), - // }, - // { - // DisplayText: to.Ptr("JBoss EAP"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("JBoss EAP 7.2"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxContainerSettings: &armappservice.LinuxJavaContainerSettings{ - // IsPreview: to.Ptr(true), - // Java8Runtime: to.Ptr("JBOSSEAP|7.2-java8"), - // }, - // }, - // Value: to.Ptr("7.2"), - // }}, - // Value: to.Ptr("jbosseap"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 9.0"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Tomcat 9.0"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxContainerSettings: &armappservice.LinuxJavaContainerSettings{ - // IsAutoUpdate: to.Ptr(true), - // Java11Runtime: to.Ptr("TOMCAT|9.0-java11"), - // Java8Runtime: to.Ptr("TOMCAT|9.0-jre8"), - // }, - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // IsAutoUpdate: to.Ptr(true), - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("9.0"), - // }, - // }, - // Value: to.Ptr("9.0"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 9.0.37"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxContainerSettings: &armappservice.LinuxJavaContainerSettings{ - // Java11Runtime: to.Ptr("TOMCAT|9.0.37-java11"), - // Java8Runtime: to.Ptr("TOMCAT|9.0.37-java8"), - // }, - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("9.0.37"), - // }, - // }, - // Value: to.Ptr("9.0.37"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 9.0.33"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxContainerSettings: &armappservice.LinuxJavaContainerSettings{ - // Java11Runtime: to.Ptr("TOMCAT|9.0.33-java11"), - // Java8Runtime: to.Ptr("TOMCAT|9.0.33-java8"), - // }, - // }, - // Value: to.Ptr("9.0.33"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 9.0.31"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("9.0.31"), - // }, - // }, - // Value: to.Ptr("9.0.31"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 9.0.27"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("9.0.27"), - // }, - // }, - // Value: to.Ptr("9.0.27"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 9.0.21"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("9.0.21"), - // }, - // }, - // Value: to.Ptr("9.0.21"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 9.0.20"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxContainerSettings: &armappservice.LinuxJavaContainerSettings{ - // Java11Runtime: to.Ptr("TOMCAT|9.0.20-java11"), - // Java8Runtime: to.Ptr("TOMCAT|9.0.20-java8"), - // }, - // }, - // Value: to.Ptr("9.0.20"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 9.0.14"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("9.0.14"), - // }, - // }, - // Value: to.Ptr("9.0.14"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 9.0.12"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("9.0.12"), - // }, - // }, - // Value: to.Ptr("9.0.12"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 9.0.8"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("9.0.8"), - // }, - // }, - // Value: to.Ptr("9.0.8"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 9.0.0"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("9.0.0"), - // }, - // }, - // Value: to.Ptr("9.0.0"), - // }}, - // Value: to.Ptr("tomcat9.0"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 8.5"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Tomcat 8.5"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxContainerSettings: &armappservice.LinuxJavaContainerSettings{ - // IsAutoUpdate: to.Ptr(true), - // Java11Runtime: to.Ptr("TOMCAT|8.5-java11"), - // Java8Runtime: to.Ptr("TOMCAT|8.5-jre8"), - // }, - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // IsAutoUpdate: to.Ptr(true), - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("8.5"), - // }, - // }, - // Value: to.Ptr("8.5"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 8.5.6"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("8.5.6"), - // }, - // }, - // Value: to.Ptr("8.5.6"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 8.5.57"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxContainerSettings: &armappservice.LinuxJavaContainerSettings{ - // Java11Runtime: to.Ptr("TOMCAT|8.5.57-java11"), - // Java8Runtime: to.Ptr("TOMCAT|8.5.57-java8"), - // }, - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("8.5.57"), - // }, - // }, - // Value: to.Ptr("8.5.57"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 8.5.53"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxContainerSettings: &armappservice.LinuxJavaContainerSettings{ - // Java11Runtime: to.Ptr("TOMCAT|8.5.53-java11"), - // Java8Runtime: to.Ptr("TOMCAT|8.5.53-java8"), - // }, - // }, - // Value: to.Ptr("8.5.53"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 8.5.51"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("8.5.51"), - // }, - // }, - // Value: to.Ptr("8.5.51"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 8.5.47"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("8.5.47"), - // }, - // }, - // Value: to.Ptr("8.5.47"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 8.5.42"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("8.5.42"), - // }, - // }, - // Value: to.Ptr("8.5.42"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 8.5.41"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxContainerSettings: &armappservice.LinuxJavaContainerSettings{ - // Java11Runtime: to.Ptr("TOMCAT|8.5.41-java11"), - // Java8Runtime: to.Ptr("TOMCAT|8.5.41-java8"), - // }, - // }, - // Value: to.Ptr("8.5.41"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 8.5.37"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("8.5.37"), - // }, - // }, - // Value: to.Ptr("8.5.37"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 8.5.34"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("8.5.34"), - // }, - // }, - // Value: to.Ptr("8.5.34"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 8.5.31"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("8.5.31"), - // }, - // }, - // Value: to.Ptr("8.5.31"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 8.5.20"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("8.5.20"), - // }, - // }, - // Value: to.Ptr("8.5.20"), - // }}, - // Value: to.Ptr("tomcat8.5"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 8.0"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Tomcat 8.0"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // IsAutoUpdate: to.Ptr(true), - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("8.0"), - // }, - // }, - // Value: to.Ptr("8.0"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 8.0.53"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("8.0.53"), - // }, - // }, - // Value: to.Ptr("8.0.53"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 8.0.46"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("8.0.46"), - // }, - // }, - // Value: to.Ptr("8.0.46"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 8.0.23"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("8.0.23"), - // }, - // }, - // Value: to.Ptr("8.0.23"), - // }}, - // Value: to.Ptr("tomcat8.0"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 7.0"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Tomcat 7.0"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // IsAutoUpdate: to.Ptr(true), - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("7.0"), - // }, - // }, - // Value: to.Ptr("7.0"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 7.0.94"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("7.0.94"), - // }, - // }, - // Value: to.Ptr("7.0.94"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 7.0.81"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("7.0.81"), - // }, - // }, - // Value: to.Ptr("7.0.81"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 7.0.62"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("7.0.62"), - // }, - // }, - // Value: to.Ptr("7.0.62"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 7.0.50"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("7.0.50"), - // }, - // }, - // Value: to.Ptr("7.0.50"), - // }}, - // Value: to.Ptr("tomcat7.0"), - // }, - // { - // DisplayText: to.Ptr("Jetty 9.3"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Jetty 9.3"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // IsAutoUpdate: to.Ptr(true), - // IsDeprecated: to.Ptr(true), - // JavaContainer: to.Ptr("JETTY"), - // JavaContainerVersion: to.Ptr("9.3"), - // }, - // }, - // Value: to.Ptr("9.3"), - // }, - // { - // DisplayText: to.Ptr("Jetty 9.3.25"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // IsDeprecated: to.Ptr(true), - // JavaContainer: to.Ptr("JETTY"), - // JavaContainerVersion: to.Ptr("9.3.25"), - // }, - // }, - // Value: to.Ptr("9.3.25"), - // }, - // { - // DisplayText: to.Ptr("Jetty 9.3.13"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // IsDeprecated: to.Ptr(true), - // JavaContainer: to.Ptr("JETTY"), - // JavaContainerVersion: to.Ptr("9.3.13"), - // }, - // }, - // Value: to.Ptr("9.3.13"), - // }}, - // Value: to.Ptr("jetty9.3"), - // }, - // { - // DisplayText: to.Ptr("Jetty 9.1"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Jetty 9.1"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // IsAutoUpdate: to.Ptr(true), - // IsDeprecated: to.Ptr(true), - // JavaContainer: to.Ptr("JETTY"), - // JavaContainerVersion: to.Ptr("9.1"), - // }, - // }, - // Value: to.Ptr("9.1"), - // }, - // { - // DisplayText: to.Ptr("Jetty 9.1.0"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // IsDeprecated: to.Ptr(true), - // JavaContainer: to.Ptr("JETTY"), - // JavaContainerVersion: to.Ptr("9.1.0"), - // }, - // }, - // Value: to.Ptr("9.1.0"), - // }}, - // Value: to.Ptr("jetty9.1"), - // }, - // { - // DisplayText: to.Ptr("WildFly 14"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("WildFly 14"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxContainerSettings: &armappservice.LinuxJavaContainerSettings{ - // IsAutoUpdate: to.Ptr(true), - // IsDeprecated: to.Ptr(true), - // Java8Runtime: to.Ptr("WILDFLY|14-jre8"), - // }, - // }, - // Value: to.Ptr("14"), - // }, - // { - // DisplayText: to.Ptr("WildFly 14.0.1"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxContainerSettings: &armappservice.LinuxJavaContainerSettings{ - // IsDeprecated: to.Ptr(true), - // Java8Runtime: to.Ptr("WILDFLY|14.0.1-java8"), - // }, - // }, - // Value: to.Ptr("14.0.1"), - // }}, - // Value: to.Ptr("wildfly14"), - // }}, - // Value: to.Ptr("javacontainers"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListOperations.json -func ExampleProviderClient_NewListOperationsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewProviderClient().NewListOperationsPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.CsmOperationCollection = armappservice.CsmOperationCollection{ - // Value: []*armappservice.CsmOperationDescription{ - // { - // Name: to.Ptr("Microsoft.Web/sites/Read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get the properties of a Web App"), - // Operation: to.Ptr("Get Web App"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/Write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Create a new Web App or update an existing one"), - // Operation: to.Ptr("Create or Update Web App"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/slots/Write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Create a new Web App Slot or update an existing one"), - // Operation: to.Ptr("Create or Update Web App Slot"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App Slot"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/Delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete an existing Web App"), - // Operation: to.Ptr("Delete Web App"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/slots/Delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete an existing Web App Slot"), - // Operation: to.Ptr("Delete Web App Slot"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App Slot"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/slots/config/Read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web App Slot's configuration settings"), - // Operation: to.Ptr("Get Web App Slot Configuration"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App Slot"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/config/Read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web App configuration settings"), - // Operation: to.Ptr("Get Web App Configuration"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/config/list/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("List Web App's security sensitive settings, such as publishing credentials, app settings and connection strings"), - // Operation: to.Ptr("List Web App Security Sensitive Settings"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/slots/config/list/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("List Web App Slot's security sensitive settings, such as publishing credentials, app settings and connection strings"), - // Operation: to.Ptr("List Web App Slot Security Sensitive Settings"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App Slot"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/config/Write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Update Web App's configuration settings"), - // Operation: to.Ptr("Update Web App Configuration"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/slots/config/Write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Update Web App Slot's configuration settings"), - // Operation: to.Ptr("Update Web App Slot Configuration"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App Slot"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/sourcecontrols/Read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web App's source control configuration settings"), - // Operation: to.Ptr("Get Web App Source Control Configuration"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/slots/sourcecontrols/Read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web App Slot's source control configuration settings"), - // Operation: to.Ptr("Get Web App Slot Source Control Configuration"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App Slot"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/sourcecontrols/Write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Update Web App's source control configuration settings"), - // Operation: to.Ptr("Update Web App Source Control Configuration"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/slots/sourcecontrols/Write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Update Web App Slot's source control configuration settings"), - // Operation: to.Ptr("Update Web App Slot Source Control Configuration"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App Slot"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/sourcecontrols/Delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete Web App's source control configuration settings"), - // Operation: to.Ptr("Delete Web App Source Control Configuration"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/slots/sourcecontrols/Delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete Web App Slot's source control configuration settings"), - // Operation: to.Ptr("Delete Web App Slot Source Control Configuration"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App Slot"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/backup/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Create a new web app backup"), - // Operation: to.Ptr("Create Web App Backup"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/slots/backup/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Create new Web App Slot backup."), - // Operation: to.Ptr("Create Web App Slot Backup"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App Slot"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/backups/Read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get the properties of a web app's backup"), - // Operation: to.Ptr("Get Web App Backup"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/slots/backups/Read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get the properties of a web app slots' backup"), - // Operation: to.Ptr("List Web App Slot Backups"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App Slot"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/publishxml/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get publishing profile xml for a Web App"), - // Operation: to.Ptr("Get Web App Publishing Profile"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/slots/publishxml/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get publishing profile xml for Web App Slot"), - // Operation: to.Ptr("Get Web App Slot Publishing Profile"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App Slot"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/publish/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Publish a Web App"), - // Operation: to.Ptr("Publish Web App"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/slots/publish/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Publish a Web App Slot"), - // Operation: to.Ptr("Publish Web App Slot"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App Slot"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/restart/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Restart a Web App"), - // Operation: to.Ptr("Restart Web App"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/slots/restart/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Restart a Web App Slot"), - // Operation: to.Ptr("Restart Web App Slot"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App Slot"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/start/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Start a Web App"), - // Operation: to.Ptr("Start Web App"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/slots/start/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Start a Web App Slot"), - // Operation: to.Ptr("Start Web App Slot"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App Slot"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/stop/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Stop a Web App"), - // Operation: to.Ptr("Stop Web App"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/slots/stop/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Stop a Web App Slot"), - // Operation: to.Ptr("Stop Web App Slot"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App Slot"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/slotsswap/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Swap Web App deployment slots"), - // Operation: to.Ptr("Swap Web App Slots"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/slots/slotsswap/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Swap Web App deployment slots"), - // Operation: to.Ptr("Swap Web App Slots"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App Slot"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/slotsdiffs/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get differences in configuration between web app and slots"), - // Operation: to.Ptr("Get Web App Slots Differences"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/slots/slotsdiffs/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get differences in configuration between web app and slots"), - // Operation: to.Ptr("Get Web App Slots Differences"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App Slot"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/applySlotConfig/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Apply web app slot configuration from target slot to the current web app"), - // Operation: to.Ptr("Apply Web App Configuration"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/slots/applySlotConfig/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Apply web app slot configuration from target slot to the current slot."), - // Operation: to.Ptr("Apply Web App Slot Configuration"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App Slot"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/resetSlotConfig/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Reset web app configuration"), - // Operation: to.Ptr("Reset Web App Configuration"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/slots/resetSlotConfig/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Reset web app slot configuration"), - // Operation: to.Ptr("Reset Web App Slot Configuration"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App Slot"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/slots/Read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get the properties of a Web App deployment slot"), - // Operation: to.Ptr("Get Web App Deployment Slot"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App Slot"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/serverfarms/Read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get the properties on an App Service Plan"), - // Operation: to.Ptr("Get App Service Plan"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("App Service Plan"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/serverfarms/Write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Create a new App Service Plan or update an existing one"), - // Operation: to.Ptr("Create or Update App Service Plan"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("App Service Plan"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/serverfarms/Delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete an existing App Service Plan"), - // Operation: to.Ptr("Delete App Service Plan"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("App Service Plan"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/serverfarms/restartSites/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Restart all Web Apps in an App Service Plan"), - // Operation: to.Ptr("Restart Web Apps"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("App Service Plan"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/certificates/Read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get the list of certificates."), - // Operation: to.Ptr("Get Certificates"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Certificate"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/certificates/Write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Add a new certificate or update an existing one."), - // Operation: to.Ptr("Add or Update Certificate"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Certificate"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/certificates/Delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete an existing certificate."), - // Operation: to.Ptr("Delete Certificate"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Certificate"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/geoRegions/Read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get the list of Geo regions."), - // Operation: to.Ptr("Get Geo Regions"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Geo Region"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/listSitesAssignedToHostName/Read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get names of sites assigned to hostname."), - // Operation: to.Ptr("Get sites assigned to hostname"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Site Name"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/hostingEnvironments/Read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get the properties of an App Service Environment"), - // Operation: to.Ptr("Get App Service Environment"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("App Service Environment"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/hostingEnvironments/Write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Create a new App Service Environment or update existing one"), - // Operation: to.Ptr("Create or Update App Service Environment"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("App Service Environment"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/hostingEnvironments/Delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete an App Service Environment"), - // Operation: to.Ptr("Delete App Service Environment"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("App Service Environment"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/hostingEnvironments/reboot/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Reboot all machines in an App Service Environment"), - // Operation: to.Ptr("Reboot an App Service Environment"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("App Service Environment"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/hostingEnvironments/multiRolePools/Read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get the properties of a FrontEnd Pool in an App Service Environment"), - // Operation: to.Ptr("Get FrontEnd Pool"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("App Service Environment FrontEnd Pool"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/hostingEnvironments/multiRolePools/Write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Create a new FrontEnd Pool in an App Service Environment or update an existing one"), - // Operation: to.Ptr("Create or Update FrontEnd Pool"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("App Service Environment FrontEnd Pool"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/hostingEnvironments/workerPools/Read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get the properties of a Worker Pool in an App Service Environment"), - // Operation: to.Ptr("Get Worker Pool"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("App Service Environment Worker Pool"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/hostingEnvironments/workerPools/Write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Create a new Worker Pool in an App Service Environment or update an existing one"), - // Operation: to.Ptr("Create or Update Worker Pool"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("App Service Environment Worker Pool"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/connections/Read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get the list of Connections."), - // Operation: to.Ptr("Get Connections"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Connections"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/connections/Write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Creates or updates a Connection."), - // Operation: to.Ptr("Add or Update Connection"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Connections"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/connections/Delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Deletes a Connection."), - // Operation: to.Ptr("Delete Connection"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Connections"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/connections/Join/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Joins a Connection."), - // Operation: to.Ptr("Join Connection"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Connections"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/connectionGateways/Read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get the list of Connection Gateways."), - // Operation: to.Ptr("Get Connection Gateways"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Connection Gateways"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/connectionGateways/Write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Creates or updates a Connection Gateway."), - // Operation: to.Ptr("Add or Update Connection Gateways"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Connection Gateways"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/connectionGateways/Delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Deletes a Connection Gateway."), - // Operation: to.Ptr("Delete Connection Gateway"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Connection Gateways"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/connectionGateways/Join/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Joins a Connection Gateway."), - // Operation: to.Ptr("Join Connection Gateway"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Connection Gateways"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/recommendations/Read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get the list of recommendations for subscriptions."), - // Operation: to.Ptr("Get recommendations"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Recommendation"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/recommendations/Read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get the list of recommendations for web app."), - // Operation: to.Ptr("Get recommendations for web app"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Recommendation"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/availablestacks/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Available Stacks."), - // Operation: to.Ptr("Get Available Stacks"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Available Stacks"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/functionappstacks/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Function App Stacks."), - // Operation: to.Ptr("Get Function App Stacks"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Function App Stacks"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/webappstacks/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web App Stacks."), - // Operation: to.Ptr("Get Web App Stacks"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web App Stacks"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/checknameavailability/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Check if resource name is available."), - // Operation: to.Ptr("Get Check Name Availability"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Check Name Availability"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/classicmobileservices/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Classic Mobile Services."), - // Operation: to.Ptr("Get Classic Mobile Services"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Classic Mobile Services"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/connections/confirmconsentcode/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Confirm Connections Consent Code."), - // Operation: to.Ptr("Confirm Connections Consent Code"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Connections"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/connections/listconsentlinks/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("List Consent Links for Connections."), - // Operation: to.Ptr("List Consent Links for Connections"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Connections"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/deploymentlocations/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Deployment Locations."), - // Operation: to.Ptr("Get Deployment Locations"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Deployment Locations"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/hostingenvironments/capacities/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Hosting Environments Capacities."), - // Operation: to.Ptr("Get Hosting Environments Capacities"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Hosting Environments Capacities"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/hostingenvironments/diagnostics/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Hosting Environments Diagnostics."), - // Operation: to.Ptr("Get Hosting Environments Diagnostics"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Hosting Environments Diagnostics"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/hostingenvironments/metricdefinitions/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Hosting Environments Metric Definitions."), - // Operation: to.Ptr("Get Hosting Environments Metric Definitions"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Hosting Environments Metric Definitions"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/hostingenvironments/multirolepools/metricdefinitions/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Hosting Environments MultiRole Pools Metric Definitions."), - // Operation: to.Ptr("Get Hosting Environments MultiRole Pools Metric Definitions"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Hosting Environments MultiRole Pools Metric Definitions"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/hostingenvironments/multirolepools/metrics/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Hosting Environments MultiRole Pools Metrics."), - // Operation: to.Ptr("Get Hosting Environments MultiRole Pools Metrics"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Hosting Environments MultiRole Pools Metrics"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/hostingenvironments/multirolepools/skus/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Hosting Environments MultiRole Pools SKUs."), - // Operation: to.Ptr("Get Hosting Environments MultiRole Pools SKUs"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Hosting Environments MultiRole Pools SKUs"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/hostingenvironments/multirolepools/usages/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Hosting Environments MultiRole Pools Usages."), - // Operation: to.Ptr("Get Hosting Environments MultiRole Pools Usages"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Hosting Environments MultiRole Pools Usages"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/hostingenvironments/operations/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Hosting Environments Operations."), - // Operation: to.Ptr("Get Hosting Environments Operations"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Hosting Environments Operations"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/hostingenvironments/resume/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Resume Hosting Environments."), - // Operation: to.Ptr("Resume Hosting Environments"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Hosting Environments"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/hostingenvironments/serverfarms/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Hosting Environments App Service Plans."), - // Operation: to.Ptr("Get Hosting Environments App Service Plans"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Hosting Environments App Service Plans"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/hostingenvironments/sites/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Hosting Environments Web Apps."), - // Operation: to.Ptr("Get Hosting Environments Web Apps"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Hosting Environments Web Apps"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/hostingenvironments/suspend/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Suspend Hosting Environments."), - // Operation: to.Ptr("Suspend Hosting Environments"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Hosting Environments"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/hostingenvironments/usages/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Hosting Environments Usages."), - // Operation: to.Ptr("Get Hosting Environments Usages"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Hosting Environments Usages"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/hostingenvironments/workerpools/metricdefinitions/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Hosting Environments Workerpools Metric Definitions."), - // Operation: to.Ptr("Get Hosting Environments Workerpools Metric Definitions"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Hosting Environments Workerpools Metric Definitions"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/hostingenvironments/workerpools/metrics/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Hosting Environments Workerpools Metrics."), - // Operation: to.Ptr("Get Hosting Environments Workerpools Metrics"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Hosting Environments Workerpools Metrics"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/hostingenvironments/workerpools/skus/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Hosting Environments Workerpools SKUs."), - // Operation: to.Ptr("Get Hosting Environments Workerpools SKUs"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Hosting Environments Workerpools SKUs"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/hostingenvironments/workerpools/usages/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Hosting Environments Workerpools Usages."), - // Operation: to.Ptr("Get Hosting Environments Workerpools Usages"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Hosting Environments Workerpools Usages"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/ishostingenvironmentnameavailable/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get if Hosting Environment Name is available."), - // Operation: to.Ptr("Check if Hosting Environment Name is available"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Hosting Environment Name"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/ishostnameavailable/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Check if Hostname is Available."), - // Operation: to.Ptr("Check if Hostname is Available"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Hostname"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/isusernameavailable/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Check if Username is available."), - // Operation: to.Ptr("Check if Username is available"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Username"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/locations/apioperations/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Locations API Operations."), - // Operation: to.Ptr("Get Locations API Operations"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Locations API Operations"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/locations/connectiongatewayinstallations/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Locations Connection Gateway Installations."), - // Operation: to.Ptr("Get Locations Connection Gateway Installations"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Locations Connection Gateway Installations"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/locations/functionappstacks/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Locations Function App Stacks."), - // Operation: to.Ptr("Get Locations Function App Stacks"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Locations Function App Stacks"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/locations/webappstacks/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Locations Web App Stacks."), - // Operation: to.Ptr("Get Locations Web App Stacks"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Locations Web App Stacks"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/locations/managedapis/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Locations Managed APIs."), - // Operation: to.Ptr("Get Locations Managed APIs"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Locations Managed APIs"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/operations/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Operations."), - // Operation: to.Ptr("Get Operations"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Operations"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/publishingusers/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Publishing Users."), - // Operation: to.Ptr("Get Publishing Users"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Publishing Users"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/publishingusers/write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Update Publishing Users."), - // Operation: to.Ptr("Update Publishing Users"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Publishing Users"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/serverfarms/capabilities/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get App Service Plans Capabilities."), - // Operation: to.Ptr("Get App Service Plans Capabilities"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("App Service Plans Capabilities"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/serverfarms/firstpartyapps/settings/delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete App Service Plans First Party Apps Settings."), - // Operation: to.Ptr("Delete App Service Plans First Party Apps Settings"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("App Service Plans First Party Apps Settings"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/serverfarms/firstpartyapps/settings/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get App Service Plans First Party Apps Settings."), - // Operation: to.Ptr("Get App Service Plans First Party Apps Settings"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("App Service Plans First Party Apps Settings"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/serverfarms/firstpartyapps/settings/write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Update App Service Plans First Party Apps Settings."), - // Operation: to.Ptr("Update App Service Plans First Party Apps Settings"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("App Service Plans First Party Apps Settings"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/serverfarms/hybridconnectionnamespaces/relays/sites/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get App Service Plans Hybrid Connection Namespaces Relays Web Apps."), - // Operation: to.Ptr("Get App Service Plans Hybrid Connection Namespaces Relays Web Apps"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("App Service Plans Hybrid Connection Namespaces Relays Web Apps"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/serverfarms/hybridconnectionplanlimits/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get App Service Plans Hybrid Connection Plan Limits."), - // Operation: to.Ptr("Get App Service Plans Hybrid Connection Plan Limits"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("App Service Plans Hybrid Connection Plan Limits"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/serverfarms/hybridconnectionrelays/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get App Service Plans Hybrid Connection Relays."), - // Operation: to.Ptr("Get App Service Plans Hybrid Connection Relays"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("App Service Plans Hybrid Connection Relays"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/serverfarms/metricdefinitions/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get App Service Plans Metric Definitions."), - // Operation: to.Ptr("Get App Service Plans Metric Definitions"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("App Service Plans Metric Definitions"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/serverfarms/metrics/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get App Service Plans Metrics."), - // Operation: to.Ptr("Get App Service Plans Metrics"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("App Service Plans Metrics"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/serverfarms/operationresults/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get App Service Plans Operation Results."), - // Operation: to.Ptr("Get App Service Plans Operation Results"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("App Service Plans Operation Results"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/serverfarms/sites/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get App Service Plans Web Apps."), - // Operation: to.Ptr("Get App Service Plans Web Apps"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("App Service Plans Web Apps"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/serverfarms/skus/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get App Service Plans SKUs."), - // Operation: to.Ptr("Get App Service Plans SKUs"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("App Service Plans SKUs"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/serverfarms/usages/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get App Service Plans Usages."), - // Operation: to.Ptr("Get App Service Plans Usages"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("App Service Plans Usages"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/serverfarms/virtualnetworkconnections/gateways/write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Update App Service Plans Virtual Network Connections Gateways."), - // Operation: to.Ptr("Update App Service Plans Virtual Network Connections Gateways"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("App Service Plans Virtual Network Connections Gateways"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/serverfarms/virtualnetworkconnections/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get App Service Plans Virtual Network Connections."), - // Operation: to.Ptr("Get App Service Plans Virtual Network Connections"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("App Service Plans Virtual Network Connections"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/serverfarms/virtualnetworkconnections/routes/delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete App Service Plans Virtual Network Connections Routes."), - // Operation: to.Ptr("Delete App Service Plans Virtual Network Connections Routes"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("App Service Plans Virtual Network Connections Routes"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/serverfarms/virtualnetworkconnections/routes/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get App Service Plans Virtual Network Connections Routes."), - // Operation: to.Ptr("Get App Service Plans Virtual Network Connections Routes"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("App Service Plans Virtual Network Connections Routes"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/serverfarms/virtualnetworkconnections/routes/write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Update App Service Plans Virtual Network Connections Routes."), - // Operation: to.Ptr("Update App Service Plans Virtual Network Connections Routes"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("App Service Plans Virtual Network Connections Routes"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/serverfarms/workers/reboot/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Reboot App Service Plans Workers."), - // Operation: to.Ptr("Reboot App Service Plans Workers"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("App Service Plans Workers"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/analyzecustomhostname/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Analyze Custom Hostname."), - // Operation: to.Ptr("Analyze Custom Hostname"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Custom Hostname"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/backup/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Backup."), - // Operation: to.Ptr("Get Web Apps Backup"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Backup"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/backup/write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Update Web Apps Backup."), - // Operation: to.Ptr("Update Web Apps Backup"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Backup"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/backups/list/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("List Web Apps Backups."), - // Operation: to.Ptr("List Web Apps Backups"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Backups"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/backups/restore/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Restore Web Apps Backups."), - // Operation: to.Ptr("Restore Web Apps Backups"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Backups"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/config/delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete Web Apps Config."), - // Operation: to.Ptr("Delete Web Apps Config"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Config"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/continuouswebjobs/delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete Web Apps Continuous Web Jobs."), - // Operation: to.Ptr("Delete Web Apps Continuous Web Jobs"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Continuous Web Jobs"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/continuouswebjobs/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Continuous Web Jobs."), - // Operation: to.Ptr("Get Web Apps Continuous Web Jobs"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Continuous Web Jobs"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/continuouswebjobs/start/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Start Web Apps Continuous Web Jobs."), - // Operation: to.Ptr("Start Web Apps Continuous Web Jobs"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Continuous Web Jobs"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/continuouswebjobs/stop/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Stop Web Apps Continuous Web Jobs."), - // Operation: to.Ptr("Stop Web Apps Continuous Web Jobs"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Continuous Web Jobs"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/deployments/delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete Web Apps Deployments."), - // Operation: to.Ptr("Delete Web Apps Deployments"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Deployments"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/deployments/log/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Deployments Log."), - // Operation: to.Ptr("Get Web Apps Deployments Log"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Deployments Log"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/deployments/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Deployments."), - // Operation: to.Ptr("Get Web Apps Deployments"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Deployments"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/deployments/write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Update Web Apps Deployments."), - // Operation: to.Ptr("Update Web Apps Deployments"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Deployments"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/diagnostics/frebanalysis/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Diagnostics FREB Analysis."), - // Operation: to.Ptr("Get Web Apps Diagnostics FREB Analysis"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Diagnostics FREB Analysis"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/diagnostics/frebanalysis/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Diagnostics FREB Analysis."), - // Operation: to.Ptr("Get Web Apps Slots Diagnostics FREB Analysis"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Diagnostics FREB Analysis"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/diagnostics/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Diagnostics Categories."), - // Operation: to.Ptr("Get Web Apps Diagnostics Category"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Diagnostics Category"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/diagnostics/runtimeavailability/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Diagnostics Runtime Availability."), - // Operation: to.Ptr("Get Web Apps Diagnostics Runtime Availability"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Diagnostics Runtime Availability"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/diagnostics/servicehealth/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Diagnostics Service Health."), - // Operation: to.Ptr("Get Web Apps Diagnostics Service Health"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Diagnostics Service Health"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/diagnostics/workeravailability/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Diagnostics Workeravailability."), - // Operation: to.Ptr("Get Web Apps Diagnostics Workeravailability"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Diagnostics Workeravailability"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/diagnostics/workeravailability/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Diagnostics Workeravailability."), - // Operation: to.Ptr("Get Web Apps Slots Diagnostics Workeravailability"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Diagnostics Workeravailability"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/diagnostics/workerprocessrecycle/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Diagnostics Worker Process Recycle."), - // Operation: to.Ptr("Get Web Apps Diagnostics Worker Process Recycle"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Diagnostics Worker Process Recycle"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/diagnostics/workerprocessrecycle/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Diagnostics Worker Process Recycle."), - // Operation: to.Ptr("Get Web Apps Slots Diagnostics Worker Process Recycle"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Diagnostics Worker Process Recycle"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/diagnostics/aspnetcore/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Diagnostics for ASP.NET Core app."), - // Operation: to.Ptr("Get Web Apps Diagnostics ASP.NET Core"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Diagnostics ASP.NET Core"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/diagnostics/aspnetcore/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Diagnostics for ASP.NET Core app."), - // Operation: to.Ptr("Get Web Apps Slots Diagnostics ASP.NET Core"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Diagnostics ASP.NET Core"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/domainownershipidentifiers/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Domain Ownership Identifiers."), - // Operation: to.Ptr("Get Web Apps Domain Ownership Identifiers"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Domain Ownership Identifiers"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/domainownershipidentifiers/write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Update Web Apps Domain Ownership Identifiers."), - // Operation: to.Ptr("Update Web Apps Domain Ownership Identifiers"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Domain Ownership Identifiers"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/functions/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Functions Web Apps."), - // Operation: to.Ptr("Functions Web Apps"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/functions/delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete Web Apps Functions."), - // Operation: to.Ptr("Delete Web Apps Functions"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Functions"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/functions/listsecrets/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("List Secrets Web Apps Functions."), - // Operation: to.Ptr("List Secrets Web Apps Functions"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Functions"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/functions/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Functions."), - // Operation: to.Ptr("Get Web Apps Functions"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Functions"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/functions/write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Update Web Apps Functions."), - // Operation: to.Ptr("Update Web Apps Functions"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Functions"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/hostnamebindings/delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete Web Apps Hostname Bindings."), - // Operation: to.Ptr("Delete Web Apps Hostname Bindings"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Hostname Bindings"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/hostnamebindings/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Hostname Bindings."), - // Operation: to.Ptr("Get Web Apps Hostname Bindings"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Hostname Bindings"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/hostnamebindings/write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Update Web Apps Hostname Bindings."), - // Operation: to.Ptr("Update Web Apps Hostname Bindings"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Hostname Bindings"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/hybridconnection/delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete Web Apps Hybrid Connection."), - // Operation: to.Ptr("Delete Web Apps Hybrid Connection"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Hybrid Connection"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/hybridconnection/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Hybrid Connection."), - // Operation: to.Ptr("Get Web Apps Hybrid Connection"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Hybrid Connection"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/hybridconnection/write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Update Web Apps Hybrid Connection."), - // Operation: to.Ptr("Update Web Apps Hybrid Connection"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Hybrid Connection"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/hybridconnectionrelays/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Hybrid Connection Relays."), - // Operation: to.Ptr("Get Web Apps Hybrid Connection Relays"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Hybrid Connection Relays"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/instances/deployments/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Instances Deployments."), - // Operation: to.Ptr("Get Web Apps Instances Deployments"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Instances Deployments"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/instances/processes/delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete Web Apps Instances Processes."), - // Operation: to.Ptr("Delete Web Apps Instances Processes"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Instances Processes"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/instances/processes/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Instances Processes."), - // Operation: to.Ptr("Get Web Apps Instances Processes"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Instances Processes"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/instances/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Instances."), - // Operation: to.Ptr("Get Web Apps Instances"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Instances"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/listsyncfunctiontriggerstatus/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("List Sync Function Trigger Status Web Apps."), - // Operation: to.Ptr("List Sync Function Trigger Status Web Apps"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/metricdefinitions/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Metric Definitions."), - // Operation: to.Ptr("Get Web Apps Metric Definitions"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Metric Definitions"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/metrics/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Metrics."), - // Operation: to.Ptr("Get Web Apps Metrics"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Metrics"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/networktrace/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Network Trace Web Apps."), - // Operation: to.Ptr("Network Trace Web Apps"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/newpassword/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Newpassword Web Apps."), - // Operation: to.Ptr("Newpassword Web Apps"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/operationresults/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Operation Results."), - // Operation: to.Ptr("Get Web Apps Operation Results"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Operation Results"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/perfcounters/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Performance Counters."), - // Operation: to.Ptr("Get Web Apps Performance Counters"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Performance Counters"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/premieraddons/delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete Web Apps Premier Addons."), - // Operation: to.Ptr("Delete Web Apps Premier Addons"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Premier Addons"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/premieraddons/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Premier Addons."), - // Operation: to.Ptr("Get Web Apps Premier Addons"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Premier Addons"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/premieraddons/write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Update Web Apps Premier Addons."), - // Operation: to.Ptr("Update Web Apps Premier Addons"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Premier Addons"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/publishxml/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Publishing XML."), - // Operation: to.Ptr("Get Web Apps Publishing XML"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Publishing XML"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/recommendationhistory/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Recommendation History."), - // Operation: to.Ptr("Get Web Apps Recommendation History"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Recommendation History"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/recommendations/disable/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Disable Web Apps Recommendations."), - // Operation: to.Ptr("Disable Web Apps Recommendations"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Recommendations"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/restore/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Restore."), - // Operation: to.Ptr("Get Web Apps Restore"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Restore"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/analyzecustomhostname/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Analyze Custom Hostname."), - // Operation: to.Ptr("Get Web Apps Slots Analyze Custom Hostname"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Analyze Custom Hostname"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/backup/write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Update Web Apps Slots Backup."), - // Operation: to.Ptr("Update Web Apps Slots Backup"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Backup"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/backups/list/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("List Web Apps Slots Backups."), - // Operation: to.Ptr("List Web Apps Slots Backups"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Backups"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/backups/restore/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Restore Web Apps Slots Backups."), - // Operation: to.Ptr("Restore Web Apps Slots Backups"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Backups"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/config/delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete Web Apps Slots Config."), - // Operation: to.Ptr("Delete Web Apps Slots Config"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Config"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/continuouswebjobs/delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete Web Apps Slots Continuous Web Jobs."), - // Operation: to.Ptr("Delete Web Apps Slots Continuous Web Jobs"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Continuous Web Jobs"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/continuouswebjobs/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Continuous Web Jobs."), - // Operation: to.Ptr("Get Web Apps Slots Continuous Web Jobs"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Continuous Web Jobs"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/continuouswebjobs/start/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Start Web Apps Slots Continuous Web Jobs."), - // Operation: to.Ptr("Start Web Apps Slots Continuous Web Jobs"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Continuous Web Jobs"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/continuouswebjobs/stop/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Stop Web Apps Slots Continuous Web Jobs."), - // Operation: to.Ptr("Stop Web Apps Slots Continuous Web Jobs"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Continuous Web Jobs"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/deployments/delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete Web Apps Slots Deployments."), - // Operation: to.Ptr("Delete Web Apps Slots Deployments"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Deployments"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/deployments/log/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Deployments Log."), - // Operation: to.Ptr("Get Web Apps Slots Deployments Log"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Deployments Log"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/deployments/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Deployments."), - // Operation: to.Ptr("Get Web Apps Slots Deployments"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Deployments"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/deployments/write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Update Web Apps Slots Deployments."), - // Operation: to.Ptr("Update Web Apps Slots Deployments"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Deployments"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/hostnamebindings/delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete Web Apps Slots Hostname Bindings."), - // Operation: to.Ptr("Delete Web Apps Slots Hostname Bindings"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Hostname Bindings"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/hostnamebindings/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Hostname Bindings."), - // Operation: to.Ptr("Get Web Apps Slots Hostname Bindings"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Hostname Bindings"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/hostnamebindings/write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Update Web Apps Slots Hostname Bindings."), - // Operation: to.Ptr("Update Web Apps Slots Hostname Bindings"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Hostname Bindings"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/hybridconnection/delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete Web Apps Slots Hybrid Connection."), - // Operation: to.Ptr("Delete Web Apps Slots Hybrid Connection"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Hybrid Connection"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/hybridconnection/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Hybrid Connection."), - // Operation: to.Ptr("Get Web Apps Slots Hybrid Connection"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Hybrid Connection"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/hybridconnection/write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Update Web Apps Slots Hybrid Connection."), - // Operation: to.Ptr("Update Web Apps Slots Hybrid Connection"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Hybrid Connection"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/instances/deployments/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Instances Deployments."), - // Operation: to.Ptr("Get Web Apps Slots Instances Deployments"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Instances Deployments"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/instances/processes/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Instances Processes."), - // Operation: to.Ptr("Get Web Apps Slots Instances Processes"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Instances Processes"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/instances/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Instances."), - // Operation: to.Ptr("Get Web Apps Slots Instances"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Instances"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/metricdefinitions/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Metric Definitions."), - // Operation: to.Ptr("Get Web Apps Slots Metric Definitions"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Metric Definitions"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/metrics/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Metrics."), - // Operation: to.Ptr("Get Web Apps Slots Metrics"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Metrics"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/newpassword/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Newpassword Web Apps Slots."), - // Operation: to.Ptr("Newpassword Web Apps Slots"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/operationresults/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Operation Results."), - // Operation: to.Ptr("Get Web Apps Slots Operation Results"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Operation Results"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/phplogging/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Phplogging."), - // Operation: to.Ptr("Get Web Apps Slots Phplogging"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Phplogging"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/premieraddons/delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete Web Apps Slots Premier Addons."), - // Operation: to.Ptr("Delete Web Apps Slots Premier Addons"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Premier Addons"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/premieraddons/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Premier Addons."), - // Operation: to.Ptr("Get Web Apps Slots Premier Addons"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Premier Addons"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/premieraddons/write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Update Web Apps Slots Premier Addons."), - // Operation: to.Ptr("Update Web Apps Slots Premier Addons"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Premier Addons"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/restore/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Restore."), - // Operation: to.Ptr("Get Web Apps Slots Restore"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Restore"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/sync/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Sync Web Apps Slots."), - // Operation: to.Ptr("Sync Web Apps Slots"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/triggeredwebjobs/delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete Web Apps Slots Triggered WebJobs."), - // Operation: to.Ptr("Delete Web Apps Slots Triggered WebJobs"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Triggered WebJobs"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/triggeredwebjobs/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Triggered WebJobs."), - // Operation: to.Ptr("Get Web Apps Slots Triggered WebJobs"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Triggered WebJobs"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/triggeredwebjobs/run/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Run Web Apps Slots Triggered WebJobs."), - // Operation: to.Ptr("Run Web Apps Slots Triggered WebJobs"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Triggered WebJobs"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/usages/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Usages."), - // Operation: to.Ptr("Get Web Apps Slots Usages"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Usages"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/virtualnetworkconnections/delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete Web Apps Slots Virtual Network Connections."), - // Operation: to.Ptr("Delete Web Apps Slots Virtual Network Connections"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Virtual Network Connections"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/virtualnetworkconnections/gateways/write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Update Web Apps Slots Virtual Network Connections Gateways."), - // Operation: to.Ptr("Update Web Apps Slots Virtual Network Connections Gateways"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Virtual Network Connections Gateways"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/virtualnetworkconnections/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Virtual Network Connections."), - // Operation: to.Ptr("Get Web Apps Slots Virtual Network Connections"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Virtual Network Connections"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/virtualnetworkconnections/write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Update Web Apps Slots Virtual Network Connections."), - // Operation: to.Ptr("Update Web Apps Slots Virtual Network Connections"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Virtual Network Connections"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/webjobs/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots WebJobs."), - // Operation: to.Ptr("Get Web Apps Slots WebJobs"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots WebJobs"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/snapshots/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Snapshots."), - // Operation: to.Ptr("Get Web Apps Snapshots"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Snapshots"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/sync/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Sync Web Apps."), - // Operation: to.Ptr("Sync Web Apps"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/triggeredwebjobs/delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete Web Apps Triggered WebJobs."), - // Operation: to.Ptr("Delete Web Apps Triggered WebJobs"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Triggered WebJobs"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/triggeredwebjobs/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Triggered WebJobs."), - // Operation: to.Ptr("Get Web Apps Triggered WebJobs"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Triggered WebJobs"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/triggeredwebjobs/run/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Run Web Apps Triggered WebJobs."), - // Operation: to.Ptr("Run Web Apps Triggered WebJobs"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Triggered WebJobs"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/usages/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Usages."), - // Operation: to.Ptr("Get Web Apps Usages"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Usages"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/virtualnetworkconnections/delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete Web Apps Virtual Network Connections."), - // Operation: to.Ptr("Delete Web Apps Virtual Network Connections"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Virtual Network Connections"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/virtualnetworkconnections/gateways/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Virtual Network Connections Gateways."), - // Operation: to.Ptr("Get Web Apps Virtual Network Connections Gateways"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Virtual Network Connections Gateways"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/virtualnetworkconnections/gateways/write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Update Web Apps Virtual Network Connections Gateways."), - // Operation: to.Ptr("Update Web Apps Virtual Network Connections Gateways"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Virtual Network Connections Gateways"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/virtualnetworkconnections/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Virtual Network Connections."), - // Operation: to.Ptr("Get Web Apps Virtual Network Connections"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Virtual Network Connections"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/virtualnetworkconnections/write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Update Web Apps Virtual Network Connections."), - // Operation: to.Ptr("Update Web Apps Virtual Network Connections"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Virtual Network Connections"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/webjobs/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps WebJobs."), - // Operation: to.Ptr("Get Web Apps WebJobs"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps WebJobs"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/skus/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get SKUs."), - // Operation: to.Ptr("Get SKUs"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("SKUs"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sourcecontrols/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Source Controls."), - // Operation: to.Ptr("Get Source Controls"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Source Controls"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sourcecontrols/write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Update Source Controls."), - // Operation: to.Ptr("Update Source Controls"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Source Controls"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/unregister/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Unregister Microsoft.Web resource provider for the subscription."), - // Operation: to.Ptr("Unregister Microsoft.Web resource provider"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Microsoft.Web resource provider"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/validate/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Validate ."), - // Operation: to.Ptr("Validate "), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr(""), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/register/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Register Microsoft.Web resource provider for the subscription."), - // Operation: to.Ptr("Register Microsoft.Web resource provider"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Microsoft.Web resource provider"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/serverfarms/hybridconnectionnamespaces/relays/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get App Service Plans Hybrid Connection Namespaces Relays."), - // Operation: to.Ptr("Get App Service Plans Hybrid Connection Namespaces Relays"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("App Service Plans Hybrid Connection Namespaces Relays"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/backups/delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete Web Apps Backups."), - // Operation: to.Ptr("Delete Web Apps Backups"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Backups"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/hybridconnectionnamespaces/relays/delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete Web Apps Hybrid Connection Namespaces Relays."), - // Operation: to.Ptr("Delete Web Apps Hybrid Connection Namespaces Relays"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Hybrid Connection Namespaces Relays"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/hybridconnectionnamespaces/relays/listkeys/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("List Keys Web Apps Hybrid Connection Namespaces Relays."), - // Operation: to.Ptr("List Keys Web Apps Hybrid Connection Namespaces Relays"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Hybrid Connection Namespaces Relays"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/hybridconnectionnamespaces/relays/write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Update Web Apps Hybrid Connection Namespaces Relays."), - // Operation: to.Ptr("Update Web Apps Hybrid Connection Namespaces Relays"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Hybrid Connection Namespaces Relays"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/metricsdefinitions/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Metrics Definitions."), - // Operation: to.Ptr("Get Web Apps Metrics Definitions"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Metrics Definitions"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/migratemysql/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Migrate MySql Web Apps."), - // Operation: to.Ptr("Migrate MySql Web Apps"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/migratemysql/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Migrate MySql."), - // Operation: to.Ptr("Get Web Apps Migrate MySql"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Migrate MySql"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/recover/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Recover Web Apps."), - // Operation: to.Ptr("Recover Web Apps"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/siteextensions/delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete Web Apps Site Extensions."), - // Operation: to.Ptr("Delete Web Apps Site Extensions"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Site Extensions"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/siteextensions/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Site Extensions."), - // Operation: to.Ptr("Get Web Apps Site Extensions"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Site Extensions"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/siteextensions/write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Update Web Apps Site Extensions."), - // Operation: to.Ptr("Update Web Apps Site Extensions"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Site Extensions"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/backup/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Backup."), - // Operation: to.Ptr("Get Web Apps Slots Backup"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Backup"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/hybridconnectionrelays/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Hybrid Connection Relays."), - // Operation: to.Ptr("Get Web Apps Slots Hybrid Connection Relays"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Hybrid Connection Relays"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/siteextensions/delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete Web Apps Slots Site Extensions."), - // Operation: to.Ptr("Delete Web Apps Slots Site Extensions"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Site Extensions"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/siteextensions/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Site Extensions."), - // Operation: to.Ptr("Get Web Apps Slots Site Extensions"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Site Extensions"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/siteextensions/write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Update Web Apps Slots Site Extensions."), - // Operation: to.Ptr("Update Web Apps Slots Site Extensions"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Site Extensions"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/snapshots/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Snapshots."), - // Operation: to.Ptr("Get Web Apps Slots Snapshots"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Snapshots"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/syncfunctiontriggers/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Sync Function Triggers for Web Apps."), - // Operation: to.Ptr("Sync Function Triggers for Web Apps"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/triggeredwebjobs/history/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Triggered WebJobs History."), - // Operation: to.Ptr("Get Web Apps Triggered WebJobs History"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Triggered WebJobs History"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/connectiongateways/liststatus/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("List Status Connection Gateways."), - // Operation: to.Ptr("List Status Connection Gateways"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Connection Gateways"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/serverfarms/hybridconnectionnamespaces/relays/delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete App Service Plans Hybrid Connection Namespaces Relays."), - // Operation: to.Ptr("Delete App Service Plans Hybrid Connection Namespaces Relays"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("App Service Plans Hybrid Connection Namespaces Relays"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/diagnostics/deployment/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Diagnostics Deployment."), - // Operation: to.Ptr("Get Web Apps Diagnostics Deployment"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Diagnostics Deployment"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/diagnostics/sitecpuanalysis/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Diagnostics Site CPU Analysis."), - // Operation: to.Ptr("Get Web Apps Diagnostics Site CPU Analysis"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Diagnostics Site CPU Analysis"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/diagnostics/sitelatency/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Diagnostics Site Latency."), - // Operation: to.Ptr("Get Web Apps Diagnostics Site Latency"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Diagnostics Site Latency"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/diagnostics/sitememoryanalysis/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Diagnostics Site Memory Analysis."), - // Operation: to.Ptr("Get Web Apps Diagnostics Site Memory Analysis"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Diagnostics Site Memory Analysis"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/diagnostics/threadcount/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Diagnostics Thread Count."), - // Operation: to.Ptr("Get Web Apps Diagnostics Thread Count"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Diagnostics Thread Count"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/diagnostics/deployment/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Diagnostics Deployment."), - // Operation: to.Ptr("Get Web Apps Slots Diagnostics Deployment"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Diagnostics Deployment"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/diagnostics/sitecpuanalysis/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Diagnostics Site CPU Analysis."), - // Operation: to.Ptr("Get Web Apps Slots Diagnostics Site CPU Analysis"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Diagnostics Site CPU Analysis"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/diagnostics/sitelatency/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Diagnostics Site Latency."), - // Operation: to.Ptr("Get Web Apps Slots Diagnostics Site Latency"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Diagnostics Site Latency"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/diagnostics/sitememoryanalysis/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Diagnostics Site Memory Analysis."), - // Operation: to.Ptr("Get Web Apps Slots Diagnostics Site Memory Analysis"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Diagnostics Site Memory Analysis"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/diagnostics/threadcount/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Diagnostics Thread Count."), - // Operation: to.Ptr("Get Web Apps Slots Diagnostics Thread Count"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Diagnostics Thread Count"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/functions/masterkey/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Functions Masterkey."), - // Operation: to.Ptr("Get Web Apps Functions Masterkey"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Functions Masterkey"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/hybridconnectionnamespaces/relays/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Hybrid Connection Namespaces Relays."), - // Operation: to.Ptr("Get Web Apps Hybrid Connection Namespaces Relays"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Hybrid Connection Namespaces Relays"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/instances/extensions/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Instances Extensions."), - // Operation: to.Ptr("Get Web Apps Instances Extensions"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Instances Extensions"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/operations/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Operations."), - // Operation: to.Ptr("Get Web Apps Operations"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Operations"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/resourcehealthmetadata/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Resource Health Metadata."), - // Operation: to.Ptr("Get Web Apps Resource Health Metadata"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Resource Health Metadata"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/backups/delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete Web Apps Slots Backups."), - // Operation: to.Ptr("Delete Web Apps Slots Backups"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Backups"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/domainownershipidentifiers/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Domain Ownership Identifiers."), - // Operation: to.Ptr("Get Web Apps Slots Domain Ownership Identifiers"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Domain Ownership Identifiers"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/hybridconnectionnamespaces/relays/delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete Web Apps Slots Hybrid Connection Namespaces Relays."), - // Operation: to.Ptr("Delete Web Apps Slots Hybrid Connection Namespaces Relays"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Hybrid Connection Namespaces Relays"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/hybridconnectionnamespaces/relays/write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Update Web Apps Slots Hybrid Connection Namespaces Relays."), - // Operation: to.Ptr("Update Web Apps Slots Hybrid Connection Namespaces Relays"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Hybrid Connection Namespaces Relays"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/operations/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Operations."), - // Operation: to.Ptr("Get Web Apps Slots Operations"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Operations"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/perfcounters/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Performance Counters."), - // Operation: to.Ptr("Get Web Apps Slots Performance Counters"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Performance Counters"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/resourcehealthmetadata/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Resource Health Metadata."), - // Operation: to.Ptr("Get Web Apps Slots Resource Health Metadata"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Resource Health Metadata"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/apimanagementaccounts/apiacls/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Api Management Accounts Apiacls."), - // Operation: to.Ptr("Get Api Management Accounts Apiacls"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Api Management Accounts Apiacls"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/apimanagementaccounts/apis/connections/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Api Management Accounts APIs Connections."), - // Operation: to.Ptr("Get Api Management Accounts APIs Connections"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Api Management Accounts APIs Connections"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/apimanagementaccounts/apis/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Api Management Accounts APIs."), - // Operation: to.Ptr("Get Api Management Accounts APIs"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Api Management Accounts APIs"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/apimanagementaccounts/connectionacls/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Api Management Accounts Connectionacls."), - // Operation: to.Ptr("Get Api Management Accounts Connectionacls"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Api Management Accounts Connectionacls"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/apimanagementaccounts/apis/apiacls/delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete Api Management Accounts APIs Apiacls."), - // Operation: to.Ptr("Delete Api Management Accounts APIs Apiacls"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Api Management Accounts APIs Apiacls"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/apimanagementaccounts/apis/apiacls/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Api Management Accounts APIs Apiacls."), - // Operation: to.Ptr("Get Api Management Accounts APIs Apiacls"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Api Management Accounts APIs Apiacls"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/apimanagementaccounts/apis/apiacls/write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Update Api Management Accounts APIs Apiacls."), - // Operation: to.Ptr("Update Api Management Accounts APIs Apiacls"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Api Management Accounts APIs Apiacls"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/apimanagementaccounts/apis/connectionacls/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Api Management Accounts APIs Connectionacls."), - // Operation: to.Ptr("Get Api Management Accounts APIs Connectionacls"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Api Management Accounts APIs Connectionacls"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/apimanagementaccounts/apis/connections/confirmconsentcode/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Confirm Consent Code Api Management Accounts APIs Connections."), - // Operation: to.Ptr("Confirm Consent Code Api Management Accounts APIs Connections"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Api Management Accounts APIs Connections"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/apimanagementaccounts/apis/connections/connectionacls/delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete Api Management Accounts APIs Connections Connectionacls."), - // Operation: to.Ptr("Delete Api Management Accounts APIs Connections Connectionacls"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Api Management Accounts APIs Connections Connectionacls"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/apimanagementaccounts/apis/connections/connectionacls/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Api Management Accounts APIs Connections Connectionacls."), - // Operation: to.Ptr("Get Api Management Accounts APIs Connections Connectionacls"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Api Management Accounts APIs Connections Connectionacls"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/apimanagementaccounts/apis/connections/connectionacls/write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Update Api Management Accounts APIs Connections Connectionacls."), - // Operation: to.Ptr("Update Api Management Accounts APIs Connections Connectionacls"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Api Management Accounts APIs Connections Connectionacls"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/apimanagementaccounts/apis/connections/delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete Api Management Accounts APIs Connections."), - // Operation: to.Ptr("Delete Api Management Accounts APIs Connections"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Api Management Accounts APIs Connections"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/apimanagementaccounts/apis/connections/getconsentlinks/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Consent Links for Api Management Accounts APIs Connections."), - // Operation: to.Ptr("Get Consent Links for Api Management Accounts APIs Connections"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Api Management Accounts APIs Connections"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/apimanagementaccounts/apis/connections/write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Update Api Management Accounts APIs Connections."), - // Operation: to.Ptr("Update Api Management Accounts APIs Connections"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Api Management Accounts APIs Connections"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/apimanagementaccounts/apis/delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete Api Management Accounts APIs."), - // Operation: to.Ptr("Delete Api Management Accounts APIs"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Api Management Accounts APIs"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/apimanagementaccounts/apis/localizeddefinitions/delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete Api Management Accounts APIs Localized Definitions."), - // Operation: to.Ptr("Delete Api Management Accounts APIs Localized Definitions"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Api Management Accounts APIs Localized Definitions"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/apimanagementaccounts/apis/localizeddefinitions/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Api Management Accounts APIs Localized Definitions."), - // Operation: to.Ptr("Get Api Management Accounts APIs Localized Definitions"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Api Management Accounts APIs Localized Definitions"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/apimanagementaccounts/apis/localizeddefinitions/write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Update Api Management Accounts APIs Localized Definitions."), - // Operation: to.Ptr("Update Api Management Accounts APIs Localized Definitions"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Api Management Accounts APIs Localized Definitions"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/apimanagementaccounts/apis/write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Update Api Management Accounts APIs."), - // Operation: to.Ptr("Update Api Management Accounts APIs"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Api Management Accounts APIs"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/apimanagementaccounts/apis/connections/listconnectionkeys/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("List Connection Keys Api Management Accounts APIs Connections."), - // Operation: to.Ptr("List Connection Keys Api Management Accounts APIs Connections"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Api Management Accounts APIs Connections"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/apimanagementaccounts/apis/connections/listsecrets/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("List Secrets Api Management Accounts APIs Connections."), - // Operation: to.Ptr("List Secrets Api Management Accounts APIs Connections"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Api Management Accounts APIs Connections"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/diagnostics/deployments/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Diagnostics Deployments."), - // Operation: to.Ptr("Get Web Apps Diagnostics Deployments"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Diagnostics Deployments"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/diagnostics/deployments/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Diagnostics Deployments."), - // Operation: to.Ptr("Get Web Apps Slots Diagnostics Deployments"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Diagnostics Deployments"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/diagnostics/loganalyzer/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Diagnostics Log Analyzer."), - // Operation: to.Ptr("Get Web Apps Diagnostics Log Analyzer"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Diagnostics Log Analyzer"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/diagnostics/loganalyzer/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Diagnostics Log Analyzer."), - // Operation: to.Ptr("Get Web Apps Slots Diagnostics Log Analyzer"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Diagnostics Log Analyzer"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/diagnostics/sitecrashes/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Diagnostics Site Crashes."), - // Operation: to.Ptr("Get Web Apps Diagnostics Site Crashes"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Diagnostics Site Crashes"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/diagnostics/sitecrashes/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Diagnostics Site Crashes."), - // Operation: to.Ptr("Get Web Apps Slots Diagnostics Site Crashes"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Diagnostics Site Crashes"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/diagnostics/siterestartsettingupdate/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Diagnostics Site Restart Setting Update."), - // Operation: to.Ptr("Get Web Apps Diagnostics Site Restart Setting Update"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Diagnostics Site Restart Setting Update"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/diagnostics/siterestartsettingupdate/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Diagnostics Site Restart Setting Update."), - // Operation: to.Ptr("Get Web Apps Slots Diagnostics Site Restart Setting Update"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Diagnostics Site Restart Setting Update"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/diagnostics/siterestartuserinitiated/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Diagnostics Site Restart User Initiated."), - // Operation: to.Ptr("Get Web Apps Diagnostics Site Restart User Initiated"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Diagnostics Site Restart User Initiated"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/diagnostics/siterestartuserinitiated/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Diagnostics Site Restart User Initiated."), - // Operation: to.Ptr("Get Web Apps Slots Diagnostics Site Restart User Initiated"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Diagnostics Site Restart User Initiated"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/diagnostics/siteswap/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Diagnostics Site Swap."), - // Operation: to.Ptr("Get Web Apps Diagnostics Site Swap"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Diagnostics Site Swap"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/diagnostics/siteswap/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Diagnostics Site Swap."), - // Operation: to.Ptr("Get Web Apps Slots Diagnostics Site Swap"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Diagnostics Site Swap"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/functions/token/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Functions Token."), - // Operation: to.Ptr("Get Web Apps Functions Token"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Functions Token"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/instances/deployments/delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete Web Apps Instances Deployments."), - // Operation: to.Ptr("Delete Web Apps Instances Deployments"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Instances Deployments"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/processes/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Processes."), - // Operation: to.Ptr("Get Web Apps Processes"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Processes"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/publiccertificates/delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete Web Apps Public Certificates."), - // Operation: to.Ptr("Delete Web Apps Public Certificates"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Public Certificates"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/publiccertificates/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Public Certificates."), - // Operation: to.Ptr("Get Web Apps Public Certificates"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Public Certificates"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/publiccertificates/write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Update Web Apps Public Certificates."), - // Operation: to.Ptr("Update Web Apps Public Certificates"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Public Certificates"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/networktrace/action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Network Trace Web Apps Slots."), - // Operation: to.Ptr("Network Trace Web Apps Slots"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/diagnostics/autoheal/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Diagnostics Autoheal."), - // Operation: to.Ptr("Get Web Apps Diagnostics Autoheal"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Diagnostics Autoheal"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/diagnostics/autoheal/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Diagnostics Autoheal."), - // Operation: to.Ptr("Get Web Apps Slots Diagnostics Autoheal"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Diagnostics Autoheal"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/diagnostics/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Diagnostics."), - // Operation: to.Ptr("Get Web Apps Slots Diagnostics"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Diagnostics"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/diagnostics/runtimeavailability/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Diagnostics Runtime Availability."), - // Operation: to.Ptr("Get Web Apps Slots Diagnostics Runtime Availability"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Diagnostics Runtime Availability"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/diagnostics/servicehealth/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Diagnostics Service Health."), - // Operation: to.Ptr("Get Web Apps Slots Diagnostics Service Health"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Diagnostics Service Health"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/diagnostics/sitelatency/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Diagnostics Site Latency."), - // Operation: to.Ptr("Get Web Apps Slots Diagnostics Site Latency"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Diagnostics Site Latency"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/migratemysql/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Migrate MySql."), - // Operation: to.Ptr("Get Web Apps Slots Migrate MySql"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Migrate MySql"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/providers/Microsoft.Insights/diagnosticSettings/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Gets the diagnostic setting for the resource"), - // Operation: to.Ptr("Read diagnostic setting"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Diagnostic setting for Web App"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/providers/Microsoft.Insights/diagnosticSettings/write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Creates or updates the diagnostic setting for the resource"), - // Operation: to.Ptr("Write diagnostic setting"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Diagnostic setting for Web App"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/providers/Microsoft.Insights/diagnosticSettings/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Gets the diagnostic setting for the resource"), - // Operation: to.Ptr("Read diagnostic setting"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Diagnostic setting for Web App slot"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/providers/Microsoft.Insights/diagnosticSettings/write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Creates or updates the diagnostic setting for the resource"), - // Operation: to.Ptr("Write diagnostic setting"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Diagnostic setting for Web App slot"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("microsoft.web/serverfarms/providers/Microsoft.Insights/diagnosticSettings/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Gets the diagnostic setting for the resource"), - // Operation: to.Ptr("Read diagnostic setting"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Diagnostic setting for App Service plan"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("microsoft.web/serverfarms/providers/Microsoft.Insights/diagnosticSettings/write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Creates or updates the diagnostic setting for the resource"), - // Operation: to.Ptr("Write diagnostic setting"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Diagnostic setting for App Service plan"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("microsoft.web/hostingenvironments/providers/Microsoft.Insights/diagnosticSettings/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Gets the diagnostic setting for the resource"), - // Operation: to.Ptr("Read diagnostic setting"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Diagnostic setting for App Service Environment"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("microsoft.web/hostingenvironments/providers/Microsoft.Insights/diagnosticSettings/write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Creates or updates the diagnostic setting for the resource"), - // Operation: to.Ptr("Write diagnostic setting"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Diagnostic setting for App Service Environment"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("microsoft.web/billingmeters/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get list of billing meters."), - // Operation: to.Ptr("Read billing meters"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Billing meters for Microsoft Web Apps"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/instances/processes/delete"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Delete Web Apps Slots Instances Processes."), - // Operation: to.Ptr("Delete Web Apps Slots Instances Processes"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Instances Processes"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/restore/write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Restore Web Apps."), - // Operation: to.Ptr("Restore Web Apps"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/instances/extensions/log/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Instances Extensions Log."), - // Operation: to.Ptr("Get Web Apps Instances Extensions Log"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Instances Extensions Log"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/customapis/write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Update Custom APIs."), - // Operation: to.Ptr("Update Custom APIs"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Custom APIs"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/customapis/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Custom APIs."), - // Operation: to.Ptr("Get Custom APIs"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Custom APIs"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/diagnostics/failedrequestsperuri/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Diagnostics Failed Requests Per Uri."), - // Operation: to.Ptr("Get Web Apps Diagnostics Failed Requests Per Uri"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Diagnostics Failed Requests Per Uri"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/restore/write"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Restore Web Apps Slots."), - // Operation: to.Ptr("Restore Web Apps Slots"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/diagnostics/detectors/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Diagnostics Detector."), - // Operation: to.Ptr("Get Web Apps Diagnostics Detector"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Diagnostics Detector"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/diagnostics/analyses/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Diagnostics Analysis."), - // Operation: to.Ptr("Get Web Apps Diagnostics Analysis"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Diagnostics Analysis"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/diagnostics/analyses/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Diagnostics Analysis."), - // Operation: to.Ptr("Get Web Apps Slots Diagnostics Analysis"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Diagnostics Analysis"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/diagnostics/detectors/read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Get Web Apps Slots Diagnostics Detector."), - // Operation: to.Ptr("Get Web Apps Slots Diagnostics Detector"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Diagnostics Detector"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/diagnostics/analyses/execute/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Run Web Apps Diagnostics Analysis."), - // Operation: to.Ptr("Run Web Apps Diagnostics Analysis"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Diagnostics Analysis"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/diagnostics/detectors/execute/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Run Web Apps Diagnostics Detector."), - // Operation: to.Ptr("Run Web Apps Diagnostics Detector"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Diagnostics Detector"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/diagnostics/analyses/execute/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Run Web Apps Slots Diagnostics Analysis."), - // Operation: to.Ptr("Run Web Apps Slots Diagnostics Analysis"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Diagnostics Analysis"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("microsoft.web/sites/slots/diagnostics/detectors/execute/Action"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Run Web Apps Slots Diagnostics Detector."), - // Operation: to.Ptr("Run Web Apps Slots Diagnostics Detector"), - // Provider: to.Ptr("Microsoft Web Apps"), - // Resource: to.Ptr("Web Apps Slots Diagnostics Detector"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.Web/serverfarms/providers/Microsoft.Insights/metricDefinitions/Read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Gets the available metrics for App Service Plan"), - // Operation: to.Ptr("Read App Service Plan metric definitions"), - // Provider: to.Ptr("Microsoft.Web"), - // Resource: to.Ptr("The metric definition of App Service Plan"), - // }, - // Origin: to.Ptr("system"), - // Properties: &armappservice.CsmOperationDescriptionProperties{ - // ServiceSpecification: &armappservice.ServiceSpecification{ - // MetricSpecifications: []*armappservice.MetricSpecification{ - // { - // Name: to.Ptr("CpuPercentage"), - // AggregationType: to.Ptr("Average"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("CPU Percentage"), - // DisplayName: to.Ptr("CPU Percentage"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // MetricFilterPattern: to.Ptr("^(?!functionapp).*$"), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Percent"), - // }, - // { - // Name: to.Ptr("MemoryPercentage"), - // AggregationType: to.Ptr("Average"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Memory Percentage"), - // DisplayName: to.Ptr("Memory Percentage"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // MetricFilterPattern: to.Ptr("^(?!functionapp).*$"), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Percent"), - // }, - // { - // Name: to.Ptr("DiskQueueLength"), - // AggregationType: to.Ptr("Average"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Disk Queue Length"), - // DisplayName: to.Ptr("Disk Queue Length"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // MetricFilterPattern: to.Ptr("^(?!functionapp).*$"), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("HttpQueueLength"), - // AggregationType: to.Ptr("Average"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Http Queue Length"), - // DisplayName: to.Ptr("Http Queue Length"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // MetricFilterPattern: to.Ptr("^(?!functionapp).*$"), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("BytesReceived"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Data In"), - // DisplayName: to.Ptr("Data In"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // MetricFilterPattern: to.Ptr("^(?!functionapp).*$"), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Bytes"), - // }, - // { - // Name: to.Ptr("BytesSent"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Data Out"), - // DisplayName: to.Ptr("Data Out"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // MetricFilterPattern: to.Ptr("^(?!functionapp).*$"), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Bytes"), - // }}, - // }, - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/providers/Microsoft.Insights/metricDefinitions/Read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Gets the available metrics for Web App"), - // Operation: to.Ptr("Read Web App metric definitions"), - // Provider: to.Ptr("Microsoft.Web"), - // Resource: to.Ptr("The metric definition of Web App"), - // }, - // Origin: to.Ptr("system"), - // Properties: &armappservice.CsmOperationDescriptionProperties{ - // ServiceSpecification: &armappservice.ServiceSpecification{ - // MetricSpecifications: []*armappservice.MetricSpecification{ - // { - // Name: to.Ptr("CpuTime"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("CPU Time"), - // DisplayName: to.Ptr("CPU Time"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // MetricFilterPattern: to.Ptr("^(?!functionapp).*$"), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Seconds"), - // }, - // { - // Name: to.Ptr("Requests"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Requests"), - // DisplayName: to.Ptr("Requests"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // MetricFilterPattern: to.Ptr("^(?!functionapp).*$"), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("BytesReceived"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Data In"), - // DisplayName: to.Ptr("Data In"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Bytes"), - // }, - // { - // Name: to.Ptr("BytesSent"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Data Out"), - // DisplayName: to.Ptr("Data Out"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Bytes"), - // }, - // { - // Name: to.Ptr("Http101"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Http 101"), - // DisplayName: to.Ptr("Http 101"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // MetricFilterPattern: to.Ptr("^(?!functionapp).*$"), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("Http2xx"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Http 2xx"), - // DisplayName: to.Ptr("Http 2xx"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // MetricFilterPattern: to.Ptr("^(?!functionapp).*$"), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("Http3xx"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Http 3xx"), - // DisplayName: to.Ptr("Http 3xx"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // MetricFilterPattern: to.Ptr("^(?!functionapp).*$"), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("Http401"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Http 401"), - // DisplayName: to.Ptr("Http 401"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // MetricFilterPattern: to.Ptr("^(?!functionapp).*$"), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("Http403"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Http 403"), - // DisplayName: to.Ptr("Http 403"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // MetricFilterPattern: to.Ptr("^(?!functionapp).*$"), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("Http404"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Http 404"), - // DisplayName: to.Ptr("Http 404"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // MetricFilterPattern: to.Ptr("^(?!functionapp).*$"), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("Http406"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Http 406"), - // DisplayName: to.Ptr("Http 406"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // MetricFilterPattern: to.Ptr("^(?!functionapp).*$"), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("Http4xx"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Http 4xx"), - // DisplayName: to.Ptr("Http 4xx"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // MetricFilterPattern: to.Ptr("^(?!functionapp).*$"), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("Http5xx"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Http Server Errors"), - // DisplayName: to.Ptr("Http Server Errors"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("MemoryWorkingSet"), - // AggregationType: to.Ptr("Average"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Memory working set"), - // DisplayName: to.Ptr("Memory working set"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Bytes"), - // }, - // { - // Name: to.Ptr("AverageMemoryWorkingSet"), - // AggregationType: to.Ptr("Average"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Average memory working set"), - // DisplayName: to.Ptr("Average memory working set"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Bytes"), - // }, - // { - // Name: to.Ptr("AverageResponseTime"), - // AggregationType: to.Ptr("Average"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Average Response Time"), - // DisplayName: to.Ptr("Average Response Time"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // MetricFilterPattern: to.Ptr("^(?!functionapp).*$"), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Seconds"), - // }, - // { - // Name: to.Ptr("FunctionExecutionUnits"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Function Execution Units"), - // DisplayName: to.Ptr("Function Execution Units"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // MetricFilterPattern: to.Ptr("(?i:functionapp)"), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("FunctionExecutionCount"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Function Execution Count"), - // DisplayName: to.Ptr("Function Execution Count"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // MetricFilterPattern: to.Ptr("(?i:functionapp)"), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }}, - // }, - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Web/sites/slots/providers/Microsoft.Insights/metricDefinitions/Read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Gets the available metrics for Web App Slot"), - // Operation: to.Ptr("Read Web App Slot metric definitions"), - // Provider: to.Ptr("Microsoft.Web"), - // Resource: to.Ptr("The metric definition of Web App Slot"), - // }, - // Origin: to.Ptr("system"), - // Properties: &armappservice.CsmOperationDescriptionProperties{ - // ServiceSpecification: &armappservice.ServiceSpecification{ - // MetricSpecifications: []*armappservice.MetricSpecification{ - // { - // Name: to.Ptr("CpuTime"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("CPU Time"), - // DisplayName: to.Ptr("CPU Time"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // MetricFilterPattern: to.Ptr("^(?!functionapp).*$"), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Seconds"), - // }, - // { - // Name: to.Ptr("Requests"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Requests"), - // DisplayName: to.Ptr("Requests"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // MetricFilterPattern: to.Ptr("^(?!functionapp).*$"), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("BytesReceived"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Data In"), - // DisplayName: to.Ptr("Data In"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Bytes"), - // }, - // { - // Name: to.Ptr("BytesSent"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Data Out"), - // DisplayName: to.Ptr("Data Out"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Bytes"), - // }, - // { - // Name: to.Ptr("Http101"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Http 101"), - // DisplayName: to.Ptr("Http 101"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // MetricFilterPattern: to.Ptr("^(?!functionapp).*$"), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("Http2xx"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Http 2xx"), - // DisplayName: to.Ptr("Http 2xx"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // MetricFilterPattern: to.Ptr("^(?!functionapp).*$"), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("Http3xx"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Http 3xx"), - // DisplayName: to.Ptr("Http 3xx"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // MetricFilterPattern: to.Ptr("^(?!functionapp).*$"), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("Http401"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Http 401"), - // DisplayName: to.Ptr("Http 401"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // MetricFilterPattern: to.Ptr("^(?!functionapp).*$"), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("Http403"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Http 403"), - // DisplayName: to.Ptr("Http 403"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // MetricFilterPattern: to.Ptr("^(?!functionapp).*$"), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("Http404"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Http 404"), - // DisplayName: to.Ptr("Http 404"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // MetricFilterPattern: to.Ptr("^(?!functionapp).*$"), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("Http406"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Http 406"), - // DisplayName: to.Ptr("Http 406"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // MetricFilterPattern: to.Ptr("^(?!functionapp).*$"), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("Http4xx"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Http 4xx"), - // DisplayName: to.Ptr("Http 4xx"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // MetricFilterPattern: to.Ptr("^(?!functionapp).*$"), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("Http5xx"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Http Server Errors"), - // DisplayName: to.Ptr("Http Server Errors"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("MemoryWorkingSet"), - // AggregationType: to.Ptr("Average"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Memory working set"), - // DisplayName: to.Ptr("Memory working set"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Bytes"), - // }, - // { - // Name: to.Ptr("AverageMemoryWorkingSet"), - // AggregationType: to.Ptr("Average"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Average memory working set"), - // DisplayName: to.Ptr("Average memory working set"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Bytes"), - // }, - // { - // Name: to.Ptr("AverageResponseTime"), - // AggregationType: to.Ptr("Average"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Average Response Time"), - // DisplayName: to.Ptr("Average Response Time"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // MetricFilterPattern: to.Ptr("^(?!functionapp).*$"), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Seconds"), - // }, - // { - // Name: to.Ptr("FunctionExecutionUnits"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Function Execution Units"), - // DisplayName: to.Ptr("Function Execution Units"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // MetricFilterPattern: to.Ptr("(?i:functionapp)"), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("FunctionExecutionCount"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Function Execution Count"), - // DisplayName: to.Ptr("Function Execution Count"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // MetricFilterPattern: to.Ptr("(?i:functionapp)"), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }}, - // }, - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Web/hostingEnvironments/multiRolePools/providers/Microsoft.Insights/metricDefinitions/Read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Gets the available metrics for App Service Environment MultiRole"), - // Operation: to.Ptr("Read App Service Environment MultiRole metric definitions"), - // Provider: to.Ptr("Microsoft.Web"), - // Resource: to.Ptr("The metric definition of App Service Environment MultiRole"), - // }, - // Origin: to.Ptr("system"), - // Properties: &armappservice.CsmOperationDescriptionProperties{ - // ServiceSpecification: &armappservice.ServiceSpecification{ - // MetricSpecifications: []*armappservice.MetricSpecification{ - // { - // Name: to.Ptr("Requests"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Requests"), - // DisplayName: to.Ptr("Requests"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("BytesReceived"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Data In"), - // DisplayName: to.Ptr("Data In"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Bytes"), - // }, - // { - // Name: to.Ptr("BytesSent"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Data Out"), - // DisplayName: to.Ptr("Data Out"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Bytes"), - // }, - // { - // Name: to.Ptr("Http101"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Http 101"), - // DisplayName: to.Ptr("Http 101"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("Http2xx"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Http 2xx"), - // DisplayName: to.Ptr("Http 2xx"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("Http3xx"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Http 3xx"), - // DisplayName: to.Ptr("Http 3xx"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("Http401"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Http 401"), - // DisplayName: to.Ptr("Http 401"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("Http403"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Http 403"), - // DisplayName: to.Ptr("Http 403"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("Http404"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Http 404"), - // DisplayName: to.Ptr("Http 404"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("Http406"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Http 406"), - // DisplayName: to.Ptr("Http 406"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("Http4xx"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Http 4xx"), - // DisplayName: to.Ptr("Http 4xx"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("Http5xx"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Http Server Errors"), - // DisplayName: to.Ptr("Http Server Errors"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("AverageResponseTime"), - // AggregationType: to.Ptr("Average"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Average Response Time"), - // DisplayName: to.Ptr("Average Response Time"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Seconds"), - // }, - // { - // Name: to.Ptr("CpuPercentage"), - // AggregationType: to.Ptr("Average"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("CPU Percentage"), - // DisplayName: to.Ptr("CPU Percentage"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Percent"), - // }, - // { - // Name: to.Ptr("MemoryPercentage"), - // AggregationType: to.Ptr("Average"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Memory Percentage"), - // DisplayName: to.Ptr("Memory Percentage"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Percent"), - // }, - // { - // Name: to.Ptr("DiskQueueLength"), - // AggregationType: to.Ptr("Average"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Disk Queue Length"), - // DisplayName: to.Ptr("Disk Queue Length"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("HttpQueueLength"), - // AggregationType: to.Ptr("Average"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Http Queue Length"), - // DisplayName: to.Ptr("Http Queue Length"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("ActiveRequests"), - // AggregationType: to.Ptr("Total"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // Dimensions: []*armappservice.Dimension{ - // { - // Name: to.Ptr("Instance"), - // DisplayName: to.Ptr("Instance"), - // InternalName: to.Ptr("ServerName"), - // ToBeExportedForShoebox: to.Ptr(true), - // }}, - // DisplayDescription: to.Ptr("Active Requests"), - // DisplayName: to.Ptr("Active Requests"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("TotalFrontEnds"), - // AggregationType: to.Ptr("Average"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // DisplayDescription: to.Ptr("Total Front Ends"), - // DisplayName: to.Ptr("Total Front Ends"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("SmallAppServicePlanInstances"), - // AggregationType: to.Ptr("Average"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // DisplayDescription: to.Ptr("Small App Service Plan Workers"), - // DisplayName: to.Ptr("Small App Service Plan Workers"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("MediumAppServicePlanInstances"), - // AggregationType: to.Ptr("Average"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // DisplayDescription: to.Ptr("Medium App Service Plan Workers"), - // DisplayName: to.Ptr("Medium App Service Plan Workers"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("LargeAppServicePlanInstances"), - // AggregationType: to.Ptr("Average"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // DisplayDescription: to.Ptr("Large App Service Plan Workers"), - // DisplayName: to.Ptr("Large App Service Plan Workers"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }}, - // }, - // }, - // }, - // { - // Name: to.Ptr("Microsoft.Web/hostingEnvironments/workerPools/providers/Microsoft.Insights/metricDefinitions/Read"), - // Display: &armappservice.CsmOperationDisplay{ - // Description: to.Ptr("Gets the available metrics for App Service Environment WorkerPool"), - // Operation: to.Ptr("Read App Service Environment WorkerPool metric definitions"), - // Provider: to.Ptr("Microsoft.Web"), - // Resource: to.Ptr("The metric definition of App Service Environment WorkerPool"), - // }, - // Origin: to.Ptr("system"), - // Properties: &armappservice.CsmOperationDescriptionProperties{ - // ServiceSpecification: &armappservice.ServiceSpecification{ - // MetricSpecifications: []*armappservice.MetricSpecification{ - // { - // Name: to.Ptr("WorkersTotal"), - // AggregationType: to.Ptr("Average"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // DisplayDescription: to.Ptr("Total Workers"), - // DisplayName: to.Ptr("Total Workers"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("WorkersAvailable"), - // AggregationType: to.Ptr("Average"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // DisplayDescription: to.Ptr("Available Workers"), - // DisplayName: to.Ptr("Available Workers"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }, - // { - // Name: to.Ptr("WorkersUsed"), - // AggregationType: to.Ptr("Average"), - // Availabilities: []*armappservice.MetricAvailability{ - // { - // BlobDuration: to.Ptr("P2D"), - // TimeGrain: to.Ptr("PT1M"), - // }, - // { - // BlobDuration: to.Ptr("P30D"), - // TimeGrain: to.Ptr("PT1H"), - // }, - // { - // BlobDuration: to.Ptr("P90D"), - // TimeGrain: to.Ptr("P1D"), - // }}, - // DisplayDescription: to.Ptr("Used Workers"), - // DisplayName: to.Ptr("Used Workers"), - // EnableRegionalMdmAccount: to.Ptr(false), - // FillGapWithZero: to.Ptr(true), - // IsInternal: to.Ptr(false), - // SupportsInstanceLevelAggregation: to.Ptr(false), - // Unit: to.Ptr("Count"), - // }}, - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetWebAppStacks.json -func ExampleProviderClient_NewGetWebAppStacksPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewProviderClient().NewGetWebAppStacksPager(&armappservice.ProviderClientGetWebAppStacksOptions{StackOsType: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.WebAppStackCollection = armappservice.WebAppStackCollection{ - // Value: []*armappservice.WebAppStack{ - // { - // Name: to.Ptr("dotnet"), - // Type: to.Ptr("Microsoft.Web/webAppStacks"), - // ID: to.Ptr("/providers/Microsoft.Web/webAppStacks/dotnet"), - // Properties: &armappservice.WebAppStackProperties{ - // DisplayText: to.Ptr(".NET"), - // MajorVersions: []*armappservice.WebAppMajorVersion{ - // { - // DisplayText: to.Ptr(".NET 5"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr(".NET 5"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("5.0.x"), - // }, - // IsEarlyAccess: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("DOTNETCORE|5.0"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("5.0.x"), - // }, - // IsEarlyAccess: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("v5.0"), - // }, - // }, - // Value: to.Ptr("5"), - // }}, - // Value: to.Ptr("5"), - // }, - // { - // DisplayText: to.Ptr(".NET Core 3"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr(".NET Core 3.1 (LTS)"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("3.1.301"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("DOTNETCORE|3.1"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("3.1.301"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("3.1"), - // }, - // }, - // Value: to.Ptr("3.1"), - // }, - // { - // DisplayText: to.Ptr(".NET Core 3.0"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-03T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("3.0.103"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("DOTNETCORE|3.0"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-03T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("3.0.103"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("3.0"), - // }, - // }, - // Value: to.Ptr("3.0"), - // }}, - // Value: to.Ptr("3"), - // }, - // { - // DisplayText: to.Ptr(".NET Core 2"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr(".NET Core 2.2"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-23T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("2.2.207"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("DOTNETCORE|2.2"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-23T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("2.2.207"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("2.2"), - // }, - // }, - // Value: to.Ptr("2.2"), - // }, - // { - // DisplayText: to.Ptr(".NET Core 2.1 (LTS)"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-21T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("2.1.807"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("DOTNETCORE|2.1"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-09-21T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("2.1.807"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("2.1"), - // }, - // }, - // Value: to.Ptr("2.1"), - // }, - // { - // DisplayText: to.Ptr(".NET Core 2.0"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-11-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("2.1.202"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("DOTNETCORE|2.0"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-11-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("2.1.202"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("2.0"), - // }, - // }, - // Value: to.Ptr("2.0"), - // }}, - // Value: to.Ptr("dotnetcore2"), - // }, - // { - // DisplayText: to.Ptr(".NET Core 1"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr(".NET Core 1.1"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-27T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("1.1.14"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("DOTNETCORE|1.1"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-27T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("1.1.14"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.1"), - // }, - // }, - // Value: to.Ptr("1.1"), - // }, - // { - // DisplayText: to.Ptr(".NET Core 1.0"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-27T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("1.1.14"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("DOTNETCORE|1.0"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-27T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("1.1.14"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.0"), - // }, - // }, - // Value: to.Ptr("1.0"), - // }}, - // Value: to.Ptr("1"), - // }, - // { - // DisplayText: to.Ptr("ASP.NET V4"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("ASP.NET V4.8"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("3.1"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("v4.0"), - // }, - // }, - // Value: to.Ptr("v4.8"), - // }}, - // Value: to.Ptr("v4"), - // }, - // { - // DisplayText: to.Ptr("ASP.NET V3"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("ASP.NET V3.5"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("2.1"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("v2.0"), - // }, - // }, - // Value: to.Ptr("v3.5"), - // }}, - // Value: to.Ptr("v3"), - // }}, - // PreferredOs: to.Ptr(armappservice.StackPreferredOsWindows), - // Value: to.Ptr("dotnet"), - // }, - // }, - // { - // Name: to.Ptr("node"), - // Type: to.Ptr("Microsoft.Web/webAppStacks"), - // ID: to.Ptr("/providers/Microsoft.Web/webAppStacks/node"), - // Properties: &armappservice.WebAppStackProperties{ - // DisplayText: to.Ptr("Node"), - // MajorVersions: []*armappservice.WebAppMajorVersion{ - // { - // DisplayText: to.Ptr("Node LTS"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Node LTS"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|lts"), - // }, - // }, - // Value: to.Ptr("lts"), - // }}, - // Value: to.Ptr("lts"), - // }, - // { - // DisplayText: to.Ptr("Node 14"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Node 14 LTS"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-30T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("14.x"), - // }, - // IsPreview: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|14-lts"), - // }, - // }, - // Value: to.Ptr("14-lts"), - // }}, - // Value: to.Ptr("14"), - // }, - // { - // DisplayText: to.Ptr("Node 12"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Node 12 LTS"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("12.x"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|12-lts"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("12.13.0"), - // }, - // }, - // Value: to.Ptr("12-lts"), - // }, - // { - // DisplayText: to.Ptr("Node 12.9"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("12.x"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(true), - // RuntimeVersion: to.Ptr("NODE|12.9"), - // }, - // }, - // Value: to.Ptr("12.9"), - // }}, - // Value: to.Ptr("12"), - // }, - // { - // DisplayText: to.Ptr("Node 10"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Node 10 LTS"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("10.x"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|10-lts"), - // }, - // }, - // Value: to.Ptr("10-LTS"), - // }, - // { - // DisplayText: to.Ptr("Node 10.16"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("10.x"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|10.16"), - // }, - // }, - // Value: to.Ptr("10.16"), - // }, - // { - // DisplayText: to.Ptr("Node 10.15"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("10.x"), - // }, - // IsHidden: to.Ptr(true), - // IsPreview: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("10.15.2"), - // }, - // }, - // Value: to.Ptr("10.15"), - // }, - // { - // DisplayText: to.Ptr("Node 10.14"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("10.x"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|10.14"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("10.x"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("10.14.1"), - // }, - // }, - // Value: to.Ptr("10.14"), - // }, - // { - // DisplayText: to.Ptr("Node 10.12"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("10.x"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|10.12"), - // }, - // }, - // Value: to.Ptr("10.12"), - // }, - // { - // DisplayText: to.Ptr("Node 10.10"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("10.x"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|10.10"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("10.x"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("10.0.0"), - // }, - // }, - // Value: to.Ptr("10.10"), - // }, - // { - // DisplayText: to.Ptr("Node 10.6"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("10.x"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|10.6"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("10.6.0"), - // }, - // }, - // Value: to.Ptr("10.6"), - // }, - // { - // DisplayText: to.Ptr("Node 10.1"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("10.x"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|10.1"), - // }, - // }, - // Value: to.Ptr("10.1"), - // }}, - // Value: to.Ptr("10"), - // }, - // { - // DisplayText: to.Ptr("Node 9"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Node 9.4"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-07-30T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|9.4"), - // }, - // }, - // Value: to.Ptr("9.4"), - // }}, - // Value: to.Ptr("9"), - // }, - // { - // DisplayText: to.Ptr("Node 8"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Node 8 LTS"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-31T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|8-lts"), - // }, - // }, - // Value: to.Ptr("8-lts"), - // }, - // { - // DisplayText: to.Ptr("Node 8.12"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-31T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|8.12"), - // }, - // }, - // Value: to.Ptr("8.12"), - // }, - // { - // DisplayText: to.Ptr("Node 8.11"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-31T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|8.11"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-31T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("8.11"), - // }, - // }, - // Value: to.Ptr("8.11"), - // }, - // { - // DisplayText: to.Ptr("Node 8.10"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-31T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("8.10"), - // }, - // }, - // Value: to.Ptr("8.10"), - // }, - // { - // DisplayText: to.Ptr("Node 8.9"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-31T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|8.9"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-31T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("8.9"), - // }, - // }, - // Value: to.Ptr("8.9"), - // }, - // { - // DisplayText: to.Ptr("Node 8.8"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-31T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|8.8"), - // }, - // }, - // Value: to.Ptr("8.8"), - // }, - // { - // DisplayText: to.Ptr("Node 8.5"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-31T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("8.5"), - // }, - // }, - // Value: to.Ptr("8.5"), - // }, - // { - // DisplayText: to.Ptr("Node 8.4"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-31T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("8.4"), - // }, - // }, - // Value: to.Ptr("8.4"), - // }, - // { - // DisplayText: to.Ptr("Node 8.2"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-31T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|8.2"), - // }, - // }, - // Value: to.Ptr("8.2"), - // }, - // { - // DisplayText: to.Ptr("Node 8.1"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-31T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|8.1"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-31T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("8.1.4"), - // }, - // }, - // Value: to.Ptr("8.1"), - // }, - // { - // DisplayText: to.Ptr("Node 8.0"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-31T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|8.0"), - // }, - // }, - // Value: to.Ptr("8.0"), - // }}, - // Value: to.Ptr("8"), - // }, - // { - // DisplayText: to.Ptr("Node 7"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Node 7.10"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-07-30T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("7.10.1"), - // }, - // }, - // Value: to.Ptr("7.10"), - // }}, - // Value: to.Ptr("7"), - // }, - // { - // DisplayText: to.Ptr("Node 6"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Node 6 LTS"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-30T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|6-lts"), - // }, - // }, - // Value: to.Ptr("6-LTS"), - // }, - // { - // DisplayText: to.Ptr("Node 6.12"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-30T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("6.12"), - // }, - // }, - // Value: to.Ptr("6.12"), - // }, - // { - // DisplayText: to.Ptr("Node 6.11"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-30T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|6.11"), - // }, - // }, - // Value: to.Ptr("6.11"), - // }, - // { - // DisplayText: to.Ptr("Node 6.10"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-30T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|6.10"), - // }, - // }, - // Value: to.Ptr("6.10"), - // }, - // { - // DisplayText: to.Ptr("Node 6.9"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-30T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|6.9"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-30T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("6.9.5"), - // }, - // }, - // Value: to.Ptr("6.9"), - // }, - // { - // DisplayText: to.Ptr("Node 6.6"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-30T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|6.6"), - // }, - // }, - // Value: to.Ptr("6.6"), - // }, - // { - // DisplayText: to.Ptr("Node 6.5"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-30T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("6.5.0"), - // }, - // }, - // Value: to.Ptr("6.5"), - // }, - // { - // DisplayText: to.Ptr("Node 6.2"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-30T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|6.2"), - // }, - // }, - // Value: to.Ptr("6.2"), - // }}, - // Value: to.Ptr("6"), - // }, - // { - // DisplayText: to.Ptr("Node 4"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Node 4.8"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-05-30T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|4.8"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-05-30T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("4.8"), - // }, - // }, - // Value: to.Ptr("4.8"), - // }, - // { - // DisplayText: to.Ptr("Node 4.5"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-05-30T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|4.5"), - // }, - // }, - // Value: to.Ptr("4.5"), - // }, - // { - // DisplayText: to.Ptr("Node 4.4"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-05-30T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("NODE|4.4"), - // }, - // }, - // Value: to.Ptr("4.4"), - // }}, - // Value: to.Ptr("4"), - // }}, - // PreferredOs: to.Ptr(armappservice.StackPreferredOsLinux), - // Value: to.Ptr("node"), - // }, - // }, - // { - // Name: to.Ptr("python"), - // Type: to.Ptr("Microsoft.Web/webAppStacks"), - // ID: to.Ptr("/providers/Microsoft.Web/webAppStacks/python"), - // Properties: &armappservice.WebAppStackProperties{ - // DisplayText: to.Ptr("Python"), - // MajorVersions: []*armappservice.WebAppMajorVersion{ - // { - // DisplayText: to.Ptr("Python 3"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Python 3.8"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("3.8"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("PYTHON|3.8"), - // }, - // }, - // Value: to.Ptr("3.8"), - // }, - // { - // DisplayText: to.Ptr("Python 3.7"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("3.7"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("PYTHON|3.7"), - // }, - // }, - // Value: to.Ptr("3.7"), - // }, - // { - // DisplayText: to.Ptr("Python 3.6"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("3.6"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("PYTHON|3.6"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("3.6"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("3.4.0"), - // }, - // }, - // Value: to.Ptr("3.6"), - // }}, - // Value: to.Ptr("3"), - // }, - // { - // DisplayText: to.Ptr("Python 2"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Python 2.7"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("2.7"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("PYTHON|2.7"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("2.7"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("2.7.3"), - // }, - // }, - // Value: to.Ptr("2.7"), - // }}, - // Value: to.Ptr("2"), - // }}, - // PreferredOs: to.Ptr(armappservice.StackPreferredOsLinux), - // Value: to.Ptr("python"), - // }, - // }, - // { - // Name: to.Ptr("php"), - // Type: to.Ptr("Microsoft.Web/webAppStacks"), - // ID: to.Ptr("/providers/Microsoft.Web/webAppStacks/php"), - // Properties: &armappservice.WebAppStackProperties{ - // DisplayText: to.Ptr("PHP"), - // MajorVersions: []*armappservice.WebAppMajorVersion{ - // { - // DisplayText: to.Ptr("PHP 7"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("PHP 7.4"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-28T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("PHP|7.4"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-28T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("7.4"), - // }, - // }, - // Value: to.Ptr("7.4"), - // }, - // { - // DisplayText: to.Ptr("PHP 7.3"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-01-06T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("PHP|7.3"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-01-06T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("7.3"), - // }, - // }, - // Value: to.Ptr("7.3"), - // }, - // { - // DisplayText: to.Ptr("PHP 7.2"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-30T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("PHP|7.2"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-30T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("7.2"), - // }, - // }, - // Value: to.Ptr("7.2"), - // }, - // { - // DisplayText: to.Ptr("PHP 7.1"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("7.1"), - // }, - // }, - // Value: to.Ptr("7.1"), - // }, - // { - // DisplayText: to.Ptr("7.0"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("PHP|7.0"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("7.0"), - // }, - // }, - // Value: to.Ptr("7.0"), - // }}, - // Value: to.Ptr("7"), - // }, - // { - // DisplayText: to.Ptr("PHP 5"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("PHP 5.6"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("PHP|5.6"), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("5.6"), - // }, - // }, - // Value: to.Ptr("5.6"), - // }}, - // Value: to.Ptr("5"), - // }}, - // PreferredOs: to.Ptr(armappservice.StackPreferredOsLinux), - // Value: to.Ptr("php"), - // }, - // }, - // { - // Name: to.Ptr("ruby"), - // Type: to.Ptr("Microsoft.Web/webAppStacks"), - // ID: to.Ptr("/providers/Microsoft.Web/webAppStacks/ruby"), - // Properties: &armappservice.WebAppStackProperties{ - // DisplayText: to.Ptr("Ruby"), - // MajorVersions: []*armappservice.WebAppMajorVersion{ - // { - // DisplayText: to.Ptr("Ruby 2"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Ruby 2.6"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("RUBY|2.6"), - // }, - // }, - // Value: to.Ptr("2.6"), - // }, - // { - // DisplayText: to.Ptr("Ruby 2.6.2"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("RUBY|2.6.2"), - // }, - // }, - // Value: to.Ptr("2.6.2"), - // }, - // { - // DisplayText: to.Ptr("Ruby 2.5"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("RUBY|2.5"), - // }, - // }, - // Value: to.Ptr("2.5"), - // }, - // { - // DisplayText: to.Ptr("Ruby 2.5.5"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("RUBY|2.5.5"), - // }, - // }, - // Value: to.Ptr("2.5.5"), - // }, - // { - // DisplayText: to.Ptr("Ruby 2.4"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("RUBY|2.4"), - // }, - // }, - // Value: to.Ptr("2.4"), - // }, - // { - // DisplayText: to.Ptr("Ruby 2.4.5"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-05-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("RUBY|2.4.5"), - // }, - // }, - // Value: to.Ptr("2.4.5"), - // }, - // { - // DisplayText: to.Ptr("Ruby 2.3"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("RUBY|2.3"), - // }, - // }, - // Value: to.Ptr("2.3"), - // }, - // { - // DisplayText: to.Ptr("Ruby 2.3.8"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("RUBY|2.3.8"), - // }, - // }, - // Value: to.Ptr("2.3.8"), - // }, - // { - // DisplayText: to.Ptr("Ruby 2.3.3"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("RUBY|2.3.3"), - // }, - // }, - // Value: to.Ptr("2.3.3"), - // }}, - // Value: to.Ptr("2"), - // }}, - // PreferredOs: to.Ptr(armappservice.StackPreferredOsLinux), - // Value: to.Ptr("ruby"), - // }, - // }, - // { - // Name: to.Ptr("java"), - // Type: to.Ptr("Microsoft.Web/webAppStacks"), - // ID: to.Ptr("/providers/Microsoft.Web/webAppStacks/java"), - // Properties: &armappservice.WebAppStackProperties{ - // DisplayText: to.Ptr("Java"), - // MajorVersions: []*armappservice.WebAppMajorVersion{ - // { - // DisplayText: to.Ptr("Java 11"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Java 11"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-10-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("11"), - // }, - // IsAutoUpdate: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr(""), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-10-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("11"), - // }, - // IsAutoUpdate: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("11"), - // }, - // }, - // Value: to.Ptr("11.0"), - // }, - // { - // DisplayText: to.Ptr("Java 11.0.7"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-10-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("11"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr(""), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-10-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("11"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("11.0.7"), - // }, - // }, - // Value: to.Ptr("11.0.7"), - // }, - // { - // DisplayText: to.Ptr("Java 11.0.6"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-10-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("11"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr(""), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-10-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("11"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("11.0.6"), - // }, - // }, - // Value: to.Ptr("11.0.6"), - // }, - // { - // DisplayText: to.Ptr("Java 11.0.5"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-10-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("11"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr(""), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-10-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("11"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("11.0.5_ZULU"), - // }, - // }, - // Value: to.Ptr("11.0.5"), - // }, - // { - // DisplayText: to.Ptr("Java 11.0.3"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-10-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("11"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("11.0.3_ZULU"), - // }, - // }, - // Value: to.Ptr("11.0.3"), - // }, - // { - // DisplayText: to.Ptr("Java 11.0.2"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-10-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("11"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("11.0.2_ZULU"), - // }, - // }, - // Value: to.Ptr("11.0.2"), - // }}, - // Value: to.Ptr("11"), - // }, - // { - // DisplayText: to.Ptr("Java 8"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Java 8"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // IsAutoUpdate: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr(""), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // IsAutoUpdate: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.8"), - // }, - // }, - // Value: to.Ptr("8.0"), - // }, - // { - // DisplayText: to.Ptr("Java 1.8.0_252"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr(""), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.8.0_252"), - // }, - // }, - // Value: to.Ptr("8.0.252"), - // }, - // { - // DisplayText: to.Ptr("Java 1.8.0_242"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr(""), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.8.0_242"), - // }, - // }, - // Value: to.Ptr("8.0.242"), - // }, - // { - // DisplayText: to.Ptr("Java 1.8.0_232"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr(""), - // }, - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.8.0_232_ZULU"), - // }, - // }, - // Value: to.Ptr("8.0.232"), - // }, - // { - // DisplayText: to.Ptr("Java 1.8.0_212"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.8.0_212_ZULU"), - // }, - // }, - // Value: to.Ptr("8.0.212"), - // }, - // { - // DisplayText: to.Ptr("Java 1.8.0_202"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.8.0_202_ZULU"), - // }, - // }, - // Value: to.Ptr("8.0.202"), - // }, - // { - // DisplayText: to.Ptr("Java 1.8.0_202 (Oracle)"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.8.0_202"), - // }, - // }, - // Value: to.Ptr("8.0.202 (Oracle)"), - // }, - // { - // DisplayText: to.Ptr("Java 1.8.0_181"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.8.0_181_ZULU"), - // }, - // }, - // Value: to.Ptr("8.0.181"), - // }, - // { - // DisplayText: to.Ptr("Java 1.8.0_181 (Oracle)"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.8.0_181"), - // }, - // }, - // Value: to.Ptr("8.0.181 (Oracle)"), - // }, - // { - // DisplayText: to.Ptr("Java 1.8.0_172"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.8.0_172_ZULU"), - // }, - // }, - // Value: to.Ptr("8.0.172"), - // }, - // { - // DisplayText: to.Ptr("Java 1.8.0_172 (Oracle)"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.8.0_172"), - // }, - // }, - // Value: to.Ptr("8.0.172 (Oracle)"), - // }, - // { - // DisplayText: to.Ptr("Java 1.8.0_144"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.8.0_144"), - // }, - // }, - // Value: to.Ptr("8.0.144"), - // }, - // { - // DisplayText: to.Ptr("Java 1.8.0_111 (Oracle)"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.8.0_111"), - // }, - // }, - // Value: to.Ptr("8.0.111 (Oracle)"), - // }, - // { - // DisplayText: to.Ptr("Java 1.8.0_102"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.8.0_102"), - // }, - // }, - // Value: to.Ptr("8.0.102"), - // }, - // { - // DisplayText: to.Ptr("Java 1.8.0_92"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.8.0_92"), - // }, - // }, - // Value: to.Ptr("8.0.92"), - // }, - // { - // DisplayText: to.Ptr("Java 1.8.0_73 (Oracle)"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.8.0_73"), - // }, - // }, - // Value: to.Ptr("8.0.73 (Oracle)"), - // }, - // { - // DisplayText: to.Ptr("Java 1.8.0_60 (Oracle)"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.8.0_60"), - // }, - // }, - // Value: to.Ptr("8.0.60 (Oracle)"), - // }, - // { - // DisplayText: to.Ptr("Java 1.8.0_25 (Oracle)"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(true), - // SupportedVersion: to.Ptr("8"), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.8.0_25"), - // }, - // }, - // Value: to.Ptr("8.0.25 (Oracle)"), - // }}, - // Value: to.Ptr("8"), - // }, - // { - // DisplayText: to.Ptr("Java 7"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Java 7"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsAutoUpdate: to.Ptr(true), - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.7"), - // }, - // }, - // Value: to.Ptr("7.0"), - // }, - // { - // DisplayText: to.Ptr("Java 1.7.0_262"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.7.0_262_ZULU"), - // }, - // }, - // Value: to.Ptr("7.0.262"), - // }, - // { - // DisplayText: to.Ptr("Java 1.7.0_242"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.7.0_242_ZULU"), - // }, - // }, - // Value: to.Ptr("7.0.242"), - // }, - // { - // DisplayText: to.Ptr("Java 1.7.0_222"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.7.0_222_ZULU"), - // }, - // }, - // Value: to.Ptr("7.0.222"), - // }, - // { - // DisplayText: to.Ptr("Java 1.7.0_191"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // EndOfLifeDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-01T00:00:00+00:00"); return t}()), - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.7.0_191_ZULU"), - // }, - // }, - // Value: to.Ptr("7.0.191"), - // }, - // { - // DisplayText: to.Ptr("Java 1.7.0_80 (Oracle)"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.7.0_80"), - // }, - // }, - // Value: to.Ptr("7.0.80 (Oracle)"), - // }, - // { - // DisplayText: to.Ptr("Java 1.7.0_71 (Oracle)"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.7.0_71"), - // }, - // }, - // Value: to.Ptr("7.0.71 (Oracle)"), - // }, - // { - // DisplayText: to.Ptr("Java 1.7.0_51 (Oracle)"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsRuntimeSettings: &armappservice.WebAppRuntimeSettings{ - // AppInsightsSettings: &armappservice.AppInsightsWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // GitHubActionSettings: &armappservice.GitHubActionWebAppStackSettings{ - // IsSupported: to.Ptr(false), - // }, - // IsDeprecated: to.Ptr(true), - // RemoteDebuggingSupported: to.Ptr(false), - // RuntimeVersion: to.Ptr("1.7.0_51"), - // }, - // }, - // Value: to.Ptr("7.0.51 (Oracle)"), - // }}, - // Value: to.Ptr("7"), - // }}, - // PreferredOs: to.Ptr(armappservice.StackPreferredOsLinux), - // Value: to.Ptr("java"), - // }, - // }, - // { - // Name: to.Ptr("javacontainers"), - // Type: to.Ptr("Microsoft.Web/webAppStacks"), - // ID: to.Ptr("/providers/Microsoft.Web/webAppStacks/javacontainers"), - // Properties: &armappservice.WebAppStackProperties{ - // DisplayText: to.Ptr("Java Containers"), - // MajorVersions: []*armappservice.WebAppMajorVersion{ - // { - // DisplayText: to.Ptr("Java SE (Embedded Web Server)"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Java SE (Embedded Web Server)"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxContainerSettings: &armappservice.LinuxJavaContainerSettings{ - // IsAutoUpdate: to.Ptr(true), - // Java11Runtime: to.Ptr("JAVA|11-java11"), - // Java8Runtime: to.Ptr("JAVA|8-jre8"), - // }, - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // IsAutoUpdate: to.Ptr(true), - // JavaContainer: to.Ptr("JAVA"), - // JavaContainerVersion: to.Ptr("SE"), - // }, - // }, - // Value: to.Ptr("SE"), - // }, - // { - // DisplayText: to.Ptr("Java SE 11.0.7"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxContainerSettings: &armappservice.LinuxJavaContainerSettings{ - // Java11Runtime: to.Ptr("JAVA|11.0.7"), - // }, - // }, - // Value: to.Ptr("11.0.7"), - // }, - // { - // DisplayText: to.Ptr("Java SE 11.0.6"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxContainerSettings: &armappservice.LinuxJavaContainerSettings{ - // Java11Runtime: to.Ptr("JAVA|11.0.6"), - // }, - // }, - // Value: to.Ptr("11.0.6"), - // }, - // { - // DisplayText: to.Ptr("Java SE 11.0.5"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxContainerSettings: &armappservice.LinuxJavaContainerSettings{ - // Java11Runtime: to.Ptr("JAVA|11.0.5"), - // }, - // }, - // Value: to.Ptr("11.0.5"), - // }, - // { - // DisplayText: to.Ptr("Java SE 8u252"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxContainerSettings: &armappservice.LinuxJavaContainerSettings{ - // Java8Runtime: to.Ptr("JAVA|8u252"), - // }, - // }, - // Value: to.Ptr("1.8.252"), - // }, - // { - // DisplayText: to.Ptr("Java SE 8u242"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxContainerSettings: &armappservice.LinuxJavaContainerSettings{ - // Java8Runtime: to.Ptr("JAVA|8u242"), - // }, - // }, - // Value: to.Ptr("1.8.242"), - // }, - // { - // DisplayText: to.Ptr("Java SE 8u232"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxContainerSettings: &armappservice.LinuxJavaContainerSettings{ - // Java8Runtime: to.Ptr("JAVA|8u232"), - // }, - // }, - // Value: to.Ptr("1.8.232"), - // }}, - // Value: to.Ptr("javase"), - // }, - // { - // DisplayText: to.Ptr("JBoss EAP"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("JBoss EAP 7.2"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxContainerSettings: &armappservice.LinuxJavaContainerSettings{ - // IsPreview: to.Ptr(true), - // Java8Runtime: to.Ptr("JBOSSEAP|7.2-java8"), - // }, - // }, - // Value: to.Ptr("7.2"), - // }}, - // Value: to.Ptr("jbosseap"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 9.0"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Tomcat 9.0"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxContainerSettings: &armappservice.LinuxJavaContainerSettings{ - // IsAutoUpdate: to.Ptr(true), - // Java11Runtime: to.Ptr("TOMCAT|9.0-java11"), - // Java8Runtime: to.Ptr("TOMCAT|9.0-jre8"), - // }, - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // IsAutoUpdate: to.Ptr(true), - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("9.0"), - // }, - // }, - // Value: to.Ptr("9.0"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 9.0.37"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxContainerSettings: &armappservice.LinuxJavaContainerSettings{ - // Java11Runtime: to.Ptr("TOMCAT|9.0.37-java11"), - // Java8Runtime: to.Ptr("TOMCAT|9.0.37-java8"), - // }, - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("9.0.37"), - // }, - // }, - // Value: to.Ptr("9.0.37"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 9.0.33"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxContainerSettings: &armappservice.LinuxJavaContainerSettings{ - // Java11Runtime: to.Ptr("TOMCAT|9.0.33-java11"), - // Java8Runtime: to.Ptr("TOMCAT|9.0.33-java8"), - // }, - // }, - // Value: to.Ptr("9.0.33"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 9.0.31"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("9.0.31"), - // }, - // }, - // Value: to.Ptr("9.0.31"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 9.0.27"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("9.0.27"), - // }, - // }, - // Value: to.Ptr("9.0.27"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 9.0.21"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("9.0.21"), - // }, - // }, - // Value: to.Ptr("9.0.21"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 9.0.20"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxContainerSettings: &armappservice.LinuxJavaContainerSettings{ - // Java11Runtime: to.Ptr("TOMCAT|9.0.20-java11"), - // Java8Runtime: to.Ptr("TOMCAT|9.0.20-java8"), - // }, - // }, - // Value: to.Ptr("9.0.20"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 9.0.14"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("9.0.14"), - // }, - // }, - // Value: to.Ptr("9.0.14"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 9.0.12"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("9.0.12"), - // }, - // }, - // Value: to.Ptr("9.0.12"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 9.0.8"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("9.0.8"), - // }, - // }, - // Value: to.Ptr("9.0.8"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 9.0.0"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("9.0.0"), - // }, - // }, - // Value: to.Ptr("9.0.0"), - // }}, - // Value: to.Ptr("tomcat9.0"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 8.5"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Tomcat 8.5"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxContainerSettings: &armappservice.LinuxJavaContainerSettings{ - // IsAutoUpdate: to.Ptr(true), - // Java11Runtime: to.Ptr("TOMCAT|8.5-java11"), - // Java8Runtime: to.Ptr("TOMCAT|8.5-jre8"), - // }, - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // IsAutoUpdate: to.Ptr(true), - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("8.5"), - // }, - // }, - // Value: to.Ptr("8.5"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 8.5.6"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("8.5.6"), - // }, - // }, - // Value: to.Ptr("8.5.6"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 8.5.57"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxContainerSettings: &armappservice.LinuxJavaContainerSettings{ - // Java11Runtime: to.Ptr("TOMCAT|8.5.57-java11"), - // Java8Runtime: to.Ptr("TOMCAT|8.5.57-java8"), - // }, - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("8.5.57"), - // }, - // }, - // Value: to.Ptr("8.5.57"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 8.5.53"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxContainerSettings: &armappservice.LinuxJavaContainerSettings{ - // Java11Runtime: to.Ptr("TOMCAT|8.5.53-java11"), - // Java8Runtime: to.Ptr("TOMCAT|8.5.53-java8"), - // }, - // }, - // Value: to.Ptr("8.5.53"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 8.5.51"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("8.5.51"), - // }, - // }, - // Value: to.Ptr("8.5.51"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 8.5.47"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("8.5.47"), - // }, - // }, - // Value: to.Ptr("8.5.47"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 8.5.42"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("8.5.42"), - // }, - // }, - // Value: to.Ptr("8.5.42"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 8.5.41"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxContainerSettings: &armappservice.LinuxJavaContainerSettings{ - // Java11Runtime: to.Ptr("TOMCAT|8.5.41-java11"), - // Java8Runtime: to.Ptr("TOMCAT|8.5.41-java8"), - // }, - // }, - // Value: to.Ptr("8.5.41"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 8.5.37"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("8.5.37"), - // }, - // }, - // Value: to.Ptr("8.5.37"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 8.5.34"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("8.5.34"), - // }, - // }, - // Value: to.Ptr("8.5.34"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 8.5.31"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("8.5.31"), - // }, - // }, - // Value: to.Ptr("8.5.31"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 8.5.20"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("8.5.20"), - // }, - // }, - // Value: to.Ptr("8.5.20"), - // }}, - // Value: to.Ptr("tomcat8.5"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 8.0"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Tomcat 8.0"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // IsAutoUpdate: to.Ptr(true), - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("8.0"), - // }, - // }, - // Value: to.Ptr("8.0"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 8.0.53"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("8.0.53"), - // }, - // }, - // Value: to.Ptr("8.0.53"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 8.0.46"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("8.0.46"), - // }, - // }, - // Value: to.Ptr("8.0.46"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 8.0.23"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("8.0.23"), - // }, - // }, - // Value: to.Ptr("8.0.23"), - // }}, - // Value: to.Ptr("tomcat8.0"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 7.0"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Tomcat 7.0"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // IsAutoUpdate: to.Ptr(true), - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("7.0"), - // }, - // }, - // Value: to.Ptr("7.0"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 7.0.94"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("7.0.94"), - // }, - // }, - // Value: to.Ptr("7.0.94"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 7.0.81"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("7.0.81"), - // }, - // }, - // Value: to.Ptr("7.0.81"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 7.0.62"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("7.0.62"), - // }, - // }, - // Value: to.Ptr("7.0.62"), - // }, - // { - // DisplayText: to.Ptr("Tomcat 7.0.50"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // JavaContainer: to.Ptr("TOMCAT"), - // JavaContainerVersion: to.Ptr("7.0.50"), - // }, - // }, - // Value: to.Ptr("7.0.50"), - // }}, - // Value: to.Ptr("tomcat7.0"), - // }, - // { - // DisplayText: to.Ptr("Jetty 9.3"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Jetty 9.3"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // IsAutoUpdate: to.Ptr(true), - // IsDeprecated: to.Ptr(true), - // JavaContainer: to.Ptr("JETTY"), - // JavaContainerVersion: to.Ptr("9.3"), - // }, - // }, - // Value: to.Ptr("9.3"), - // }, - // { - // DisplayText: to.Ptr("Jetty 9.3.25"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // IsDeprecated: to.Ptr(true), - // JavaContainer: to.Ptr("JETTY"), - // JavaContainerVersion: to.Ptr("9.3.25"), - // }, - // }, - // Value: to.Ptr("9.3.25"), - // }, - // { - // DisplayText: to.Ptr("Jetty 9.3.13"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // IsDeprecated: to.Ptr(true), - // JavaContainer: to.Ptr("JETTY"), - // JavaContainerVersion: to.Ptr("9.3.13"), - // }, - // }, - // Value: to.Ptr("9.3.13"), - // }}, - // Value: to.Ptr("jetty9.3"), - // }, - // { - // DisplayText: to.Ptr("Jetty 9.1"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("Jetty 9.1"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // IsAutoUpdate: to.Ptr(true), - // IsDeprecated: to.Ptr(true), - // JavaContainer: to.Ptr("JETTY"), - // JavaContainerVersion: to.Ptr("9.1"), - // }, - // }, - // Value: to.Ptr("9.1"), - // }, - // { - // DisplayText: to.Ptr("Jetty 9.1.0"), - // StackSettings: &armappservice.WebAppRuntimes{ - // WindowsContainerSettings: &armappservice.WindowsJavaContainerSettings{ - // IsDeprecated: to.Ptr(true), - // JavaContainer: to.Ptr("JETTY"), - // JavaContainerVersion: to.Ptr("9.1.0"), - // }, - // }, - // Value: to.Ptr("9.1.0"), - // }}, - // Value: to.Ptr("jetty9.1"), - // }, - // { - // DisplayText: to.Ptr("WildFly 14"), - // MinorVersions: []*armappservice.WebAppMinorVersion{ - // { - // DisplayText: to.Ptr("WildFly 14"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxContainerSettings: &armappservice.LinuxJavaContainerSettings{ - // IsAutoUpdate: to.Ptr(true), - // IsDeprecated: to.Ptr(true), - // Java8Runtime: to.Ptr("WILDFLY|14-jre8"), - // }, - // }, - // Value: to.Ptr("14"), - // }, - // { - // DisplayText: to.Ptr("WildFly 14.0.1"), - // StackSettings: &armappservice.WebAppRuntimes{ - // LinuxContainerSettings: &armappservice.LinuxJavaContainerSettings{ - // IsDeprecated: to.Ptr(true), - // Java8Runtime: to.Ptr("WILDFLY|14.0.1-java8"), - // }, - // }, - // Value: to.Ptr("14.0.1"), - // }}, - // Value: to.Ptr("wildfly14"), - // }}, - // Value: to.Ptr("javacontainers"), - // }, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/appservice/armappservice/recommendations_client.go b/sdk/resourcemanager/appservice/armappservice/recommendations_client.go index 34e989de8ab6..4ed5bd642653 100644 --- a/sdk/resourcemanager/appservice/armappservice/recommendations_client.go +++ b/sdk/resourcemanager/appservice/armappservice/recommendations_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappservice @@ -34,7 +33,7 @@ type RecommendationsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewRecommendationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RecommendationsClient, error) { - cl, err := arm.NewClient(moduleName+".RecommendationsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,22 +47,28 @@ func NewRecommendationsClient(subscriptionID string, credential azcore.TokenCred // DisableAllForHostingEnvironment - Description for Disable all recommendations for an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - environmentName - Name of the app. // - options - RecommendationsClientDisableAllForHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.DisableAllForHostingEnvironment // method. func (client *RecommendationsClient) DisableAllForHostingEnvironment(ctx context.Context, resourceGroupName string, environmentName string, hostingEnvironmentName string, options *RecommendationsClientDisableAllForHostingEnvironmentOptions) (RecommendationsClientDisableAllForHostingEnvironmentResponse, error) { + var err error + const operationName = "RecommendationsClient.DisableAllForHostingEnvironment" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.disableAllForHostingEnvironmentCreateRequest(ctx, resourceGroupName, environmentName, hostingEnvironmentName, options) if err != nil { return RecommendationsClientDisableAllForHostingEnvironmentResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return RecommendationsClientDisableAllForHostingEnvironmentResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return RecommendationsClientDisableAllForHostingEnvironmentResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return RecommendationsClientDisableAllForHostingEnvironmentResponse{}, err } return RecommendationsClientDisableAllForHostingEnvironmentResponse{}, nil } @@ -89,7 +94,7 @@ func (client *RecommendationsClient) disableAllForHostingEnvironmentCreateReques } reqQP := req.Raw().URL.Query() reqQP.Set("environmentName", environmentName) - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -98,22 +103,28 @@ func (client *RecommendationsClient) disableAllForHostingEnvironmentCreateReques // DisableAllForWebApp - Description for Disable all recommendations for an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - siteName - Name of the app. // - options - RecommendationsClientDisableAllForWebAppOptions contains the optional parameters for the RecommendationsClient.DisableAllForWebApp // method. func (client *RecommendationsClient) DisableAllForWebApp(ctx context.Context, resourceGroupName string, siteName string, options *RecommendationsClientDisableAllForWebAppOptions) (RecommendationsClientDisableAllForWebAppResponse, error) { + var err error + const operationName = "RecommendationsClient.DisableAllForWebApp" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.disableAllForWebAppCreateRequest(ctx, resourceGroupName, siteName, options) if err != nil { return RecommendationsClientDisableAllForWebAppResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return RecommendationsClientDisableAllForWebAppResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return RecommendationsClientDisableAllForWebAppResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return RecommendationsClientDisableAllForWebAppResponse{}, err } return RecommendationsClientDisableAllForWebAppResponse{}, nil } @@ -138,7 +149,7 @@ func (client *RecommendationsClient) disableAllForWebAppCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -147,23 +158,29 @@ func (client *RecommendationsClient) disableAllForWebAppCreateRequest(ctx contex // DisableRecommendationForHostingEnvironment - Description for Disables the specific rule for a web site permanently. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - environmentName - Site name // - name - Rule name // - options - RecommendationsClientDisableRecommendationForHostingEnvironmentOptions contains the optional parameters for the // RecommendationsClient.DisableRecommendationForHostingEnvironment method. func (client *RecommendationsClient) DisableRecommendationForHostingEnvironment(ctx context.Context, resourceGroupName string, environmentName string, name string, hostingEnvironmentName string, options *RecommendationsClientDisableRecommendationForHostingEnvironmentOptions) (RecommendationsClientDisableRecommendationForHostingEnvironmentResponse, error) { + var err error + const operationName = "RecommendationsClient.DisableRecommendationForHostingEnvironment" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.disableRecommendationForHostingEnvironmentCreateRequest(ctx, resourceGroupName, environmentName, name, hostingEnvironmentName, options) if err != nil { return RecommendationsClientDisableRecommendationForHostingEnvironmentResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return RecommendationsClientDisableRecommendationForHostingEnvironmentResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RecommendationsClientDisableRecommendationForHostingEnvironmentResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RecommendationsClientDisableRecommendationForHostingEnvironmentResponse{}, err } return RecommendationsClientDisableRecommendationForHostingEnvironmentResponse{}, nil } @@ -193,7 +210,7 @@ func (client *RecommendationsClient) disableRecommendationForHostingEnvironmentC } reqQP := req.Raw().URL.Query() reqQP.Set("environmentName", environmentName) - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -202,23 +219,29 @@ func (client *RecommendationsClient) disableRecommendationForHostingEnvironmentC // DisableRecommendationForSite - Description for Disables the specific rule for a web site permanently. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - siteName - Site name // - name - Rule name // - options - RecommendationsClientDisableRecommendationForSiteOptions contains the optional parameters for the RecommendationsClient.DisableRecommendationForSite // method. func (client *RecommendationsClient) DisableRecommendationForSite(ctx context.Context, resourceGroupName string, siteName string, name string, options *RecommendationsClientDisableRecommendationForSiteOptions) (RecommendationsClientDisableRecommendationForSiteResponse, error) { + var err error + const operationName = "RecommendationsClient.DisableRecommendationForSite" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.disableRecommendationForSiteCreateRequest(ctx, resourceGroupName, siteName, name, options) if err != nil { return RecommendationsClientDisableRecommendationForSiteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return RecommendationsClientDisableRecommendationForSiteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RecommendationsClientDisableRecommendationForSiteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RecommendationsClientDisableRecommendationForSiteResponse{}, err } return RecommendationsClientDisableRecommendationForSiteResponse{}, nil } @@ -247,7 +270,7 @@ func (client *RecommendationsClient) disableRecommendationForSiteCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -257,21 +280,27 @@ func (client *RecommendationsClient) disableRecommendationForSiteCreateRequest(c // in the future. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - name - Rule name // - options - RecommendationsClientDisableRecommendationForSubscriptionOptions contains the optional parameters for the RecommendationsClient.DisableRecommendationForSubscription // method. func (client *RecommendationsClient) DisableRecommendationForSubscription(ctx context.Context, name string, options *RecommendationsClientDisableRecommendationForSubscriptionOptions) (RecommendationsClientDisableRecommendationForSubscriptionResponse, error) { + var err error + const operationName = "RecommendationsClient.DisableRecommendationForSubscription" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.disableRecommendationForSubscriptionCreateRequest(ctx, name, options) if err != nil { return RecommendationsClientDisableRecommendationForSubscriptionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return RecommendationsClientDisableRecommendationForSubscriptionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RecommendationsClientDisableRecommendationForSubscriptionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RecommendationsClientDisableRecommendationForSubscriptionResponse{}, err } return RecommendationsClientDisableRecommendationForSubscriptionResponse{}, nil } @@ -292,7 +321,7 @@ func (client *RecommendationsClient) disableRecommendationForSubscriptionCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -301,25 +330,32 @@ func (client *RecommendationsClient) disableRecommendationForSubscriptionCreateR // GetRuleDetailsByHostingEnvironment - Description for Get a recommendation rule for an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - hostingEnvironmentName - Name of the hosting environment. // - name - Name of the recommendation. // - options - RecommendationsClientGetRuleDetailsByHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.GetRuleDetailsByHostingEnvironment // method. func (client *RecommendationsClient) GetRuleDetailsByHostingEnvironment(ctx context.Context, resourceGroupName string, hostingEnvironmentName string, name string, options *RecommendationsClientGetRuleDetailsByHostingEnvironmentOptions) (RecommendationsClientGetRuleDetailsByHostingEnvironmentResponse, error) { + var err error + const operationName = "RecommendationsClient.GetRuleDetailsByHostingEnvironment" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getRuleDetailsByHostingEnvironmentCreateRequest(ctx, resourceGroupName, hostingEnvironmentName, name, options) if err != nil { return RecommendationsClientGetRuleDetailsByHostingEnvironmentResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return RecommendationsClientGetRuleDetailsByHostingEnvironmentResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RecommendationsClientGetRuleDetailsByHostingEnvironmentResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RecommendationsClientGetRuleDetailsByHostingEnvironmentResponse{}, err } - return client.getRuleDetailsByHostingEnvironmentHandleResponse(resp) + resp, err := client.getRuleDetailsByHostingEnvironmentHandleResponse(httpResp) + return resp, err } // getRuleDetailsByHostingEnvironmentCreateRequest creates the GetRuleDetailsByHostingEnvironment request. @@ -352,7 +388,7 @@ func (client *RecommendationsClient) getRuleDetailsByHostingEnvironmentCreateReq if options != nil && options.RecommendationID != nil { reqQP.Set("recommendationId", *options.RecommendationID) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -370,25 +406,32 @@ func (client *RecommendationsClient) getRuleDetailsByHostingEnvironmentHandleRes // GetRuleDetailsByWebApp - Description for Get a recommendation rule for an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - siteName - Name of the app. // - name - Name of the recommendation. // - options - RecommendationsClientGetRuleDetailsByWebAppOptions contains the optional parameters for the RecommendationsClient.GetRuleDetailsByWebApp // method. func (client *RecommendationsClient) GetRuleDetailsByWebApp(ctx context.Context, resourceGroupName string, siteName string, name string, options *RecommendationsClientGetRuleDetailsByWebAppOptions) (RecommendationsClientGetRuleDetailsByWebAppResponse, error) { + var err error + const operationName = "RecommendationsClient.GetRuleDetailsByWebApp" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getRuleDetailsByWebAppCreateRequest(ctx, resourceGroupName, siteName, name, options) if err != nil { return RecommendationsClientGetRuleDetailsByWebAppResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return RecommendationsClientGetRuleDetailsByWebAppResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RecommendationsClientGetRuleDetailsByWebAppResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return RecommendationsClientGetRuleDetailsByWebAppResponse{}, err } - return client.getRuleDetailsByWebAppHandleResponse(resp) + resp, err := client.getRuleDetailsByWebAppHandleResponse(httpResp) + return resp, err } // getRuleDetailsByWebAppCreateRequest creates the GetRuleDetailsByWebApp request. @@ -421,7 +464,7 @@ func (client *RecommendationsClient) getRuleDetailsByWebAppCreateRequest(ctx con if options != nil && options.RecommendationID != nil { reqQP.Set("recommendationId", *options.RecommendationID) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -438,7 +481,7 @@ func (client *RecommendationsClient) getRuleDetailsByWebAppHandleResponse(resp * // NewListPager - Description for List all recommendations for a subscription. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - options - RecommendationsClientListOptions contains the optional parameters for the RecommendationsClient.NewListPager // method. func (client *RecommendationsClient) NewListPager(options *RecommendationsClientListOptions) *runtime.Pager[RecommendationsClientListResponse] { @@ -447,25 +490,20 @@ func (client *RecommendationsClient) NewListPager(options *RecommendationsClient return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *RecommendationsClientListResponse) (RecommendationsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RecommendationsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return RecommendationsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return RecommendationsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RecommendationsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -484,7 +522,7 @@ func (client *RecommendationsClient) listCreateRequest(ctx context.Context, opti if options != nil && options.Featured != nil { reqQP.Set("featured", strconv.FormatBool(*options.Featured)) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() unencodedParams := []string{req.Raw().URL.RawQuery} if options != nil && options.Filter != nil { @@ -507,7 +545,7 @@ func (client *RecommendationsClient) listHandleResponse(resp *http.Response) (Re // NewListHistoryForHostingEnvironmentPager - Description for Get past recommendations for an app, optionally specified by // the time range. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - hostingEnvironmentName - Name of the hosting environment. // - options - RecommendationsClientListHistoryForHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.NewListHistoryForHostingEnvironmentPager @@ -518,25 +556,20 @@ func (client *RecommendationsClient) NewListHistoryForHostingEnvironmentPager(re return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *RecommendationsClientListHistoryForHostingEnvironmentResponse) (RecommendationsClientListHistoryForHostingEnvironmentResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listHistoryForHostingEnvironmentCreateRequest(ctx, resourceGroupName, hostingEnvironmentName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RecommendationsClient.NewListHistoryForHostingEnvironmentPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listHistoryForHostingEnvironmentCreateRequest(ctx, resourceGroupName, hostingEnvironmentName, options) + }, nil) if err != nil { return RecommendationsClientListHistoryForHostingEnvironmentResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return RecommendationsClientListHistoryForHostingEnvironmentResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RecommendationsClientListHistoryForHostingEnvironmentResponse{}, runtime.NewResponseError(resp) - } return client.listHistoryForHostingEnvironmentHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -563,7 +596,7 @@ func (client *RecommendationsClient) listHistoryForHostingEnvironmentCreateReque if options != nil && options.ExpiredOnly != nil { reqQP.Set("expiredOnly", strconv.FormatBool(*options.ExpiredOnly)) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() unencodedParams := []string{req.Raw().URL.RawQuery} if options != nil && options.Filter != nil { @@ -585,7 +618,7 @@ func (client *RecommendationsClient) listHistoryForHostingEnvironmentHandleRespo // NewListHistoryForWebAppPager - Description for Get past recommendations for an app, optionally specified by the time range. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - siteName - Name of the app. // - options - RecommendationsClientListHistoryForWebAppOptions contains the optional parameters for the RecommendationsClient.NewListHistoryForWebAppPager @@ -596,25 +629,20 @@ func (client *RecommendationsClient) NewListHistoryForWebAppPager(resourceGroupN return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *RecommendationsClientListHistoryForWebAppResponse) (RecommendationsClientListHistoryForWebAppResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listHistoryForWebAppCreateRequest(ctx, resourceGroupName, siteName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RecommendationsClient.NewListHistoryForWebAppPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listHistoryForWebAppCreateRequest(ctx, resourceGroupName, siteName, options) + }, nil) if err != nil { return RecommendationsClientListHistoryForWebAppResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return RecommendationsClientListHistoryForWebAppResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RecommendationsClientListHistoryForWebAppResponse{}, runtime.NewResponseError(resp) - } return client.listHistoryForWebAppHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -641,7 +669,7 @@ func (client *RecommendationsClient) listHistoryForWebAppCreateRequest(ctx conte if options != nil && options.ExpiredOnly != nil { reqQP.Set("expiredOnly", strconv.FormatBool(*options.ExpiredOnly)) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() unencodedParams := []string{req.Raw().URL.RawQuery} if options != nil && options.Filter != nil { @@ -663,7 +691,7 @@ func (client *RecommendationsClient) listHistoryForWebAppHandleResponse(resp *ht // NewListRecommendedRulesForHostingEnvironmentPager - Description for Get all recommendations for a hosting environment. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - hostingEnvironmentName - Name of the app. // - options - RecommendationsClientListRecommendedRulesForHostingEnvironmentOptions contains the optional parameters for the @@ -674,25 +702,20 @@ func (client *RecommendationsClient) NewListRecommendedRulesForHostingEnvironmen return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse) (RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listRecommendedRulesForHostingEnvironmentCreateRequest(ctx, resourceGroupName, hostingEnvironmentName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RecommendationsClient.NewListRecommendedRulesForHostingEnvironmentPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listRecommendedRulesForHostingEnvironmentCreateRequest(ctx, resourceGroupName, hostingEnvironmentName, options) + }, nil) if err != nil { return RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse{}, runtime.NewResponseError(resp) - } return client.listRecommendedRulesForHostingEnvironmentHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -719,7 +742,7 @@ func (client *RecommendationsClient) listRecommendedRulesForHostingEnvironmentCr if options != nil && options.Featured != nil { reqQP.Set("featured", strconv.FormatBool(*options.Featured)) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() unencodedParams := []string{req.Raw().URL.RawQuery} if options != nil && options.Filter != nil { @@ -741,7 +764,7 @@ func (client *RecommendationsClient) listRecommendedRulesForHostingEnvironmentHa // NewListRecommendedRulesForWebAppPager - Description for Get all recommendations for an app. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - siteName - Name of the app. // - options - RecommendationsClientListRecommendedRulesForWebAppOptions contains the optional parameters for the RecommendationsClient.NewListRecommendedRulesForWebAppPager @@ -752,25 +775,20 @@ func (client *RecommendationsClient) NewListRecommendedRulesForWebAppPager(resou return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *RecommendationsClientListRecommendedRulesForWebAppResponse) (RecommendationsClientListRecommendedRulesForWebAppResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listRecommendedRulesForWebAppCreateRequest(ctx, resourceGroupName, siteName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "RecommendationsClient.NewListRecommendedRulesForWebAppPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listRecommendedRulesForWebAppCreateRequest(ctx, resourceGroupName, siteName, options) + }, nil) if err != nil { return RecommendationsClientListRecommendedRulesForWebAppResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return RecommendationsClientListRecommendedRulesForWebAppResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return RecommendationsClientListRecommendedRulesForWebAppResponse{}, runtime.NewResponseError(resp) - } return client.listRecommendedRulesForWebAppHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -797,7 +815,7 @@ func (client *RecommendationsClient) listRecommendedRulesForWebAppCreateRequest( if options != nil && options.Featured != nil { reqQP.Set("featured", strconv.FormatBool(*options.Featured)) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() unencodedParams := []string{req.Raw().URL.RawQuery} if options != nil && options.Filter != nil { @@ -820,20 +838,26 @@ func (client *RecommendationsClient) listRecommendedRulesForWebAppHandleResponse // ResetAllFilters - Description for Reset all recommendation opt-out settings for a subscription. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - options - RecommendationsClientResetAllFiltersOptions contains the optional parameters for the RecommendationsClient.ResetAllFilters // method. func (client *RecommendationsClient) ResetAllFilters(ctx context.Context, options *RecommendationsClientResetAllFiltersOptions) (RecommendationsClientResetAllFiltersResponse, error) { + var err error + const operationName = "RecommendationsClient.ResetAllFilters" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.resetAllFiltersCreateRequest(ctx, options) if err != nil { return RecommendationsClientResetAllFiltersResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return RecommendationsClientResetAllFiltersResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return RecommendationsClientResetAllFiltersResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return RecommendationsClientResetAllFiltersResponse{}, err } return RecommendationsClientResetAllFiltersResponse{}, nil } @@ -850,7 +874,7 @@ func (client *RecommendationsClient) resetAllFiltersCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -859,22 +883,28 @@ func (client *RecommendationsClient) resetAllFiltersCreateRequest(ctx context.Co // ResetAllFiltersForHostingEnvironment - Description for Reset all recommendation opt-out settings for an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - environmentName - Name of the app. // - options - RecommendationsClientResetAllFiltersForHostingEnvironmentOptions contains the optional parameters for the RecommendationsClient.ResetAllFiltersForHostingEnvironment // method. func (client *RecommendationsClient) ResetAllFiltersForHostingEnvironment(ctx context.Context, resourceGroupName string, environmentName string, hostingEnvironmentName string, options *RecommendationsClientResetAllFiltersForHostingEnvironmentOptions) (RecommendationsClientResetAllFiltersForHostingEnvironmentResponse, error) { + var err error + const operationName = "RecommendationsClient.ResetAllFiltersForHostingEnvironment" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.resetAllFiltersForHostingEnvironmentCreateRequest(ctx, resourceGroupName, environmentName, hostingEnvironmentName, options) if err != nil { return RecommendationsClientResetAllFiltersForHostingEnvironmentResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return RecommendationsClientResetAllFiltersForHostingEnvironmentResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return RecommendationsClientResetAllFiltersForHostingEnvironmentResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return RecommendationsClientResetAllFiltersForHostingEnvironmentResponse{}, err } return RecommendationsClientResetAllFiltersForHostingEnvironmentResponse{}, nil } @@ -900,7 +930,7 @@ func (client *RecommendationsClient) resetAllFiltersForHostingEnvironmentCreateR } reqQP := req.Raw().URL.Query() reqQP.Set("environmentName", environmentName) - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -909,22 +939,28 @@ func (client *RecommendationsClient) resetAllFiltersForHostingEnvironmentCreateR // ResetAllFiltersForWebApp - Description for Reset all recommendation opt-out settings for an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - siteName - Name of the app. // - options - RecommendationsClientResetAllFiltersForWebAppOptions contains the optional parameters for the RecommendationsClient.ResetAllFiltersForWebApp // method. func (client *RecommendationsClient) ResetAllFiltersForWebApp(ctx context.Context, resourceGroupName string, siteName string, options *RecommendationsClientResetAllFiltersForWebAppOptions) (RecommendationsClientResetAllFiltersForWebAppResponse, error) { + var err error + const operationName = "RecommendationsClient.ResetAllFiltersForWebApp" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.resetAllFiltersForWebAppCreateRequest(ctx, resourceGroupName, siteName, options) if err != nil { return RecommendationsClientResetAllFiltersForWebAppResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return RecommendationsClientResetAllFiltersForWebAppResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return RecommendationsClientResetAllFiltersForWebAppResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return RecommendationsClientResetAllFiltersForWebAppResponse{}, err } return RecommendationsClientResetAllFiltersForWebAppResponse{}, nil } @@ -949,7 +985,7 @@ func (client *RecommendationsClient) resetAllFiltersForWebAppCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/resourcehealthmetadata_client.go b/sdk/resourcemanager/appservice/armappservice/resourcehealthmetadata_client.go index a5905de5d873..4e3290e2eb7a 100644 --- a/sdk/resourcemanager/appservice/armappservice/resourcehealthmetadata_client.go +++ b/sdk/resourcemanager/appservice/armappservice/resourcehealthmetadata_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappservice @@ -33,7 +32,7 @@ type ResourceHealthMetadataClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewResourceHealthMetadataClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourceHealthMetadataClient, error) { - cl, err := arm.NewClient(moduleName+".ResourceHealthMetadataClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,24 +46,31 @@ func NewResourceHealthMetadataClient(subscriptionID string, credential azcore.To // GetBySite - Description for Gets the category of ResourceHealthMetadata to use for the given site // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app // - options - ResourceHealthMetadataClientGetBySiteOptions contains the optional parameters for the ResourceHealthMetadataClient.GetBySite // method. func (client *ResourceHealthMetadataClient) GetBySite(ctx context.Context, resourceGroupName string, name string, options *ResourceHealthMetadataClientGetBySiteOptions) (ResourceHealthMetadataClientGetBySiteResponse, error) { + var err error + const operationName = "ResourceHealthMetadataClient.GetBySite" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getBySiteCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return ResourceHealthMetadataClientGetBySiteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ResourceHealthMetadataClientGetBySiteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceHealthMetadataClientGetBySiteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceHealthMetadataClientGetBySiteResponse{}, err } - return client.getBySiteHandleResponse(resp) + resp, err := client.getBySiteHandleResponse(httpResp) + return resp, err } // getBySiteCreateRequest creates the GetBySite request. @@ -87,7 +93,7 @@ func (client *ResourceHealthMetadataClient) getBySiteCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -105,25 +111,32 @@ func (client *ResourceHealthMetadataClient) getBySiteHandleResponse(resp *http.R // GetBySiteSlot - Description for Gets the category of ResourceHealthMetadata to use for the given site // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app // - slot - Name of web app slot. If not specified then will default to production slot. // - options - ResourceHealthMetadataClientGetBySiteSlotOptions contains the optional parameters for the ResourceHealthMetadataClient.GetBySiteSlot // method. func (client *ResourceHealthMetadataClient) GetBySiteSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *ResourceHealthMetadataClientGetBySiteSlotOptions) (ResourceHealthMetadataClientGetBySiteSlotResponse, error) { + var err error + const operationName = "ResourceHealthMetadataClient.GetBySiteSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getBySiteSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return ResourceHealthMetadataClientGetBySiteSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ResourceHealthMetadataClientGetBySiteSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceHealthMetadataClientGetBySiteSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceHealthMetadataClientGetBySiteSlotResponse{}, err } - return client.getBySiteSlotHandleResponse(resp) + resp, err := client.getBySiteSlotHandleResponse(httpResp) + return resp, err } // getBySiteSlotCreateRequest creates the GetBySiteSlot request. @@ -150,7 +163,7 @@ func (client *ResourceHealthMetadataClient) getBySiteSlotCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -167,7 +180,7 @@ func (client *ResourceHealthMetadataClient) getBySiteSlotHandleResponse(resp *ht // NewListPager - Description for List all ResourceHealthMetadata for all sites in the subscription. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - options - ResourceHealthMetadataClientListOptions contains the optional parameters for the ResourceHealthMetadataClient.NewListPager // method. func (client *ResourceHealthMetadataClient) NewListPager(options *ResourceHealthMetadataClientListOptions) *runtime.Pager[ResourceHealthMetadataClientListResponse] { @@ -176,25 +189,20 @@ func (client *ResourceHealthMetadataClient) NewListPager(options *ResourceHealth return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ResourceHealthMetadataClientListResponse) (ResourceHealthMetadataClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ResourceHealthMetadataClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceHealthMetadataClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return ResourceHealthMetadataClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceHealthMetadataClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -210,7 +218,7 @@ func (client *ResourceHealthMetadataClient) listCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -228,7 +236,7 @@ func (client *ResourceHealthMetadataClient) listHandleResponse(resp *http.Respon // NewListByResourceGroupPager - Description for List all ResourceHealthMetadata for all sites in the resource group in the // subscription. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - options - ResourceHealthMetadataClientListByResourceGroupOptions contains the optional parameters for the ResourceHealthMetadataClient.NewListByResourceGroupPager // method. @@ -238,25 +246,20 @@ func (client *ResourceHealthMetadataClient) NewListByResourceGroupPager(resource return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ResourceHealthMetadataClientListByResourceGroupResponse) (ResourceHealthMetadataClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return ResourceHealthMetadataClientListByResourceGroupResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceHealthMetadataClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return ResourceHealthMetadataClientListByResourceGroupResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceHealthMetadataClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -276,7 +279,7 @@ func (client *ResourceHealthMetadataClient) listByResourceGroupCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -293,7 +296,7 @@ func (client *ResourceHealthMetadataClient) listByResourceGroupHandleResponse(re // NewListBySitePager - Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - options - ResourceHealthMetadataClientListBySiteOptions contains the optional parameters for the ResourceHealthMetadataClient.NewListBySitePager @@ -304,25 +307,20 @@ func (client *ResourceHealthMetadataClient) NewListBySitePager(resourceGroupName return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ResourceHealthMetadataClientListBySiteResponse) (ResourceHealthMetadataClientListBySiteResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySiteCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceHealthMetadataClient.NewListBySitePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBySiteCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return ResourceHealthMetadataClientListBySiteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ResourceHealthMetadataClientListBySiteResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceHealthMetadataClientListBySiteResponse{}, runtime.NewResponseError(resp) - } return client.listBySiteHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -346,7 +344,7 @@ func (client *ResourceHealthMetadataClient) listBySiteCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -363,7 +361,7 @@ func (client *ResourceHealthMetadataClient) listBySiteHandleResponse(resp *http. // NewListBySiteSlotPager - Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - slot - Name of web app slot. If not specified then will default to production slot. @@ -375,25 +373,20 @@ func (client *ResourceHealthMetadataClient) NewListBySiteSlotPager(resourceGroup return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *ResourceHealthMetadataClientListBySiteSlotResponse) (ResourceHealthMetadataClientListBySiteSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBySiteSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ResourceHealthMetadataClient.NewListBySiteSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBySiteSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) if err != nil { return ResourceHealthMetadataClientListBySiteSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ResourceHealthMetadataClientListBySiteSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceHealthMetadataClientListBySiteSlotResponse{}, runtime.NewResponseError(resp) - } return client.listBySiteSlotHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -421,7 +414,7 @@ func (client *ResourceHealthMetadataClient) listBySiteSlotCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/resourcehealthmetadata_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/resourcehealthmetadata_client_example_test.go deleted file mode 100644 index 28a1ed3395b3..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/resourcehealthmetadata_client_example_test.go +++ /dev/null @@ -1,158 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListResourceHealthMetadataBySubscription.json -func ExampleResourceHealthMetadataClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewResourceHealthMetadataClient().NewListPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ResourceHealthMetadataCollection = armappservice.ResourceHealthMetadataCollection{ - // Value: []*armappservice.ResourceHealthMetadata{ - // { - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Web/sites/resourceHealthMetadata"), - // ID: to.Ptr("/subscriptions/4adb32ad-8327-4cbb-b775-b84b4465bb38/resourceGroups/Default-Web-NorthCentralUS/providers/Microsoft.Web/sites/newsiteinnewASE-NCUS/resourceHealthMetadata/default"), - // Properties: &armappservice.ResourceHealthMetadataProperties{ - // Category: to.Ptr("Shared"), - // SignalAvailability: to.Ptr(true), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListResourceHealthMetadataByResourceGroup.json -func ExampleResourceHealthMetadataClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewResourceHealthMetadataClient().NewListByResourceGroupPager("Default-Web-NorthCentralUS", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ResourceHealthMetadataCollection = armappservice.ResourceHealthMetadataCollection{ - // Value: []*armappservice.ResourceHealthMetadata{ - // { - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Web/sites/resourceHealthMetadata"), - // ID: to.Ptr("/subscriptions/4adb32ad-8327-4cbb-b775-b84b4465bb38/resourceGroups/Default-Web-NorthCentralUS/providers/Microsoft.Web/sites/newsiteinnewASE-NCUS/resourceHealthMetadata/default"), - // Properties: &armappservice.ResourceHealthMetadataProperties{ - // Category: to.Ptr("Shared"), - // SignalAvailability: to.Ptr(true), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListResourceHealthMetadataBySite.json -func ExampleResourceHealthMetadataClient_NewListBySitePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewResourceHealthMetadataClient().NewListBySitePager("Default-Web-NorthCentralUS", "newsiteinnewASE-NCUS", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ResourceHealthMetadataCollection = armappservice.ResourceHealthMetadataCollection{ - // Value: []*armappservice.ResourceHealthMetadata{ - // { - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Web/sites/resourceHealthMetadata"), - // ID: to.Ptr("/subscriptions/4adb32ad-8327-4cbb-b775-b84b4465bb38/resourceGroups/Default-Web-NorthCentralUS/providers/Microsoft.Web/sites/newsiteinnewASE-NCUS/resourceHealthMetadata/default"), - // Properties: &armappservice.ResourceHealthMetadataProperties{ - // Category: to.Ptr("Shared"), - // SignalAvailability: to.Ptr(true), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetResourceHealthMetadataBySite.json -func ExampleResourceHealthMetadataClient_GetBySite() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewResourceHealthMetadataClient().GetBySite(ctx, "Default-Web-NorthCentralUS", "newsiteinnewASE-NCUS", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ResourceHealthMetadata = armappservice.ResourceHealthMetadata{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Web/sites/resourceHealthMetadata"), - // ID: to.Ptr("/subscriptions/4adb32ad-8327-4cbb-b775-b84b4465bb38/resourceGroups/Default-Web-NorthCentralUS/providers/Microsoft.Web/sites/newsiteinnewASE-NCUS/resourceHealthMetadata/default"), - // Properties: &armappservice.ResourceHealthMetadataProperties{ - // Category: to.Ptr("Shared"), - // SignalAvailability: to.Ptr(true), - // }, - // } -} diff --git a/sdk/resourcemanager/appservice/armappservice/response_types.go b/sdk/resourcemanager/appservice/armappservice/response_types.go index fa12c50aeb71..b06ed7feb35b 100644 --- a/sdk/resourcemanager/appservice/armappservice/response_types.go +++ b/sdk/resourcemanager/appservice/armappservice/response_types.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappservice @@ -16,11 +15,13 @@ import ( // CertificateOrdersClientCreateOrUpdateCertificateResponse contains the response from method CertificateOrdersClient.BeginCreateOrUpdateCertificate. type CertificateOrdersClientCreateOrUpdateCertificateResponse struct { + // Key Vault container ARM resource for a certificate that is purchased through Azure. CertificateResource } // CertificateOrdersClientCreateOrUpdateResponse contains the response from method CertificateOrdersClient.BeginCreateOrUpdate. type CertificateOrdersClientCreateOrUpdateResponse struct { + // SSL certificate purchase order. CertificateOrder } @@ -36,26 +37,31 @@ type CertificateOrdersClientDeleteResponse struct { // CertificateOrdersClientGetCertificateResponse contains the response from method CertificateOrdersClient.GetCertificate. type CertificateOrdersClientGetCertificateResponse struct { + // Key Vault container ARM resource for a certificate that is purchased through Azure. CertificateResource } // CertificateOrdersClientGetResponse contains the response from method CertificateOrdersClient.Get. type CertificateOrdersClientGetResponse struct { + // SSL certificate purchase order. CertificateOrder } // CertificateOrdersClientListByResourceGroupResponse contains the response from method CertificateOrdersClient.NewListByResourceGroupPager. type CertificateOrdersClientListByResourceGroupResponse struct { + // Collection of certificate orders. CertificateOrderCollection } // CertificateOrdersClientListCertificatesResponse contains the response from method CertificateOrdersClient.NewListCertificatesPager. type CertificateOrdersClientListCertificatesResponse struct { + // Collection of certificate order certificates. CertificateCollection } // CertificateOrdersClientListResponse contains the response from method CertificateOrdersClient.NewListPager. type CertificateOrdersClientListResponse struct { + // Collection of certificate orders. CertificateOrderCollection } @@ -93,16 +99,19 @@ type CertificateOrdersClientRetrieveCertificateEmailHistoryResponse struct { // CertificateOrdersClientRetrieveSiteSealResponse contains the response from method CertificateOrdersClient.RetrieveSiteSeal. type CertificateOrdersClientRetrieveSiteSealResponse struct { + // Site seal SiteSeal } // CertificateOrdersClientUpdateCertificateResponse contains the response from method CertificateOrdersClient.UpdateCertificate. type CertificateOrdersClientUpdateCertificateResponse struct { + // Key Vault container ARM resource for a certificate that is purchased through Azure. CertificateResource } // CertificateOrdersClientUpdateResponse contains the response from method CertificateOrdersClient.Update. type CertificateOrdersClientUpdateResponse struct { + // SSL certificate purchase order. CertificateOrder } @@ -119,22 +128,26 @@ type CertificateOrdersClientVerifyDomainOwnershipResponse struct { // CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseResponse contains the response from method // CertificateOrdersDiagnosticsClient.GetAppServiceCertificateOrderDetectorResponse. type CertificateOrdersDiagnosticsClientGetAppServiceCertificateOrderDetectorResponseResponse struct { + // Class representing Response from Detector DetectorResponse } // CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse contains the response from method // CertificateOrdersDiagnosticsClient.NewListAppServiceCertificateOrderDetectorResponsePager. type CertificateOrdersDiagnosticsClientListAppServiceCertificateOrderDetectorResponseResponse struct { + // Collection of detector responses DetectorResponseCollection } // CertificateRegistrationProviderClientListOperationsResponse contains the response from method CertificateRegistrationProviderClient.NewListOperationsPager. type CertificateRegistrationProviderClientListOperationsResponse struct { + // Collection of Azure resource manager operation metadata. CsmOperationCollection } // CertificatesClientCreateOrUpdateResponse contains the response from method CertificatesClient.CreateOrUpdate. type CertificatesClientCreateOrUpdateResponse struct { + // SSL certificate for an app. AppCertificate } @@ -145,26 +158,31 @@ type CertificatesClientDeleteResponse struct { // CertificatesClientGetResponse contains the response from method CertificatesClient.Get. type CertificatesClientGetResponse struct { + // SSL certificate for an app. AppCertificate } // CertificatesClientListByResourceGroupResponse contains the response from method CertificatesClient.NewListByResourceGroupPager. type CertificatesClientListByResourceGroupResponse struct { + // Collection of certificates. AppCertificateCollection } // CertificatesClientListResponse contains the response from method CertificatesClient.NewListPager. type CertificatesClientListResponse struct { + // Collection of certificates. AppCertificateCollection } // CertificatesClientUpdateResponse contains the response from method CertificatesClient.Update. type CertificatesClientUpdateResponse struct { + // SSL certificate for an app. AppCertificate } // ContainerAppsClientCreateOrUpdateResponse contains the response from method ContainerAppsClient.BeginCreateOrUpdate. type ContainerAppsClientCreateOrUpdateResponse struct { + // Container App. ContainerApp } @@ -175,21 +193,25 @@ type ContainerAppsClientDeleteResponse struct { // ContainerAppsClientGetResponse contains the response from method ContainerAppsClient.Get. type ContainerAppsClientGetResponse struct { + // Container App. ContainerApp } // ContainerAppsClientListByResourceGroupResponse contains the response from method ContainerAppsClient.NewListByResourceGroupPager. type ContainerAppsClientListByResourceGroupResponse struct { + // Container App collection ARM resource. ContainerAppCollection } // ContainerAppsClientListBySubscriptionResponse contains the response from method ContainerAppsClient.NewListBySubscriptionPager. type ContainerAppsClientListBySubscriptionResponse struct { + // Container App collection ARM resource. ContainerAppCollection } // ContainerAppsClientListSecretsResponse contains the response from method ContainerAppsClient.ListSecrets. type ContainerAppsClientListSecretsResponse struct { + // Container App Secrets Collection ARM resource. SecretsCollection } @@ -205,11 +227,13 @@ type ContainerAppsRevisionsClientDeactivateRevisionResponse struct { // ContainerAppsRevisionsClientGetRevisionResponse contains the response from method ContainerAppsRevisionsClient.GetRevision. type ContainerAppsRevisionsClientGetRevisionResponse struct { + // Container App Revision. Revision } // ContainerAppsRevisionsClientListRevisionsResponse contains the response from method ContainerAppsRevisionsClient.NewListRevisionsPager. type ContainerAppsRevisionsClientListRevisionsResponse struct { + // Container App Revisions collection ARM resource. RevisionCollection } @@ -220,146 +244,175 @@ type ContainerAppsRevisionsClientRestartRevisionResponse struct { // DeletedWebAppsClientGetDeletedWebAppByLocationResponse contains the response from method DeletedWebAppsClient.GetDeletedWebAppByLocation. type DeletedWebAppsClientGetDeletedWebAppByLocationResponse struct { + // A deleted app. DeletedSite } // DeletedWebAppsClientListByLocationResponse contains the response from method DeletedWebAppsClient.NewListByLocationPager. type DeletedWebAppsClientListByLocationResponse struct { + // Collection of deleted apps. DeletedWebAppCollection } // DeletedWebAppsClientListResponse contains the response from method DeletedWebAppsClient.NewListPager. type DeletedWebAppsClientListResponse struct { + // Collection of deleted apps. DeletedWebAppCollection } // DiagnosticsClientExecuteSiteAnalysisResponse contains the response from method DiagnosticsClient.ExecuteSiteAnalysis. type DiagnosticsClientExecuteSiteAnalysisResponse struct { + // Class representing a diagnostic analysis done on an application DiagnosticAnalysis } // DiagnosticsClientExecuteSiteAnalysisSlotResponse contains the response from method DiagnosticsClient.ExecuteSiteAnalysisSlot. type DiagnosticsClientExecuteSiteAnalysisSlotResponse struct { + // Class representing a diagnostic analysis done on an application DiagnosticAnalysis } // DiagnosticsClientExecuteSiteDetectorResponse contains the response from method DiagnosticsClient.ExecuteSiteDetector. type DiagnosticsClientExecuteSiteDetectorResponse struct { + // Class representing Response from Diagnostic Detectors DiagnosticDetectorResponse } // DiagnosticsClientExecuteSiteDetectorSlotResponse contains the response from method DiagnosticsClient.ExecuteSiteDetectorSlot. type DiagnosticsClientExecuteSiteDetectorSlotResponse struct { + // Class representing Response from Diagnostic Detectors DiagnosticDetectorResponse } // DiagnosticsClientGetHostingEnvironmentDetectorResponseResponse contains the response from method DiagnosticsClient.GetHostingEnvironmentDetectorResponse. type DiagnosticsClientGetHostingEnvironmentDetectorResponseResponse struct { + // Class representing Response from Detector DetectorResponse } // DiagnosticsClientGetSiteAnalysisResponse contains the response from method DiagnosticsClient.GetSiteAnalysis. type DiagnosticsClientGetSiteAnalysisResponse struct { + // Definition of Analysis AnalysisDefinition } // DiagnosticsClientGetSiteAnalysisSlotResponse contains the response from method DiagnosticsClient.GetSiteAnalysisSlot. type DiagnosticsClientGetSiteAnalysisSlotResponse struct { + // Definition of Analysis AnalysisDefinition } // DiagnosticsClientGetSiteDetectorResponse contains the response from method DiagnosticsClient.GetSiteDetector. type DiagnosticsClientGetSiteDetectorResponse struct { + // ARM resource for a detector definition DetectorDefinitionResource } // DiagnosticsClientGetSiteDetectorResponseResponse contains the response from method DiagnosticsClient.GetSiteDetectorResponse. type DiagnosticsClientGetSiteDetectorResponseResponse struct { + // Class representing Response from Detector DetectorResponse } // DiagnosticsClientGetSiteDetectorResponseSlotResponse contains the response from method DiagnosticsClient.GetSiteDetectorResponseSlot. type DiagnosticsClientGetSiteDetectorResponseSlotResponse struct { + // Class representing Response from Detector DetectorResponse } // DiagnosticsClientGetSiteDetectorSlotResponse contains the response from method DiagnosticsClient.GetSiteDetectorSlot. type DiagnosticsClientGetSiteDetectorSlotResponse struct { + // ARM resource for a detector definition DetectorDefinitionResource } // DiagnosticsClientGetSiteDiagnosticCategoryResponse contains the response from method DiagnosticsClient.GetSiteDiagnosticCategory. type DiagnosticsClientGetSiteDiagnosticCategoryResponse struct { + // Class representing detector definition DiagnosticCategory } // DiagnosticsClientGetSiteDiagnosticCategorySlotResponse contains the response from method DiagnosticsClient.GetSiteDiagnosticCategorySlot. type DiagnosticsClientGetSiteDiagnosticCategorySlotResponse struct { + // Class representing detector definition DiagnosticCategory } // DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse contains the response from method DiagnosticsClient.NewListHostingEnvironmentDetectorResponsesPager. type DiagnosticsClientListHostingEnvironmentDetectorResponsesResponse struct { + // Collection of detector responses DetectorResponseCollection } // DiagnosticsClientListSiteAnalysesResponse contains the response from method DiagnosticsClient.NewListSiteAnalysesPager. type DiagnosticsClientListSiteAnalysesResponse struct { + // Collection of Diagnostic Analyses DiagnosticAnalysisCollection } // DiagnosticsClientListSiteAnalysesSlotResponse contains the response from method DiagnosticsClient.NewListSiteAnalysesSlotPager. type DiagnosticsClientListSiteAnalysesSlotResponse struct { + // Collection of Diagnostic Analyses DiagnosticAnalysisCollection } // DiagnosticsClientListSiteDetectorResponsesResponse contains the response from method DiagnosticsClient.NewListSiteDetectorResponsesPager. type DiagnosticsClientListSiteDetectorResponsesResponse struct { + // Collection of detector responses DetectorResponseCollection } // DiagnosticsClientListSiteDetectorResponsesSlotResponse contains the response from method DiagnosticsClient.NewListSiteDetectorResponsesSlotPager. type DiagnosticsClientListSiteDetectorResponsesSlotResponse struct { + // Collection of detector responses DetectorResponseCollection } // DiagnosticsClientListSiteDetectorsResponse contains the response from method DiagnosticsClient.NewListSiteDetectorsPager. type DiagnosticsClientListSiteDetectorsResponse struct { + // Collection of Diagnostic Detectors DiagnosticDetectorCollection } // DiagnosticsClientListSiteDetectorsSlotResponse contains the response from method DiagnosticsClient.NewListSiteDetectorsSlotPager. type DiagnosticsClientListSiteDetectorsSlotResponse struct { + // Collection of Diagnostic Detectors DiagnosticDetectorCollection } // DiagnosticsClientListSiteDiagnosticCategoriesResponse contains the response from method DiagnosticsClient.NewListSiteDiagnosticCategoriesPager. type DiagnosticsClientListSiteDiagnosticCategoriesResponse struct { + // Collection of Diagnostic Categories DiagnosticCategoryCollection } // DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse contains the response from method DiagnosticsClient.NewListSiteDiagnosticCategoriesSlotPager. type DiagnosticsClientListSiteDiagnosticCategoriesSlotResponse struct { + // Collection of Diagnostic Categories DiagnosticCategoryCollection } // DomainRegistrationProviderClientListOperationsResponse contains the response from method DomainRegistrationProviderClient.NewListOperationsPager. type DomainRegistrationProviderClientListOperationsResponse struct { + // Collection of Azure resource manager operation metadata. CsmOperationCollection } // DomainsClientCheckAvailabilityResponse contains the response from method DomainsClient.CheckAvailability. type DomainsClientCheckAvailabilityResponse struct { + // Domain availability check result. DomainAvailabilityCheckResult } // DomainsClientCreateOrUpdateOwnershipIdentifierResponse contains the response from method DomainsClient.CreateOrUpdateOwnershipIdentifier. type DomainsClientCreateOrUpdateOwnershipIdentifierResponse struct { + // Domain ownership Identifier. DomainOwnershipIdentifier } // DomainsClientCreateOrUpdateResponse contains the response from method DomainsClient.BeginCreateOrUpdate. type DomainsClientCreateOrUpdateResponse struct { + // Information about a domain. Domain } @@ -375,36 +428,43 @@ type DomainsClientDeleteResponse struct { // DomainsClientGetControlCenterSsoRequestResponse contains the response from method DomainsClient.GetControlCenterSsoRequest. type DomainsClientGetControlCenterSsoRequestResponse struct { + // Single sign-on request information for domain management. DomainControlCenterSsoRequest } // DomainsClientGetOwnershipIdentifierResponse contains the response from method DomainsClient.GetOwnershipIdentifier. type DomainsClientGetOwnershipIdentifierResponse struct { + // Domain ownership Identifier. DomainOwnershipIdentifier } // DomainsClientGetResponse contains the response from method DomainsClient.Get. type DomainsClientGetResponse struct { + // Information about a domain. Domain } // DomainsClientListByResourceGroupResponse contains the response from method DomainsClient.NewListByResourceGroupPager. type DomainsClientListByResourceGroupResponse struct { + // Collection of domains. DomainCollection } // DomainsClientListOwnershipIdentifiersResponse contains the response from method DomainsClient.NewListOwnershipIdentifiersPager. type DomainsClientListOwnershipIdentifiersResponse struct { + // Collection of domain ownership identifiers. DomainOwnershipIdentifierCollection } // DomainsClientListRecommendationsResponse contains the response from method DomainsClient.NewListRecommendationsPager. type DomainsClientListRecommendationsResponse struct { + // Collection of domain name identifiers. NameIdentifierCollection } // DomainsClientListResponse contains the response from method DomainsClient.NewListPager. type DomainsClientListResponse struct { + // Collection of domains. DomainCollection } @@ -415,41 +475,49 @@ type DomainsClientRenewResponse struct { // DomainsClientTransferOutResponse contains the response from method DomainsClient.TransferOut. type DomainsClientTransferOutResponse struct { + // Information about a domain. Domain } // DomainsClientUpdateOwnershipIdentifierResponse contains the response from method DomainsClient.UpdateOwnershipIdentifier. type DomainsClientUpdateOwnershipIdentifierResponse struct { + // Domain ownership Identifier. DomainOwnershipIdentifier } // DomainsClientUpdateResponse contains the response from method DomainsClient.Update. type DomainsClientUpdateResponse struct { + // Information about a domain. Domain } // EnvironmentsClientApproveOrRejectPrivateEndpointConnectionResponse contains the response from method EnvironmentsClient.BeginApproveOrRejectPrivateEndpointConnection. type EnvironmentsClientApproveOrRejectPrivateEndpointConnectionResponse struct { + // Remote Private Endpoint Connection ARM resource. RemotePrivateEndpointConnectionARMResource } // EnvironmentsClientChangeVnetResponse contains the response from method EnvironmentsClient.BeginChangeVnet. type EnvironmentsClientChangeVnetResponse struct { + // Collection of App Service apps. WebAppCollection } // EnvironmentsClientCreateOrUpdateMultiRolePoolResponse contains the response from method EnvironmentsClient.BeginCreateOrUpdateMultiRolePool. type EnvironmentsClientCreateOrUpdateMultiRolePoolResponse struct { + // Worker pool of an App Service Environment ARM resource. WorkerPoolResource } // EnvironmentsClientCreateOrUpdateResponse contains the response from method EnvironmentsClient.BeginCreateOrUpdate. type EnvironmentsClientCreateOrUpdateResponse struct { + // App Service Environment ARM resource. EnvironmentResource } // EnvironmentsClientCreateOrUpdateWorkerPoolResponse contains the response from method EnvironmentsClient.BeginCreateOrUpdateWorkerPool. type EnvironmentsClientCreateOrUpdateWorkerPoolResponse struct { + // Worker pool of an App Service Environment ARM resource. WorkerPoolResource } @@ -477,31 +545,37 @@ type EnvironmentsClientDeleteResponse struct { // EnvironmentsClientGetAseCustomDNSSuffixConfigurationResponse contains the response from method EnvironmentsClient.GetAseCustomDNSSuffixConfiguration. type EnvironmentsClientGetAseCustomDNSSuffixConfigurationResponse struct { + // Full view of the custom domain suffix configuration for ASEv3. CustomDNSSuffixConfiguration } // EnvironmentsClientGetAseV3NetworkingConfigurationResponse contains the response from method EnvironmentsClient.GetAseV3NetworkingConfiguration. type EnvironmentsClientGetAseV3NetworkingConfigurationResponse struct { + // Full view of networking configuration for an ASE. AseV3NetworkingConfiguration } // EnvironmentsClientGetDiagnosticsItemResponse contains the response from method EnvironmentsClient.GetDiagnosticsItem. type EnvironmentsClientGetDiagnosticsItemResponse struct { + // Diagnostics for an App Service Environment. HostingEnvironmentDiagnostics } // EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse contains the response from method EnvironmentsClient.NewGetInboundNetworkDependenciesEndpointsPager. type EnvironmentsClientGetInboundNetworkDependenciesEndpointsResponse struct { + // Collection of Inbound Environment Endpoints InboundEnvironmentEndpointCollection } // EnvironmentsClientGetMultiRolePoolResponse contains the response from method EnvironmentsClient.GetMultiRolePool. type EnvironmentsClientGetMultiRolePoolResponse struct { + // Worker pool of an App Service Environment ARM resource. WorkerPoolResource } // EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse contains the response from method EnvironmentsClient.NewGetOutboundNetworkDependenciesEndpointsPager. type EnvironmentsClientGetOutboundNetworkDependenciesEndpointsResponse struct { + // Collection of Outbound Environment Endpoints OutboundEnvironmentEndpointCollection } @@ -512,41 +586,49 @@ type EnvironmentsClientGetPrivateEndpointConnectionListResponse struct { // EnvironmentsClientGetPrivateEndpointConnectionResponse contains the response from method EnvironmentsClient.GetPrivateEndpointConnection. type EnvironmentsClientGetPrivateEndpointConnectionResponse struct { + // Remote Private Endpoint Connection ARM resource. RemotePrivateEndpointConnectionARMResource } // EnvironmentsClientGetPrivateLinkResourcesResponse contains the response from method EnvironmentsClient.GetPrivateLinkResources. type EnvironmentsClientGetPrivateLinkResourcesResponse struct { + // Wrapper for a collection of private link resources PrivateLinkResourcesWrapper } // EnvironmentsClientGetResponse contains the response from method EnvironmentsClient.Get. type EnvironmentsClientGetResponse struct { + // App Service Environment ARM resource. EnvironmentResource } // EnvironmentsClientGetVipInfoResponse contains the response from method EnvironmentsClient.GetVipInfo. type EnvironmentsClientGetVipInfoResponse struct { + // Describes main public IP address and any extra virtual IPs. AddressResponse } // EnvironmentsClientGetWorkerPoolResponse contains the response from method EnvironmentsClient.GetWorkerPool. type EnvironmentsClientGetWorkerPoolResponse struct { + // Worker pool of an App Service Environment ARM resource. WorkerPoolResource } // EnvironmentsClientListAppServicePlansResponse contains the response from method EnvironmentsClient.NewListAppServicePlansPager. type EnvironmentsClientListAppServicePlansResponse struct { + // Collection of App Service plans. PlanCollection } // EnvironmentsClientListByResourceGroupResponse contains the response from method EnvironmentsClient.NewListByResourceGroupPager. type EnvironmentsClientListByResourceGroupResponse struct { + // Collection of App Service Environments. EnvironmentCollection } // EnvironmentsClientListCapacitiesResponse contains the response from method EnvironmentsClient.NewListCapacitiesPager. type EnvironmentsClientListCapacitiesResponse struct { + // Collection of stamp capacities. StampCapacityCollection } @@ -558,26 +640,31 @@ type EnvironmentsClientListDiagnosticsResponse struct { // EnvironmentsClientListMultiRoleMetricDefinitionsResponse contains the response from method EnvironmentsClient.NewListMultiRoleMetricDefinitionsPager. type EnvironmentsClientListMultiRoleMetricDefinitionsResponse struct { + // Collection of metric definitions. ResourceMetricDefinitionCollection } // EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse contains the response from method EnvironmentsClient.NewListMultiRolePoolInstanceMetricDefinitionsPager. type EnvironmentsClientListMultiRolePoolInstanceMetricDefinitionsResponse struct { + // Collection of metric definitions. ResourceMetricDefinitionCollection } // EnvironmentsClientListMultiRolePoolSKUsResponse contains the response from method EnvironmentsClient.NewListMultiRolePoolSKUsPager. type EnvironmentsClientListMultiRolePoolSKUsResponse struct { + // Collection of SKU information. SKUInfoCollection } // EnvironmentsClientListMultiRolePoolsResponse contains the response from method EnvironmentsClient.NewListMultiRolePoolsPager. type EnvironmentsClientListMultiRolePoolsResponse struct { + // Collection of worker pools. WorkerPoolCollection } // EnvironmentsClientListMultiRoleUsagesResponse contains the response from method EnvironmentsClient.NewListMultiRoleUsagesPager. type EnvironmentsClientListMultiRoleUsagesResponse struct { + // Collection of usages. UsageCollection } @@ -589,41 +676,49 @@ type EnvironmentsClientListOperationsResponse struct { // EnvironmentsClientListResponse contains the response from method EnvironmentsClient.NewListPager. type EnvironmentsClientListResponse struct { + // Collection of App Service Environments. EnvironmentCollection } // EnvironmentsClientListUsagesResponse contains the response from method EnvironmentsClient.NewListUsagesPager. type EnvironmentsClientListUsagesResponse struct { + // Collection of CSM usage quotas. CsmUsageQuotaCollection } // EnvironmentsClientListWebAppsResponse contains the response from method EnvironmentsClient.NewListWebAppsPager. type EnvironmentsClientListWebAppsResponse struct { + // Collection of App Service apps. WebAppCollection } // EnvironmentsClientListWebWorkerMetricDefinitionsResponse contains the response from method EnvironmentsClient.NewListWebWorkerMetricDefinitionsPager. type EnvironmentsClientListWebWorkerMetricDefinitionsResponse struct { + // Collection of metric definitions. ResourceMetricDefinitionCollection } // EnvironmentsClientListWebWorkerUsagesResponse contains the response from method EnvironmentsClient.NewListWebWorkerUsagesPager. type EnvironmentsClientListWebWorkerUsagesResponse struct { + // Collection of usages. UsageCollection } // EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse contains the response from method EnvironmentsClient.NewListWorkerPoolInstanceMetricDefinitionsPager. type EnvironmentsClientListWorkerPoolInstanceMetricDefinitionsResponse struct { + // Collection of metric definitions. ResourceMetricDefinitionCollection } // EnvironmentsClientListWorkerPoolSKUsResponse contains the response from method EnvironmentsClient.NewListWorkerPoolSKUsPager. type EnvironmentsClientListWorkerPoolSKUsResponse struct { + // Collection of SKU information. SKUInfoCollection } // EnvironmentsClientListWorkerPoolsResponse contains the response from method EnvironmentsClient.NewListWorkerPoolsPager. type EnvironmentsClientListWorkerPoolsResponse struct { + // Collection of worker pools. WorkerPoolCollection } @@ -634,11 +729,13 @@ type EnvironmentsClientRebootResponse struct { // EnvironmentsClientResumeResponse contains the response from method EnvironmentsClient.BeginResume. type EnvironmentsClientResumeResponse struct { + // Collection of App Service apps. WebAppCollection } // EnvironmentsClientSuspendResponse contains the response from method EnvironmentsClient.BeginSuspend. type EnvironmentsClientSuspendResponse struct { + // Collection of App Service apps. WebAppCollection } @@ -649,26 +746,31 @@ type EnvironmentsClientTestUpgradeAvailableNotificationResponse struct { // EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationResponse contains the response from method EnvironmentsClient.UpdateAseCustomDNSSuffixConfiguration. type EnvironmentsClientUpdateAseCustomDNSSuffixConfigurationResponse struct { + // Full view of the custom domain suffix configuration for ASEv3. CustomDNSSuffixConfiguration } // EnvironmentsClientUpdateAseNetworkingConfigurationResponse contains the response from method EnvironmentsClient.UpdateAseNetworkingConfiguration. type EnvironmentsClientUpdateAseNetworkingConfigurationResponse struct { + // Full view of networking configuration for an ASE. AseV3NetworkingConfiguration } // EnvironmentsClientUpdateMultiRolePoolResponse contains the response from method EnvironmentsClient.UpdateMultiRolePool. type EnvironmentsClientUpdateMultiRolePoolResponse struct { + // Worker pool of an App Service Environment ARM resource. WorkerPoolResource } // EnvironmentsClientUpdateResponse contains the response from method EnvironmentsClient.Update. type EnvironmentsClientUpdateResponse struct { + // App Service Environment ARM resource. EnvironmentResource } // EnvironmentsClientUpdateWorkerPoolResponse contains the response from method EnvironmentsClient.UpdateWorkerPool. type EnvironmentsClientUpdateWorkerPoolResponse struct { + // Worker pool of an App Service Environment ARM resource. WorkerPoolResource } @@ -677,8 +779,15 @@ type EnvironmentsClientUpgradeResponse struct { // placeholder for future response values } +// GetUsagesInLocationClientListResponse contains the response from method GetUsagesInLocationClient.NewListPager. +type GetUsagesInLocationClientListResponse struct { + // Collection of CSM usage quotas. + CsmUsageQuotaCollection +} + // GlobalClientGetDeletedWebAppResponse contains the response from method GlobalClient.GetDeletedWebApp. type GlobalClientGetDeletedWebAppResponse struct { + // A deleted app. DeletedSite } @@ -695,6 +804,7 @@ type GlobalClientGetSubscriptionOperationWithAsyncResponseResponse struct { // KubeEnvironmentsClientCreateOrUpdateResponse contains the response from method KubeEnvironmentsClient.BeginCreateOrUpdate. type KubeEnvironmentsClientCreateOrUpdateResponse struct { + // A Kubernetes cluster specialized for web workloads by Azure App Service KubeEnvironment } @@ -705,31 +815,37 @@ type KubeEnvironmentsClientDeleteResponse struct { // KubeEnvironmentsClientGetResponse contains the response from method KubeEnvironmentsClient.Get. type KubeEnvironmentsClientGetResponse struct { + // A Kubernetes cluster specialized for web workloads by Azure App Service KubeEnvironment } // KubeEnvironmentsClientListByResourceGroupResponse contains the response from method KubeEnvironmentsClient.NewListByResourceGroupPager. type KubeEnvironmentsClientListByResourceGroupResponse struct { + // Collection of Kubernetes Environments KubeEnvironmentCollection } // KubeEnvironmentsClientListBySubscriptionResponse contains the response from method KubeEnvironmentsClient.NewListBySubscriptionPager. type KubeEnvironmentsClientListBySubscriptionResponse struct { + // Collection of Kubernetes Environments KubeEnvironmentCollection } // KubeEnvironmentsClientUpdateResponse contains the response from method KubeEnvironmentsClient.Update. type KubeEnvironmentsClientUpdateResponse struct { + // A Kubernetes cluster specialized for web workloads by Azure App Service KubeEnvironment } // PlansClientCreateOrUpdateResponse contains the response from method PlansClient.BeginCreateOrUpdate. type PlansClientCreateOrUpdateResponse struct { + // App Service plan. Plan } // PlansClientCreateOrUpdateVnetRouteResponse contains the response from method PlansClient.CreateOrUpdateVnetRoute. type PlansClientCreateOrUpdateVnetRouteResponse struct { + // Virtual Network route contract used to pass routing information for a Virtual Network. VnetRoute } @@ -750,16 +866,19 @@ type PlansClientDeleteVnetRouteResponse struct { // PlansClientGetHybridConnectionPlanLimitResponse contains the response from method PlansClient.GetHybridConnectionPlanLimit. type PlansClientGetHybridConnectionPlanLimitResponse struct { + // Hybrid Connection limits contract. This is used to return the plan limits of Hybrid Connections. HybridConnectionLimits } // PlansClientGetHybridConnectionResponse contains the response from method PlansClient.GetHybridConnection. type PlansClientGetHybridConnectionResponse struct { + // Hybrid Connection contract. This is used to configure a Hybrid Connection. HybridConnection } // PlansClientGetResponse contains the response from method PlansClient.Get. type PlansClientGetResponse struct { + // App Service plan. Plan } @@ -777,16 +896,19 @@ type PlansClientGetServerFarmSKUsResponse struct { // PlansClientGetVnetFromServerFarmResponse contains the response from method PlansClient.GetVnetFromServerFarm. type PlansClientGetVnetFromServerFarmResponse struct { + // Virtual Network information ARM resource. VnetInfoResource } // PlansClientGetVnetGatewayResponse contains the response from method PlansClient.GetVnetGateway. type PlansClientGetVnetGatewayResponse struct { + // The Virtual Network gateway contract. This is used to give the Virtual Network gateway access to the VPN package. VnetGateway } // PlansClientListByResourceGroupResponse contains the response from method PlansClient.NewListByResourceGroupPager. type PlansClientListByResourceGroupResponse struct { + // Collection of App Service plans. PlanCollection } @@ -798,16 +920,19 @@ type PlansClientListCapabilitiesResponse struct { // PlansClientListHybridConnectionKeysResponse contains the response from method PlansClient.ListHybridConnectionKeys. type PlansClientListHybridConnectionKeysResponse struct { + // Hybrid Connection key contract. This has the send key name and value for a Hybrid Connection. HybridConnectionKey } // PlansClientListHybridConnectionsResponse contains the response from method PlansClient.NewListHybridConnectionsPager. type PlansClientListHybridConnectionsResponse struct { + // Collection of hostname bindings. HybridConnectionCollection } // PlansClientListResponse contains the response from method PlansClient.NewListPager. type PlansClientListResponse struct { + // Collection of App Service plans. PlanCollection } @@ -819,6 +944,7 @@ type PlansClientListRoutesForVnetResponse struct { // PlansClientListUsagesResponse contains the response from method PlansClient.NewListUsagesPager. type PlansClientListUsagesResponse struct { + // Collection of CSM usage quotas. CsmUsageQuotaCollection } @@ -830,11 +956,13 @@ type PlansClientListVnetsResponse struct { // PlansClientListWebAppsByHybridConnectionResponse contains the response from method PlansClient.NewListWebAppsByHybridConnectionPager. type PlansClientListWebAppsByHybridConnectionResponse struct { + // Collection of resources. ResourceCollection } // PlansClientListWebAppsResponse contains the response from method PlansClient.NewListWebAppsPager. type PlansClientListWebAppsResponse struct { + // Collection of App Service apps. WebAppCollection } @@ -850,51 +978,61 @@ type PlansClientRestartWebAppsResponse struct { // PlansClientUpdateResponse contains the response from method PlansClient.Update. type PlansClientUpdateResponse struct { + // App Service plan. Plan } // PlansClientUpdateVnetGatewayResponse contains the response from method PlansClient.UpdateVnetGateway. type PlansClientUpdateVnetGatewayResponse struct { + // The Virtual Network gateway contract. This is used to give the Virtual Network gateway access to the VPN package. VnetGateway } // PlansClientUpdateVnetRouteResponse contains the response from method PlansClient.UpdateVnetRoute. type PlansClientUpdateVnetRouteResponse struct { + // Virtual Network route contract used to pass routing information for a Virtual Network. VnetRoute } // ProviderClientGetAvailableStacksOnPremResponse contains the response from method ProviderClient.NewGetAvailableStacksOnPremPager. type ProviderClientGetAvailableStacksOnPremResponse struct { + // Collection of Application Stacks ApplicationStackCollection } // ProviderClientGetAvailableStacksResponse contains the response from method ProviderClient.NewGetAvailableStacksPager. type ProviderClientGetAvailableStacksResponse struct { + // Collection of Application Stacks ApplicationStackCollection } // ProviderClientGetFunctionAppStacksForLocationResponse contains the response from method ProviderClient.NewGetFunctionAppStacksForLocationPager. type ProviderClientGetFunctionAppStacksForLocationResponse struct { + // Collection of Function app Stacks FunctionAppStackCollection } // ProviderClientGetFunctionAppStacksResponse contains the response from method ProviderClient.NewGetFunctionAppStacksPager. type ProviderClientGetFunctionAppStacksResponse struct { + // Collection of Function app Stacks FunctionAppStackCollection } // ProviderClientGetWebAppStacksForLocationResponse contains the response from method ProviderClient.NewGetWebAppStacksForLocationPager. type ProviderClientGetWebAppStacksForLocationResponse struct { + // Collection of Web app Stacks WebAppStackCollection } // ProviderClientGetWebAppStacksResponse contains the response from method ProviderClient.NewGetWebAppStacksPager. type ProviderClientGetWebAppStacksResponse struct { + // Collection of Web app Stacks WebAppStackCollection } // ProviderClientListOperationsResponse contains the response from method ProviderClient.NewListOperationsPager. type ProviderClientListOperationsResponse struct { + // Collection of Azure resource manager operation metadata. CsmOperationCollection } @@ -925,36 +1063,43 @@ type RecommendationsClientDisableRecommendationForSubscriptionResponse struct { // RecommendationsClientGetRuleDetailsByHostingEnvironmentResponse contains the response from method RecommendationsClient.GetRuleDetailsByHostingEnvironment. type RecommendationsClientGetRuleDetailsByHostingEnvironmentResponse struct { + // Represents a recommendation rule that the recommendation engine can perform. RecommendationRule } // RecommendationsClientGetRuleDetailsByWebAppResponse contains the response from method RecommendationsClient.GetRuleDetailsByWebApp. type RecommendationsClientGetRuleDetailsByWebAppResponse struct { + // Represents a recommendation rule that the recommendation engine can perform. RecommendationRule } // RecommendationsClientListHistoryForHostingEnvironmentResponse contains the response from method RecommendationsClient.NewListHistoryForHostingEnvironmentPager. type RecommendationsClientListHistoryForHostingEnvironmentResponse struct { + // Collection of recommendations. RecommendationCollection } // RecommendationsClientListHistoryForWebAppResponse contains the response from method RecommendationsClient.NewListHistoryForWebAppPager. type RecommendationsClientListHistoryForWebAppResponse struct { + // Collection of recommendations. RecommendationCollection } // RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse contains the response from method RecommendationsClient.NewListRecommendedRulesForHostingEnvironmentPager. type RecommendationsClientListRecommendedRulesForHostingEnvironmentResponse struct { + // Collection of recommendations. RecommendationCollection } // RecommendationsClientListRecommendedRulesForWebAppResponse contains the response from method RecommendationsClient.NewListRecommendedRulesForWebAppPager. type RecommendationsClientListRecommendedRulesForWebAppResponse struct { + // Collection of recommendations. RecommendationCollection } // RecommendationsClientListResponse contains the response from method RecommendationsClient.NewListPager. type RecommendationsClientListResponse struct { + // Collection of recommendations. RecommendationCollection } @@ -975,86 +1120,103 @@ type RecommendationsClientResetAllFiltersResponse struct { // ResourceHealthMetadataClientGetBySiteResponse contains the response from method ResourceHealthMetadataClient.GetBySite. type ResourceHealthMetadataClientGetBySiteResponse struct { + // Used for getting ResourceHealthCheck settings. ResourceHealthMetadata } // ResourceHealthMetadataClientGetBySiteSlotResponse contains the response from method ResourceHealthMetadataClient.GetBySiteSlot. type ResourceHealthMetadataClientGetBySiteSlotResponse struct { + // Used for getting ResourceHealthCheck settings. ResourceHealthMetadata } // ResourceHealthMetadataClientListByResourceGroupResponse contains the response from method ResourceHealthMetadataClient.NewListByResourceGroupPager. type ResourceHealthMetadataClientListByResourceGroupResponse struct { + // Collection of resource health metadata. ResourceHealthMetadataCollection } // ResourceHealthMetadataClientListBySiteResponse contains the response from method ResourceHealthMetadataClient.NewListBySitePager. type ResourceHealthMetadataClientListBySiteResponse struct { + // Collection of resource health metadata. ResourceHealthMetadataCollection } // ResourceHealthMetadataClientListBySiteSlotResponse contains the response from method ResourceHealthMetadataClient.NewListBySiteSlotPager. type ResourceHealthMetadataClientListBySiteSlotResponse struct { + // Collection of resource health metadata. ResourceHealthMetadataCollection } // ResourceHealthMetadataClientListResponse contains the response from method ResourceHealthMetadataClient.NewListPager. type ResourceHealthMetadataClientListResponse struct { + // Collection of resource health metadata. ResourceHealthMetadataCollection } // StaticSitesClientApproveOrRejectPrivateEndpointConnectionResponse contains the response from method StaticSitesClient.BeginApproveOrRejectPrivateEndpointConnection. type StaticSitesClientApproveOrRejectPrivateEndpointConnectionResponse struct { + // Remote Private Endpoint Connection ARM resource. RemotePrivateEndpointConnectionARMResource } // StaticSitesClientCreateOrUpdateBasicAuthResponse contains the response from method StaticSitesClient.CreateOrUpdateBasicAuth. type StaticSitesClientCreateOrUpdateBasicAuthResponse struct { + // Static site basic auth properties ARM resource. StaticSiteBasicAuthPropertiesARMResource } // StaticSitesClientCreateOrUpdateBuildDatabaseConnectionResponse contains the response from method StaticSitesClient.CreateOrUpdateBuildDatabaseConnection. type StaticSitesClientCreateOrUpdateBuildDatabaseConnectionResponse struct { + // Static Site Database Connection resource. DatabaseConnection } // StaticSitesClientCreateOrUpdateDatabaseConnectionResponse contains the response from method StaticSitesClient.CreateOrUpdateDatabaseConnection. type StaticSitesClientCreateOrUpdateDatabaseConnectionResponse struct { + // Static Site Database Connection resource. DatabaseConnection } // StaticSitesClientCreateOrUpdateStaticSiteAppSettingsResponse contains the response from method StaticSitesClient.CreateOrUpdateStaticSiteAppSettings. type StaticSitesClientCreateOrUpdateStaticSiteAppSettingsResponse struct { + // String dictionary resource. StringDictionary } // StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsResponse contains the response from method StaticSitesClient.CreateOrUpdateStaticSiteBuildAppSettings. type StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsResponse struct { + // String dictionary resource. StringDictionary } // StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsResponse contains the response from method StaticSitesClient.CreateOrUpdateStaticSiteBuildFunctionAppSettings. type StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsResponse struct { + // String dictionary resource. StringDictionary } // StaticSitesClientCreateOrUpdateStaticSiteCustomDomainResponse contains the response from method StaticSitesClient.BeginCreateOrUpdateStaticSiteCustomDomain. type StaticSitesClientCreateOrUpdateStaticSiteCustomDomainResponse struct { + // Static Site Custom Domain Overview ARM resource. StaticSiteCustomDomainOverviewARMResource } // StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsResponse contains the response from method StaticSitesClient.CreateOrUpdateStaticSiteFunctionAppSettings. type StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsResponse struct { + // String dictionary resource. StringDictionary } // StaticSitesClientCreateOrUpdateStaticSiteResponse contains the response from method StaticSitesClient.BeginCreateOrUpdateStaticSite. type StaticSitesClientCreateOrUpdateStaticSiteResponse struct { + // Static Site ARM resource. StaticSiteARMResource } // StaticSitesClientCreateUserRolesInvitationLinkResponse contains the response from method StaticSitesClient.CreateUserRolesInvitationLink. type StaticSitesClientCreateUserRolesInvitationLinkResponse struct { + // Static sites user roles invitation link resource. StaticSiteUserInvitationResponseResource } @@ -1126,66 +1288,79 @@ type StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteResponse struct // StaticSitesClientGetBasicAuthResponse contains the response from method StaticSitesClient.GetBasicAuth. type StaticSitesClientGetBasicAuthResponse struct { + // Static site basic auth properties ARM resource. StaticSiteBasicAuthPropertiesARMResource } // StaticSitesClientGetBuildDatabaseConnectionResponse contains the response from method StaticSitesClient.GetBuildDatabaseConnection. type StaticSitesClientGetBuildDatabaseConnectionResponse struct { + // Static Site Database Connection resource. DatabaseConnection } // StaticSitesClientGetBuildDatabaseConnectionWithDetailsResponse contains the response from method StaticSitesClient.GetBuildDatabaseConnectionWithDetails. type StaticSitesClientGetBuildDatabaseConnectionWithDetailsResponse struct { + // Static Site Database Connection resource. DatabaseConnection } // StaticSitesClientGetBuildDatabaseConnectionsResponse contains the response from method StaticSitesClient.NewGetBuildDatabaseConnectionsPager. type StaticSitesClientGetBuildDatabaseConnectionsResponse struct { + // Collection of static site database connections. DatabaseConnectionCollection } // StaticSitesClientGetBuildDatabaseConnectionsWithDetailsResponse contains the response from method StaticSitesClient.NewGetBuildDatabaseConnectionsWithDetailsPager. type StaticSitesClientGetBuildDatabaseConnectionsWithDetailsResponse struct { + // Collection of static site database connections. DatabaseConnectionCollection } // StaticSitesClientGetDatabaseConnectionResponse contains the response from method StaticSitesClient.GetDatabaseConnection. type StaticSitesClientGetDatabaseConnectionResponse struct { + // Static Site Database Connection resource. DatabaseConnection } // StaticSitesClientGetDatabaseConnectionWithDetailsResponse contains the response from method StaticSitesClient.GetDatabaseConnectionWithDetails. type StaticSitesClientGetDatabaseConnectionWithDetailsResponse struct { + // Static Site Database Connection resource. DatabaseConnection } // StaticSitesClientGetDatabaseConnectionsResponse contains the response from method StaticSitesClient.NewGetDatabaseConnectionsPager. type StaticSitesClientGetDatabaseConnectionsResponse struct { + // Collection of static site database connections. DatabaseConnectionCollection } // StaticSitesClientGetDatabaseConnectionsWithDetailsResponse contains the response from method StaticSitesClient.NewGetDatabaseConnectionsWithDetailsPager. type StaticSitesClientGetDatabaseConnectionsWithDetailsResponse struct { + // Collection of static site database connections. DatabaseConnectionCollection } // StaticSitesClientGetLinkedBackendForBuildResponse contains the response from method StaticSitesClient.GetLinkedBackendForBuild. type StaticSitesClientGetLinkedBackendForBuildResponse struct { + // Static Site Linked Backend ARM resource. StaticSiteLinkedBackendARMResource } // StaticSitesClientGetLinkedBackendResponse contains the response from method StaticSitesClient.GetLinkedBackend. type StaticSitesClientGetLinkedBackendResponse struct { + // Static Site Linked Backend ARM resource. StaticSiteLinkedBackendARMResource } // StaticSitesClientGetLinkedBackendsForBuildResponse contains the response from method StaticSitesClient.NewGetLinkedBackendsForBuildPager. type StaticSitesClientGetLinkedBackendsForBuildResponse struct { + // Collection of static site linked backends. StaticSiteLinkedBackendsCollection } // StaticSitesClientGetLinkedBackendsResponse contains the response from method StaticSitesClient.NewGetLinkedBackendsPager. type StaticSitesClientGetLinkedBackendsResponse struct { + // Collection of static site linked backends. StaticSiteLinkedBackendsCollection } @@ -1196,141 +1371,169 @@ type StaticSitesClientGetPrivateEndpointConnectionListResponse struct { // StaticSitesClientGetPrivateEndpointConnectionResponse contains the response from method StaticSitesClient.GetPrivateEndpointConnection. type StaticSitesClientGetPrivateEndpointConnectionResponse struct { + // Remote Private Endpoint Connection ARM resource. RemotePrivateEndpointConnectionARMResource } // StaticSitesClientGetPrivateLinkResourcesResponse contains the response from method StaticSitesClient.GetPrivateLinkResources. type StaticSitesClientGetPrivateLinkResourcesResponse struct { + // Wrapper for a collection of private link resources PrivateLinkResourcesWrapper } // StaticSitesClientGetStaticSiteBuildResponse contains the response from method StaticSitesClient.GetStaticSiteBuild. type StaticSitesClientGetStaticSiteBuildResponse struct { + // Static Site Build ARM resource. StaticSiteBuildARMResource } // StaticSitesClientGetStaticSiteBuildsResponse contains the response from method StaticSitesClient.NewGetStaticSiteBuildsPager. type StaticSitesClientGetStaticSiteBuildsResponse struct { + // Collection of static site builds. StaticSiteBuildCollection } // StaticSitesClientGetStaticSiteCustomDomainResponse contains the response from method StaticSitesClient.GetStaticSiteCustomDomain. type StaticSitesClientGetStaticSiteCustomDomainResponse struct { + // Static Site Custom Domain Overview ARM resource. StaticSiteCustomDomainOverviewARMResource } // StaticSitesClientGetStaticSiteResponse contains the response from method StaticSitesClient.GetStaticSite. type StaticSitesClientGetStaticSiteResponse struct { + // Static Site ARM resource. StaticSiteARMResource } // StaticSitesClientGetStaticSitesByResourceGroupResponse contains the response from method StaticSitesClient.NewGetStaticSitesByResourceGroupPager. type StaticSitesClientGetStaticSitesByResourceGroupResponse struct { + // Collection of static sites. StaticSiteCollection } // StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildResponse contains the response from method StaticSitesClient.GetUserProvidedFunctionAppForStaticSiteBuild. type StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildResponse struct { + // Static Site User Provided Function App ARM resource. StaticSiteUserProvidedFunctionAppARMResource } // StaticSitesClientGetUserProvidedFunctionAppForStaticSiteResponse contains the response from method StaticSitesClient.GetUserProvidedFunctionAppForStaticSite. type StaticSitesClientGetUserProvidedFunctionAppForStaticSiteResponse struct { + // Static Site User Provided Function App ARM resource. StaticSiteUserProvidedFunctionAppARMResource } // StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse contains the response from method StaticSitesClient.NewGetUserProvidedFunctionAppsForStaticSiteBuildPager. type StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse struct { + // Collection of static site user provided function apps. StaticSiteUserProvidedFunctionAppsCollection } // StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse contains the response from method StaticSitesClient.NewGetUserProvidedFunctionAppsForStaticSitePager. type StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse struct { + // Collection of static site user provided function apps. StaticSiteUserProvidedFunctionAppsCollection } // StaticSitesClientLinkBackendResponse contains the response from method StaticSitesClient.BeginLinkBackend. type StaticSitesClientLinkBackendResponse struct { + // Static Site Linked Backend ARM resource. StaticSiteLinkedBackendARMResource } // StaticSitesClientLinkBackendToBuildResponse contains the response from method StaticSitesClient.BeginLinkBackendToBuild. type StaticSitesClientLinkBackendToBuildResponse struct { + // Static Site Linked Backend ARM resource. StaticSiteLinkedBackendARMResource } // StaticSitesClientListBasicAuthResponse contains the response from method StaticSitesClient.NewListBasicAuthPager. type StaticSitesClientListBasicAuthResponse struct { + // Collection of static site basic auth. StaticSiteBasicAuthPropertiesCollection } // StaticSitesClientListResponse contains the response from method StaticSitesClient.NewListPager. type StaticSitesClientListResponse struct { + // Collection of static sites. StaticSiteCollection } // StaticSitesClientListStaticSiteAppSettingsResponse contains the response from method StaticSitesClient.ListStaticSiteAppSettings. type StaticSitesClientListStaticSiteAppSettingsResponse struct { + // String dictionary resource. StringDictionary } // StaticSitesClientListStaticSiteBuildAppSettingsResponse contains the response from method StaticSitesClient.ListStaticSiteBuildAppSettings. type StaticSitesClientListStaticSiteBuildAppSettingsResponse struct { + // String dictionary resource. StringDictionary } // StaticSitesClientListStaticSiteBuildFunctionAppSettingsResponse contains the response from method StaticSitesClient.ListStaticSiteBuildFunctionAppSettings. type StaticSitesClientListStaticSiteBuildFunctionAppSettingsResponse struct { + // String dictionary resource. StringDictionary } // StaticSitesClientListStaticSiteBuildFunctionsResponse contains the response from method StaticSitesClient.NewListStaticSiteBuildFunctionsPager. type StaticSitesClientListStaticSiteBuildFunctionsResponse struct { + // Collection of static site functions. StaticSiteFunctionOverviewCollection } // StaticSitesClientListStaticSiteConfiguredRolesResponse contains the response from method StaticSitesClient.ListStaticSiteConfiguredRoles. type StaticSitesClientListStaticSiteConfiguredRolesResponse struct { + // String list resource. StringList } // StaticSitesClientListStaticSiteCustomDomainsResponse contains the response from method StaticSitesClient.NewListStaticSiteCustomDomainsPager. type StaticSitesClientListStaticSiteCustomDomainsResponse struct { + // Collection of static site custom domains. StaticSiteCustomDomainOverviewCollection } // StaticSitesClientListStaticSiteFunctionAppSettingsResponse contains the response from method StaticSitesClient.ListStaticSiteFunctionAppSettings. type StaticSitesClientListStaticSiteFunctionAppSettingsResponse struct { + // String dictionary resource. StringDictionary } // StaticSitesClientListStaticSiteFunctionsResponse contains the response from method StaticSitesClient.NewListStaticSiteFunctionsPager. type StaticSitesClientListStaticSiteFunctionsResponse struct { + // Collection of static site functions. StaticSiteFunctionOverviewCollection } // StaticSitesClientListStaticSiteSecretsResponse contains the response from method StaticSitesClient.ListStaticSiteSecrets. type StaticSitesClientListStaticSiteSecretsResponse struct { + // String dictionary resource. StringDictionary } // StaticSitesClientListStaticSiteUsersResponse contains the response from method StaticSitesClient.NewListStaticSiteUsersPager. type StaticSitesClientListStaticSiteUsersResponse struct { + // Collection of static site custom users. StaticSiteUserCollection } // StaticSitesClientPreviewWorkflowResponse contains the response from method StaticSitesClient.PreviewWorkflow. type StaticSitesClientPreviewWorkflowResponse struct { + // Preview for the Static Site Workflow to be generated StaticSitesWorkflowPreview } // StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildResponse contains the response from method StaticSitesClient.BeginRegisterUserProvidedFunctionAppWithStaticSiteBuild. type StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildResponse struct { + // Static Site User Provided Function App ARM resource. StaticSiteUserProvidedFunctionAppARMResource } // StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteResponse contains the response from method StaticSitesClient.BeginRegisterUserProvidedFunctionAppWithStaticSite. type StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteResponse struct { + // Static Site User Provided Function App ARM resource. StaticSiteUserProvidedFunctionAppARMResource } @@ -1351,21 +1554,25 @@ type StaticSitesClientUnlinkBackendResponse struct { // StaticSitesClientUpdateBuildDatabaseConnectionResponse contains the response from method StaticSitesClient.UpdateBuildDatabaseConnection. type StaticSitesClientUpdateBuildDatabaseConnectionResponse struct { + // Static Site Database Connection resource. DatabaseConnection } // StaticSitesClientUpdateDatabaseConnectionResponse contains the response from method StaticSitesClient.UpdateDatabaseConnection. type StaticSitesClientUpdateDatabaseConnectionResponse struct { + // Static Site Database Connection resource. DatabaseConnection } // StaticSitesClientUpdateStaticSiteResponse contains the response from method StaticSitesClient.UpdateStaticSite. type StaticSitesClientUpdateStaticSiteResponse struct { + // Static Site ARM resource. StaticSiteARMResource } // StaticSitesClientUpdateStaticSiteUserResponse contains the response from method StaticSitesClient.UpdateStaticSiteUser. type StaticSitesClientUpdateStaticSiteUserResponse struct { + // Static Site User ARM resource. StaticSiteUserARMResource } @@ -1386,36 +1593,43 @@ type StaticSitesClientValidateCustomDomainCanBeAddedToStaticSiteResponse struct // TopLevelDomainsClientGetResponse contains the response from method TopLevelDomainsClient.Get. type TopLevelDomainsClientGetResponse struct { + // A top level domain object. TopLevelDomain } // TopLevelDomainsClientListAgreementsResponse contains the response from method TopLevelDomainsClient.NewListAgreementsPager. type TopLevelDomainsClientListAgreementsResponse struct { + // Collection of top-level domain legal agreements. TldLegalAgreementCollection } // TopLevelDomainsClientListResponse contains the response from method TopLevelDomainsClient.NewListPager. type TopLevelDomainsClientListResponse struct { + // Collection of Top-level domains. TopLevelDomainCollection } // WebAppsClientAddPremierAddOnResponse contains the response from method WebAppsClient.AddPremierAddOn. type WebAppsClientAddPremierAddOnResponse struct { + // Premier add-on. PremierAddOn } // WebAppsClientAddPremierAddOnSlotResponse contains the response from method WebAppsClient.AddPremierAddOnSlot. type WebAppsClientAddPremierAddOnSlotResponse struct { + // Premier add-on. PremierAddOn } // WebAppsClientAnalyzeCustomHostnameResponse contains the response from method WebAppsClient.AnalyzeCustomHostname. type WebAppsClientAnalyzeCustomHostnameResponse struct { + // Custom domain analysis. CustomHostnameAnalysisResult } // WebAppsClientAnalyzeCustomHostnameSlotResponse contains the response from method WebAppsClient.AnalyzeCustomHostnameSlot. type WebAppsClientAnalyzeCustomHostnameSlotResponse struct { + // Custom domain analysis. CustomHostnameAnalysisResult } @@ -1431,61 +1645,73 @@ type WebAppsClientApplySlotConfigurationSlotResponse struct { // WebAppsClientApproveOrRejectPrivateEndpointConnectionResponse contains the response from method WebAppsClient.BeginApproveOrRejectPrivateEndpointConnection. type WebAppsClientApproveOrRejectPrivateEndpointConnectionResponse struct { + // Remote Private Endpoint Connection ARM resource. RemotePrivateEndpointConnectionARMResource } // WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotResponse contains the response from method WebAppsClient.BeginApproveOrRejectPrivateEndpointConnectionSlot. type WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotResponse struct { + // Remote Private Endpoint Connection ARM resource. RemotePrivateEndpointConnectionARMResource } // WebAppsClientBackupResponse contains the response from method WebAppsClient.Backup. type WebAppsClientBackupResponse struct { + // Backup description. BackupItem } // WebAppsClientBackupSlotResponse contains the response from method WebAppsClient.BackupSlot. type WebAppsClientBackupSlotResponse struct { + // Backup description. BackupItem } // WebAppsClientCreateDeploymentResponse contains the response from method WebAppsClient.CreateDeployment. type WebAppsClientCreateDeploymentResponse struct { + // User credentials used for publishing activity. Deployment } // WebAppsClientCreateDeploymentSlotResponse contains the response from method WebAppsClient.CreateDeploymentSlot. type WebAppsClientCreateDeploymentSlotResponse struct { + // User credentials used for publishing activity. Deployment } // WebAppsClientCreateFunctionResponse contains the response from method WebAppsClient.BeginCreateFunction. type WebAppsClientCreateFunctionResponse struct { + // Function information. FunctionEnvelope } // WebAppsClientCreateInstanceFunctionSlotResponse contains the response from method WebAppsClient.BeginCreateInstanceFunctionSlot. type WebAppsClientCreateInstanceFunctionSlotResponse struct { + // Function information. FunctionEnvelope } // WebAppsClientCreateInstanceMSDeployOperationResponse contains the response from method WebAppsClient.BeginCreateInstanceMSDeployOperation. type WebAppsClientCreateInstanceMSDeployOperationResponse struct { + // MSDeploy ARM response MSDeployStatus } // WebAppsClientCreateInstanceMSDeployOperationSlotResponse contains the response from method WebAppsClient.BeginCreateInstanceMSDeployOperationSlot. type WebAppsClientCreateInstanceMSDeployOperationSlotResponse struct { + // MSDeploy ARM response MSDeployStatus } // WebAppsClientCreateMSDeployOperationResponse contains the response from method WebAppsClient.BeginCreateMSDeployOperation. type WebAppsClientCreateMSDeployOperationResponse struct { + // MSDeploy ARM response MSDeployStatus } // WebAppsClientCreateMSDeployOperationSlotResponse contains the response from method WebAppsClient.BeginCreateMSDeployOperationSlot. type WebAppsClientCreateMSDeployOperationSlotResponse struct { + // MSDeploy ARM response MSDeployStatus } @@ -1497,131 +1723,157 @@ type WebAppsClientCreateOneDeployOperationResponse struct { // WebAppsClientCreateOrUpdateConfigurationResponse contains the response from method WebAppsClient.CreateOrUpdateConfiguration. type WebAppsClientCreateOrUpdateConfigurationResponse struct { + // Web app configuration ARM resource. SiteConfigResource } // WebAppsClientCreateOrUpdateConfigurationSlotResponse contains the response from method WebAppsClient.CreateOrUpdateConfigurationSlot. type WebAppsClientCreateOrUpdateConfigurationSlotResponse struct { + // Web app configuration ARM resource. SiteConfigResource } // WebAppsClientCreateOrUpdateDomainOwnershipIdentifierResponse contains the response from method WebAppsClient.CreateOrUpdateDomainOwnershipIdentifier. type WebAppsClientCreateOrUpdateDomainOwnershipIdentifierResponse struct { + // A domain specific resource identifier. Identifier } // WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotResponse contains the response from method WebAppsClient.CreateOrUpdateDomainOwnershipIdentifierSlot. type WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotResponse struct { + // A domain specific resource identifier. Identifier } // WebAppsClientCreateOrUpdateFunctionSecretResponse contains the response from method WebAppsClient.CreateOrUpdateFunctionSecret. type WebAppsClientCreateOrUpdateFunctionSecretResponse struct { + // Function key info. KeyInfo } // WebAppsClientCreateOrUpdateFunctionSecretSlotResponse contains the response from method WebAppsClient.CreateOrUpdateFunctionSecretSlot. type WebAppsClientCreateOrUpdateFunctionSecretSlotResponse struct { + // Function key info. KeyInfo } // WebAppsClientCreateOrUpdateHostNameBindingResponse contains the response from method WebAppsClient.CreateOrUpdateHostNameBinding. type WebAppsClientCreateOrUpdateHostNameBindingResponse struct { + // A hostname binding object. HostNameBinding } // WebAppsClientCreateOrUpdateHostNameBindingSlotResponse contains the response from method WebAppsClient.CreateOrUpdateHostNameBindingSlot. type WebAppsClientCreateOrUpdateHostNameBindingSlotResponse struct { + // A hostname binding object. HostNameBinding } // WebAppsClientCreateOrUpdateHostSecretResponse contains the response from method WebAppsClient.CreateOrUpdateHostSecret. type WebAppsClientCreateOrUpdateHostSecretResponse struct { + // Function key info. KeyInfo } // WebAppsClientCreateOrUpdateHostSecretSlotResponse contains the response from method WebAppsClient.CreateOrUpdateHostSecretSlot. type WebAppsClientCreateOrUpdateHostSecretSlotResponse struct { + // Function key info. KeyInfo } // WebAppsClientCreateOrUpdateHybridConnectionResponse contains the response from method WebAppsClient.CreateOrUpdateHybridConnection. type WebAppsClientCreateOrUpdateHybridConnectionResponse struct { + // Hybrid Connection contract. This is used to configure a Hybrid Connection. HybridConnection } // WebAppsClientCreateOrUpdateHybridConnectionSlotResponse contains the response from method WebAppsClient.CreateOrUpdateHybridConnectionSlot. type WebAppsClientCreateOrUpdateHybridConnectionSlotResponse struct { + // Hybrid Connection contract. This is used to configure a Hybrid Connection. HybridConnection } // WebAppsClientCreateOrUpdatePublicCertificateResponse contains the response from method WebAppsClient.CreateOrUpdatePublicCertificate. type WebAppsClientCreateOrUpdatePublicCertificateResponse struct { + // Public certificate object PublicCertificate } // WebAppsClientCreateOrUpdatePublicCertificateSlotResponse contains the response from method WebAppsClient.CreateOrUpdatePublicCertificateSlot. type WebAppsClientCreateOrUpdatePublicCertificateSlotResponse struct { + // Public certificate object PublicCertificate } // WebAppsClientCreateOrUpdateRelayServiceConnectionResponse contains the response from method WebAppsClient.CreateOrUpdateRelayServiceConnection. type WebAppsClientCreateOrUpdateRelayServiceConnectionResponse struct { + // Hybrid Connection for an App Service app. RelayServiceConnectionEntity } // WebAppsClientCreateOrUpdateRelayServiceConnectionSlotResponse contains the response from method WebAppsClient.CreateOrUpdateRelayServiceConnectionSlot. type WebAppsClientCreateOrUpdateRelayServiceConnectionSlotResponse struct { + // Hybrid Connection for an App Service app. RelayServiceConnectionEntity } // WebAppsClientCreateOrUpdateResponse contains the response from method WebAppsClient.BeginCreateOrUpdate. type WebAppsClientCreateOrUpdateResponse struct { + // A web app, a mobile app backend, or an API app. Site } // WebAppsClientCreateOrUpdateSlotResponse contains the response from method WebAppsClient.BeginCreateOrUpdateSlot. type WebAppsClientCreateOrUpdateSlotResponse struct { + // A web app, a mobile app backend, or an API app. Site } // WebAppsClientCreateOrUpdateSourceControlResponse contains the response from method WebAppsClient.BeginCreateOrUpdateSourceControl. type WebAppsClientCreateOrUpdateSourceControlResponse struct { + // Source control configuration for an app. SiteSourceControl } // WebAppsClientCreateOrUpdateSourceControlSlotResponse contains the response from method WebAppsClient.BeginCreateOrUpdateSourceControlSlot. type WebAppsClientCreateOrUpdateSourceControlSlotResponse struct { + // Source control configuration for an app. SiteSourceControl } // WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResponse contains the response from method WebAppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck. type WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResponse struct { + // Swift Virtual Network Contract. This is used to enable the new Swift way of doing virtual network integration. SwiftVirtualNetwork } // WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse contains the response from method WebAppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot. type WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse struct { + // Swift Virtual Network Contract. This is used to enable the new Swift way of doing virtual network integration. SwiftVirtualNetwork } // WebAppsClientCreateOrUpdateVnetConnectionGatewayResponse contains the response from method WebAppsClient.CreateOrUpdateVnetConnectionGateway. type WebAppsClientCreateOrUpdateVnetConnectionGatewayResponse struct { + // The Virtual Network gateway contract. This is used to give the Virtual Network gateway access to the VPN package. VnetGateway } // WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotResponse contains the response from method WebAppsClient.CreateOrUpdateVnetConnectionGatewaySlot. type WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotResponse struct { + // The Virtual Network gateway contract. This is used to give the Virtual Network gateway access to the VPN package. VnetGateway } // WebAppsClientCreateOrUpdateVnetConnectionResponse contains the response from method WebAppsClient.CreateOrUpdateVnetConnection. type WebAppsClientCreateOrUpdateVnetConnectionResponse struct { + // Virtual Network information ARM resource. VnetInfoResource } // WebAppsClientCreateOrUpdateVnetConnectionSlotResponse contains the response from method WebAppsClient.CreateOrUpdateVnetConnectionSlot. type WebAppsClientCreateOrUpdateVnetConnectionSlotResponse struct { + // Virtual Network information ARM resource. VnetInfoResource } @@ -1869,11 +2121,13 @@ type WebAppsClientDeployWorkflowArtifactsSlotResponse struct { // WebAppsClientDiscoverBackupResponse contains the response from method WebAppsClient.DiscoverBackup. type WebAppsClientDiscoverBackupResponse struct { + // Description of a restore request. RestoreRequest } // WebAppsClientDiscoverBackupSlotResponse contains the response from method WebAppsClient.DiscoverBackupSlot. type WebAppsClientDiscoverBackupSlotResponse struct { + // Description of a restore request. RestoreRequest } @@ -1889,11 +2143,13 @@ type WebAppsClientGenerateNewSitePublishingPasswordSlotResponse struct { // WebAppsClientGetAppSettingKeyVaultReferenceResponse contains the response from method WebAppsClient.GetAppSettingKeyVaultReference. type WebAppsClientGetAppSettingKeyVaultReferenceResponse struct { + // Description of site key vault references. APIKVReference } // WebAppsClientGetAppSettingKeyVaultReferenceSlotResponse contains the response from method WebAppsClient.GetAppSettingKeyVaultReferenceSlot. type WebAppsClientGetAppSettingKeyVaultReferenceSlotResponse struct { + // Description of site key vault references. APIKVReference } @@ -1909,71 +2165,85 @@ type WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse struct { // WebAppsClientGetAuthSettingsResponse contains the response from method WebAppsClient.GetAuthSettings. type WebAppsClientGetAuthSettingsResponse struct { + // Configuration settings for the Azure App Service Authentication / Authorization feature. SiteAuthSettings } // WebAppsClientGetAuthSettingsSlotResponse contains the response from method WebAppsClient.GetAuthSettingsSlot. type WebAppsClientGetAuthSettingsSlotResponse struct { + // Configuration settings for the Azure App Service Authentication / Authorization feature. SiteAuthSettings } // WebAppsClientGetAuthSettingsV2Response contains the response from method WebAppsClient.GetAuthSettingsV2. type WebAppsClientGetAuthSettingsV2Response struct { + // Configuration settings for the Azure App Service Authentication / Authorization V2 feature. SiteAuthSettingsV2 } // WebAppsClientGetAuthSettingsV2SlotResponse contains the response from method WebAppsClient.GetAuthSettingsV2Slot. type WebAppsClientGetAuthSettingsV2SlotResponse struct { + // Configuration settings for the Azure App Service Authentication / Authorization V2 feature. SiteAuthSettingsV2 } // WebAppsClientGetAuthSettingsV2WithoutSecretsResponse contains the response from method WebAppsClient.GetAuthSettingsV2WithoutSecrets. type WebAppsClientGetAuthSettingsV2WithoutSecretsResponse struct { + // Configuration settings for the Azure App Service Authentication / Authorization V2 feature. SiteAuthSettingsV2 } // WebAppsClientGetAuthSettingsV2WithoutSecretsSlotResponse contains the response from method WebAppsClient.GetAuthSettingsV2WithoutSecretsSlot. type WebAppsClientGetAuthSettingsV2WithoutSecretsSlotResponse struct { + // Configuration settings for the Azure App Service Authentication / Authorization V2 feature. SiteAuthSettingsV2 } // WebAppsClientGetBackupConfigurationResponse contains the response from method WebAppsClient.GetBackupConfiguration. type WebAppsClientGetBackupConfigurationResponse struct { + // Description of a backup which will be performed. BackupRequest } // WebAppsClientGetBackupConfigurationSlotResponse contains the response from method WebAppsClient.GetBackupConfigurationSlot. type WebAppsClientGetBackupConfigurationSlotResponse struct { + // Description of a backup which will be performed. BackupRequest } // WebAppsClientGetBackupStatusResponse contains the response from method WebAppsClient.GetBackupStatus. type WebAppsClientGetBackupStatusResponse struct { + // Backup description. BackupItem } // WebAppsClientGetBackupStatusSlotResponse contains the response from method WebAppsClient.GetBackupStatusSlot. type WebAppsClientGetBackupStatusSlotResponse struct { + // Backup description. BackupItem } // WebAppsClientGetConfigurationResponse contains the response from method WebAppsClient.GetConfiguration. type WebAppsClientGetConfigurationResponse struct { + // Web app configuration ARM resource. SiteConfigResource } // WebAppsClientGetConfigurationSlotResponse contains the response from method WebAppsClient.GetConfigurationSlot. type WebAppsClientGetConfigurationSlotResponse struct { + // Web app configuration ARM resource. SiteConfigResource } // WebAppsClientGetConfigurationSnapshotResponse contains the response from method WebAppsClient.GetConfigurationSnapshot. type WebAppsClientGetConfigurationSnapshotResponse struct { + // Web app configuration ARM resource. SiteConfigResource } // WebAppsClientGetConfigurationSnapshotSlotResponse contains the response from method WebAppsClient.GetConfigurationSnapshotSlot. type WebAppsClientGetConfigurationSnapshotSlotResponse struct { + // Web app configuration ARM resource. SiteConfigResource } @@ -1991,56 +2261,67 @@ type WebAppsClientGetContainerLogsZipSlotResponse struct { // WebAppsClientGetContinuousWebJobResponse contains the response from method WebAppsClient.GetContinuousWebJob. type WebAppsClientGetContinuousWebJobResponse struct { + // Continuous Web Job Information. ContinuousWebJob } // WebAppsClientGetContinuousWebJobSlotResponse contains the response from method WebAppsClient.GetContinuousWebJobSlot. type WebAppsClientGetContinuousWebJobSlotResponse struct { + // Continuous Web Job Information. ContinuousWebJob } // WebAppsClientGetDeploymentResponse contains the response from method WebAppsClient.GetDeployment. type WebAppsClientGetDeploymentResponse struct { + // User credentials used for publishing activity. Deployment } // WebAppsClientGetDeploymentSlotResponse contains the response from method WebAppsClient.GetDeploymentSlot. type WebAppsClientGetDeploymentSlotResponse struct { + // User credentials used for publishing activity. Deployment } // WebAppsClientGetDiagnosticLogsConfigurationResponse contains the response from method WebAppsClient.GetDiagnosticLogsConfiguration. type WebAppsClientGetDiagnosticLogsConfigurationResponse struct { + // Configuration of App Service site logs. SiteLogsConfig } // WebAppsClientGetDiagnosticLogsConfigurationSlotResponse contains the response from method WebAppsClient.GetDiagnosticLogsConfigurationSlot. type WebAppsClientGetDiagnosticLogsConfigurationSlotResponse struct { + // Configuration of App Service site logs. SiteLogsConfig } // WebAppsClientGetDomainOwnershipIdentifierResponse contains the response from method WebAppsClient.GetDomainOwnershipIdentifier. type WebAppsClientGetDomainOwnershipIdentifierResponse struct { + // A domain specific resource identifier. Identifier } // WebAppsClientGetDomainOwnershipIdentifierSlotResponse contains the response from method WebAppsClient.GetDomainOwnershipIdentifierSlot. type WebAppsClientGetDomainOwnershipIdentifierSlotResponse struct { + // A domain specific resource identifier. Identifier } // WebAppsClientGetFtpAllowedResponse contains the response from method WebAppsClient.GetFtpAllowed. type WebAppsClientGetFtpAllowedResponse struct { + // Publishing Credentials Policies parameters. CsmPublishingCredentialsPoliciesEntity } // WebAppsClientGetFtpAllowedSlotResponse contains the response from method WebAppsClient.GetFtpAllowedSlot. type WebAppsClientGetFtpAllowedSlotResponse struct { + // Publishing Credentials Policies parameters. CsmPublishingCredentialsPoliciesEntity } // WebAppsClientGetFunctionResponse contains the response from method WebAppsClient.GetFunction. type WebAppsClientGetFunctionResponse struct { + // Function information. FunctionEnvelope } @@ -2056,26 +2337,31 @@ type WebAppsClientGetFunctionsAdminTokenSlotResponse struct { // WebAppsClientGetHostNameBindingResponse contains the response from method WebAppsClient.GetHostNameBinding. type WebAppsClientGetHostNameBindingResponse struct { + // A hostname binding object. HostNameBinding } // WebAppsClientGetHostNameBindingSlotResponse contains the response from method WebAppsClient.GetHostNameBindingSlot. type WebAppsClientGetHostNameBindingSlotResponse struct { + // A hostname binding object. HostNameBinding } // WebAppsClientGetHybridConnectionResponse contains the response from method WebAppsClient.GetHybridConnection. type WebAppsClientGetHybridConnectionResponse struct { + // Hybrid Connection contract. This is used to configure a Hybrid Connection. HybridConnection } // WebAppsClientGetHybridConnectionSlotResponse contains the response from method WebAppsClient.GetHybridConnectionSlot. type WebAppsClientGetHybridConnectionSlotResponse struct { + // Hybrid Connection contract. This is used to configure a Hybrid Connection. HybridConnection } // WebAppsClientGetInstanceFunctionSlotResponse contains the response from method WebAppsClient.GetInstanceFunctionSlot. type WebAppsClientGetInstanceFunctionSlotResponse struct { + // Function information. FunctionEnvelope } @@ -2091,21 +2377,25 @@ type WebAppsClientGetInstanceInfoSlotResponse struct { // WebAppsClientGetInstanceMSDeployLogResponse contains the response from method WebAppsClient.GetInstanceMSDeployLog. type WebAppsClientGetInstanceMSDeployLogResponse struct { + // MSDeploy log MSDeployLog } // WebAppsClientGetInstanceMSDeployLogSlotResponse contains the response from method WebAppsClient.GetInstanceMSDeployLogSlot. type WebAppsClientGetInstanceMSDeployLogSlotResponse struct { + // MSDeploy log MSDeployLog } // WebAppsClientGetInstanceMsDeployStatusResponse contains the response from method WebAppsClient.GetInstanceMsDeployStatus. type WebAppsClientGetInstanceMsDeployStatusResponse struct { + // MSDeploy ARM response MSDeployStatus } // WebAppsClientGetInstanceMsDeployStatusSlotResponse contains the response from method WebAppsClient.GetInstanceMsDeployStatusSlot. type WebAppsClientGetInstanceMsDeployStatusSlotResponse struct { + // MSDeploy ARM response MSDeployStatus } @@ -2123,56 +2413,67 @@ type WebAppsClientGetInstanceProcessDumpSlotResponse struct { // WebAppsClientGetInstanceProcessModuleResponse contains the response from method WebAppsClient.GetInstanceProcessModule. type WebAppsClientGetInstanceProcessModuleResponse struct { + // Process Module Information. ProcessModuleInfo } // WebAppsClientGetInstanceProcessModuleSlotResponse contains the response from method WebAppsClient.GetInstanceProcessModuleSlot. type WebAppsClientGetInstanceProcessModuleSlotResponse struct { + // Process Module Information. ProcessModuleInfo } // WebAppsClientGetInstanceProcessResponse contains the response from method WebAppsClient.GetInstanceProcess. type WebAppsClientGetInstanceProcessResponse struct { + // Process Information. ProcessInfo } // WebAppsClientGetInstanceProcessSlotResponse contains the response from method WebAppsClient.GetInstanceProcessSlot. type WebAppsClientGetInstanceProcessSlotResponse struct { + // Process Information. ProcessInfo } // WebAppsClientGetInstanceWorkflowSlotResponse contains the response from method WebAppsClient.GetInstanceWorkflowSlot. type WebAppsClientGetInstanceWorkflowSlotResponse struct { + // Workflow properties definition. WorkflowEnvelope } // WebAppsClientGetMSDeployLogResponse contains the response from method WebAppsClient.GetMSDeployLog. type WebAppsClientGetMSDeployLogResponse struct { + // MSDeploy log MSDeployLog } // WebAppsClientGetMSDeployLogSlotResponse contains the response from method WebAppsClient.GetMSDeployLogSlot. type WebAppsClientGetMSDeployLogSlotResponse struct { + // MSDeploy log MSDeployLog } // WebAppsClientGetMSDeployStatusResponse contains the response from method WebAppsClient.GetMSDeployStatus. type WebAppsClientGetMSDeployStatusResponse struct { + // MSDeploy ARM response MSDeployStatus } // WebAppsClientGetMSDeployStatusSlotResponse contains the response from method WebAppsClient.GetMSDeployStatusSlot. type WebAppsClientGetMSDeployStatusSlotResponse struct { + // MSDeploy ARM response MSDeployStatus } // WebAppsClientGetMigrateMySQLStatusResponse contains the response from method WebAppsClient.GetMigrateMySQLStatus. type WebAppsClientGetMigrateMySQLStatusResponse struct { + // MySQL migration status. MigrateMySQLStatus } // WebAppsClientGetMigrateMySQLStatusSlotResponse contains the response from method WebAppsClient.GetMigrateMySQLStatusSlot. type WebAppsClientGetMigrateMySQLStatusSlotResponse struct { + // MySQL migration status. MigrateMySQLStatus } @@ -2232,21 +2533,25 @@ type WebAppsClientGetOneDeployStatusResponse struct { // WebAppsClientGetPremierAddOnResponse contains the response from method WebAppsClient.GetPremierAddOn. type WebAppsClientGetPremierAddOnResponse struct { + // Premier add-on. PremierAddOn } // WebAppsClientGetPremierAddOnSlotResponse contains the response from method WebAppsClient.GetPremierAddOnSlot. type WebAppsClientGetPremierAddOnSlotResponse struct { + // Premier add-on. PremierAddOn } // WebAppsClientGetPrivateAccessResponse contains the response from method WebAppsClient.GetPrivateAccess. type WebAppsClientGetPrivateAccessResponse struct { + // Description of the parameters of Private Access for a Web Site. PrivateAccess } // WebAppsClientGetPrivateAccessSlotResponse contains the response from method WebAppsClient.GetPrivateAccessSlot. type WebAppsClientGetPrivateAccessSlotResponse struct { + // Description of the parameters of Private Access for a Web Site. PrivateAccess } @@ -2262,21 +2567,25 @@ type WebAppsClientGetPrivateEndpointConnectionListSlotResponse struct { // WebAppsClientGetPrivateEndpointConnectionResponse contains the response from method WebAppsClient.GetPrivateEndpointConnection. type WebAppsClientGetPrivateEndpointConnectionResponse struct { + // Remote Private Endpoint Connection ARM resource. RemotePrivateEndpointConnectionARMResource } // WebAppsClientGetPrivateEndpointConnectionSlotResponse contains the response from method WebAppsClient.GetPrivateEndpointConnectionSlot. type WebAppsClientGetPrivateEndpointConnectionSlotResponse struct { + // Remote Private Endpoint Connection ARM resource. RemotePrivateEndpointConnectionARMResource } // WebAppsClientGetPrivateLinkResourcesResponse contains the response from method WebAppsClient.GetPrivateLinkResources. type WebAppsClientGetPrivateLinkResourcesResponse struct { + // Wrapper for a collection of private link resources PrivateLinkResourcesWrapper } // WebAppsClientGetPrivateLinkResourcesSlotResponse contains the response from method WebAppsClient.GetPrivateLinkResourcesSlot. type WebAppsClientGetPrivateLinkResourcesSlotResponse struct { + // Wrapper for a collection of private link resources PrivateLinkResourcesWrapper } @@ -2294,71 +2603,85 @@ type WebAppsClientGetProcessDumpSlotResponse struct { // WebAppsClientGetProcessModuleResponse contains the response from method WebAppsClient.GetProcessModule. type WebAppsClientGetProcessModuleResponse struct { + // Process Module Information. ProcessModuleInfo } // WebAppsClientGetProcessModuleSlotResponse contains the response from method WebAppsClient.GetProcessModuleSlot. type WebAppsClientGetProcessModuleSlotResponse struct { + // Process Module Information. ProcessModuleInfo } // WebAppsClientGetProcessResponse contains the response from method WebAppsClient.GetProcess. type WebAppsClientGetProcessResponse struct { + // Process Information. ProcessInfo } // WebAppsClientGetProcessSlotResponse contains the response from method WebAppsClient.GetProcessSlot. type WebAppsClientGetProcessSlotResponse struct { + // Process Information. ProcessInfo } // WebAppsClientGetProductionSiteDeploymentStatusResponse contains the response from method WebAppsClient.BeginGetProductionSiteDeploymentStatus. type WebAppsClientGetProductionSiteDeploymentStatusResponse struct { + // Deployment status response payload. CsmDeploymentStatus } // WebAppsClientGetPublicCertificateResponse contains the response from method WebAppsClient.GetPublicCertificate. type WebAppsClientGetPublicCertificateResponse struct { + // Public certificate object PublicCertificate } // WebAppsClientGetPublicCertificateSlotResponse contains the response from method WebAppsClient.GetPublicCertificateSlot. type WebAppsClientGetPublicCertificateSlotResponse struct { + // Public certificate object PublicCertificate } // WebAppsClientGetRelayServiceConnectionResponse contains the response from method WebAppsClient.GetRelayServiceConnection. type WebAppsClientGetRelayServiceConnectionResponse struct { + // Hybrid Connection for an App Service app. RelayServiceConnectionEntity } // WebAppsClientGetRelayServiceConnectionSlotResponse contains the response from method WebAppsClient.GetRelayServiceConnectionSlot. type WebAppsClientGetRelayServiceConnectionSlotResponse struct { + // Hybrid Connection for an App Service app. RelayServiceConnectionEntity } // WebAppsClientGetResponse contains the response from method WebAppsClient.Get. type WebAppsClientGetResponse struct { + // A web app, a mobile app backend, or an API app. Site } // WebAppsClientGetScmAllowedResponse contains the response from method WebAppsClient.GetScmAllowed. type WebAppsClientGetScmAllowedResponse struct { + // Publishing Credentials Policies parameters. CsmPublishingCredentialsPoliciesEntity } // WebAppsClientGetScmAllowedSlotResponse contains the response from method WebAppsClient.GetScmAllowedSlot. type WebAppsClientGetScmAllowedSlotResponse struct { + // Publishing Credentials Policies parameters. CsmPublishingCredentialsPoliciesEntity } // WebAppsClientGetSiteConnectionStringKeyVaultReferenceResponse contains the response from method WebAppsClient.GetSiteConnectionStringKeyVaultReference. type WebAppsClientGetSiteConnectionStringKeyVaultReferenceResponse struct { + // Description of site key vault references. APIKVReference } // WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotResponse contains the response from method WebAppsClient.GetSiteConnectionStringKeyVaultReferenceSlot. type WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotResponse struct { + // Description of site key vault references. APIKVReference } @@ -2374,101 +2697,121 @@ type WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse struct { // WebAppsClientGetSiteExtensionResponse contains the response from method WebAppsClient.GetSiteExtension. type WebAppsClientGetSiteExtensionResponse struct { + // Site Extension Information. SiteExtensionInfo } // WebAppsClientGetSiteExtensionSlotResponse contains the response from method WebAppsClient.GetSiteExtensionSlot. type WebAppsClientGetSiteExtensionSlotResponse struct { + // Site Extension Information. SiteExtensionInfo } // WebAppsClientGetSitePhpErrorLogFlagResponse contains the response from method WebAppsClient.GetSitePhpErrorLogFlag. type WebAppsClientGetSitePhpErrorLogFlagResponse struct { + // Used for getting PHP error logging flag. SitePhpErrorLogFlag } // WebAppsClientGetSitePhpErrorLogFlagSlotResponse contains the response from method WebAppsClient.GetSitePhpErrorLogFlagSlot. type WebAppsClientGetSitePhpErrorLogFlagSlotResponse struct { + // Used for getting PHP error logging flag. SitePhpErrorLogFlag } // WebAppsClientGetSlotResponse contains the response from method WebAppsClient.GetSlot. type WebAppsClientGetSlotResponse struct { + // A web app, a mobile app backend, or an API app. Site } // WebAppsClientGetSlotSiteDeploymentStatusSlotResponse contains the response from method WebAppsClient.BeginGetSlotSiteDeploymentStatusSlot. type WebAppsClientGetSlotSiteDeploymentStatusSlotResponse struct { + // Deployment status response payload. CsmDeploymentStatus } // WebAppsClientGetSourceControlResponse contains the response from method WebAppsClient.GetSourceControl. type WebAppsClientGetSourceControlResponse struct { + // Source control configuration for an app. SiteSourceControl } // WebAppsClientGetSourceControlSlotResponse contains the response from method WebAppsClient.GetSourceControlSlot. type WebAppsClientGetSourceControlSlotResponse struct { + // Source control configuration for an app. SiteSourceControl } // WebAppsClientGetSwiftVirtualNetworkConnectionResponse contains the response from method WebAppsClient.GetSwiftVirtualNetworkConnection. type WebAppsClientGetSwiftVirtualNetworkConnectionResponse struct { + // Swift Virtual Network Contract. This is used to enable the new Swift way of doing virtual network integration. SwiftVirtualNetwork } // WebAppsClientGetSwiftVirtualNetworkConnectionSlotResponse contains the response from method WebAppsClient.GetSwiftVirtualNetworkConnectionSlot. type WebAppsClientGetSwiftVirtualNetworkConnectionSlotResponse struct { + // Swift Virtual Network Contract. This is used to enable the new Swift way of doing virtual network integration. SwiftVirtualNetwork } // WebAppsClientGetTriggeredWebJobHistoryResponse contains the response from method WebAppsClient.GetTriggeredWebJobHistory. type WebAppsClientGetTriggeredWebJobHistoryResponse struct { + // Triggered Web Job History. List of Triggered Web Job Run Information elements. TriggeredJobHistory } // WebAppsClientGetTriggeredWebJobHistorySlotResponse contains the response from method WebAppsClient.GetTriggeredWebJobHistorySlot. type WebAppsClientGetTriggeredWebJobHistorySlotResponse struct { + // Triggered Web Job History. List of Triggered Web Job Run Information elements. TriggeredJobHistory } // WebAppsClientGetTriggeredWebJobResponse contains the response from method WebAppsClient.GetTriggeredWebJob. type WebAppsClientGetTriggeredWebJobResponse struct { + // Triggered Web Job Information. TriggeredWebJob } // WebAppsClientGetTriggeredWebJobSlotResponse contains the response from method WebAppsClient.GetTriggeredWebJobSlot. type WebAppsClientGetTriggeredWebJobSlotResponse struct { + // Triggered Web Job Information. TriggeredWebJob } // WebAppsClientGetVnetConnectionGatewayResponse contains the response from method WebAppsClient.GetVnetConnectionGateway. type WebAppsClientGetVnetConnectionGatewayResponse struct { + // The Virtual Network gateway contract. This is used to give the Virtual Network gateway access to the VPN package. VnetGateway } // WebAppsClientGetVnetConnectionGatewaySlotResponse contains the response from method WebAppsClient.GetVnetConnectionGatewaySlot. type WebAppsClientGetVnetConnectionGatewaySlotResponse struct { + // The Virtual Network gateway contract. This is used to give the Virtual Network gateway access to the VPN package. VnetGateway } // WebAppsClientGetVnetConnectionResponse contains the response from method WebAppsClient.GetVnetConnection. type WebAppsClientGetVnetConnectionResponse struct { + // Virtual Network information ARM resource. VnetInfoResource } // WebAppsClientGetVnetConnectionSlotResponse contains the response from method WebAppsClient.GetVnetConnectionSlot. type WebAppsClientGetVnetConnectionSlotResponse struct { + // Virtual Network information ARM resource. VnetInfoResource } // WebAppsClientGetWebJobResponse contains the response from method WebAppsClient.GetWebJob. type WebAppsClientGetWebJobResponse struct { + // Web Job Information. WebJob } // WebAppsClientGetWebJobSlotResponse contains the response from method WebAppsClient.GetWebJobSlot. type WebAppsClientGetWebJobSlotResponse struct { + // Web Job Information. WebJob } @@ -2486,351 +2829,421 @@ type WebAppsClientGetWebSiteContainerLogsSlotResponse struct { // WebAppsClientGetWorkflowResponse contains the response from method WebAppsClient.GetWorkflow. type WebAppsClientGetWorkflowResponse struct { + // Workflow properties definition. WorkflowEnvelope } // WebAppsClientInstallSiteExtensionResponse contains the response from method WebAppsClient.BeginInstallSiteExtension. type WebAppsClientInstallSiteExtensionResponse struct { + // Site Extension Information. SiteExtensionInfo } // WebAppsClientInstallSiteExtensionSlotResponse contains the response from method WebAppsClient.BeginInstallSiteExtensionSlot. type WebAppsClientInstallSiteExtensionSlotResponse struct { + // Site Extension Information. SiteExtensionInfo } // WebAppsClientIsCloneableResponse contains the response from method WebAppsClient.IsCloneable. type WebAppsClientIsCloneableResponse struct { + // Represents whether or not an app is cloneable. SiteCloneability } // WebAppsClientIsCloneableSlotResponse contains the response from method WebAppsClient.IsCloneableSlot. type WebAppsClientIsCloneableSlotResponse struct { + // Represents whether or not an app is cloneable. SiteCloneability } // WebAppsClientListApplicationSettingsResponse contains the response from method WebAppsClient.ListApplicationSettings. type WebAppsClientListApplicationSettingsResponse struct { + // String dictionary resource. StringDictionary } // WebAppsClientListApplicationSettingsSlotResponse contains the response from method WebAppsClient.ListApplicationSettingsSlot. type WebAppsClientListApplicationSettingsSlotResponse struct { + // String dictionary resource. StringDictionary } // WebAppsClientListAzureStorageAccountsResponse contains the response from method WebAppsClient.ListAzureStorageAccounts. type WebAppsClientListAzureStorageAccountsResponse struct { + // AzureStorageInfo dictionary resource. AzureStoragePropertyDictionaryResource } // WebAppsClientListAzureStorageAccountsSlotResponse contains the response from method WebAppsClient.ListAzureStorageAccountsSlot. type WebAppsClientListAzureStorageAccountsSlotResponse struct { + // AzureStorageInfo dictionary resource. AzureStoragePropertyDictionaryResource } // WebAppsClientListBackupStatusSecretsResponse contains the response from method WebAppsClient.ListBackupStatusSecrets. type WebAppsClientListBackupStatusSecretsResponse struct { + // Backup description. BackupItem } // WebAppsClientListBackupStatusSecretsSlotResponse contains the response from method WebAppsClient.ListBackupStatusSecretsSlot. type WebAppsClientListBackupStatusSecretsSlotResponse struct { + // Backup description. BackupItem } // WebAppsClientListBackupsResponse contains the response from method WebAppsClient.NewListBackupsPager. type WebAppsClientListBackupsResponse struct { + // Collection of backup items. BackupItemCollection } // WebAppsClientListBackupsSlotResponse contains the response from method WebAppsClient.NewListBackupsSlotPager. type WebAppsClientListBackupsSlotResponse struct { + // Collection of backup items. BackupItemCollection } // WebAppsClientListBasicPublishingCredentialsPoliciesResponse contains the response from method WebAppsClient.NewListBasicPublishingCredentialsPoliciesPager. type WebAppsClientListBasicPublishingCredentialsPoliciesResponse struct { + // Publishing Credentials Policies entity collection ARM resource. PublishingCredentialsPoliciesCollection } // WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse contains the response from method WebAppsClient.NewListBasicPublishingCredentialsPoliciesSlotPager. type WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse struct { + // Publishing Credentials Policies entity collection ARM resource. PublishingCredentialsPoliciesCollection } // WebAppsClientListByResourceGroupResponse contains the response from method WebAppsClient.NewListByResourceGroupPager. type WebAppsClientListByResourceGroupResponse struct { + // Collection of App Service apps. WebAppCollection } // WebAppsClientListConfigurationSnapshotInfoResponse contains the response from method WebAppsClient.NewListConfigurationSnapshotInfoPager. type WebAppsClientListConfigurationSnapshotInfoResponse struct { + // Collection of metadata for the app configuration snapshots that can be restored. SiteConfigurationSnapshotInfoCollection } // WebAppsClientListConfigurationSnapshotInfoSlotResponse contains the response from method WebAppsClient.NewListConfigurationSnapshotInfoSlotPager. type WebAppsClientListConfigurationSnapshotInfoSlotResponse struct { + // Collection of metadata for the app configuration snapshots that can be restored. SiteConfigurationSnapshotInfoCollection } // WebAppsClientListConfigurationsResponse contains the response from method WebAppsClient.NewListConfigurationsPager. type WebAppsClientListConfigurationsResponse struct { + // Collection of site configurations. SiteConfigResourceCollection } // WebAppsClientListConfigurationsSlotResponse contains the response from method WebAppsClient.NewListConfigurationsSlotPager. type WebAppsClientListConfigurationsSlotResponse struct { + // Collection of site configurations. SiteConfigResourceCollection } // WebAppsClientListConnectionStringsResponse contains the response from method WebAppsClient.ListConnectionStrings. type WebAppsClientListConnectionStringsResponse struct { + // String dictionary resource. ConnectionStringDictionary } // WebAppsClientListConnectionStringsSlotResponse contains the response from method WebAppsClient.ListConnectionStringsSlot. type WebAppsClientListConnectionStringsSlotResponse struct { + // String dictionary resource. ConnectionStringDictionary } // WebAppsClientListContinuousWebJobsResponse contains the response from method WebAppsClient.NewListContinuousWebJobsPager. type WebAppsClientListContinuousWebJobsResponse struct { + // Collection of Kudu continuous web job information elements. ContinuousWebJobCollection } // WebAppsClientListContinuousWebJobsSlotResponse contains the response from method WebAppsClient.NewListContinuousWebJobsSlotPager. type WebAppsClientListContinuousWebJobsSlotResponse struct { + // Collection of Kudu continuous web job information elements. ContinuousWebJobCollection } // WebAppsClientListDeploymentLogResponse contains the response from method WebAppsClient.ListDeploymentLog. type WebAppsClientListDeploymentLogResponse struct { + // User credentials used for publishing activity. Deployment } // WebAppsClientListDeploymentLogSlotResponse contains the response from method WebAppsClient.ListDeploymentLogSlot. type WebAppsClientListDeploymentLogSlotResponse struct { + // User credentials used for publishing activity. Deployment } // WebAppsClientListDeploymentsResponse contains the response from method WebAppsClient.NewListDeploymentsPager. type WebAppsClientListDeploymentsResponse struct { + // Collection of app deployments. DeploymentCollection } // WebAppsClientListDeploymentsSlotResponse contains the response from method WebAppsClient.NewListDeploymentsSlotPager. type WebAppsClientListDeploymentsSlotResponse struct { + // Collection of app deployments. DeploymentCollection } // WebAppsClientListDomainOwnershipIdentifiersResponse contains the response from method WebAppsClient.NewListDomainOwnershipIdentifiersPager. type WebAppsClientListDomainOwnershipIdentifiersResponse struct { + // Collection of identifiers. IdentifierCollection } // WebAppsClientListDomainOwnershipIdentifiersSlotResponse contains the response from method WebAppsClient.NewListDomainOwnershipIdentifiersSlotPager. type WebAppsClientListDomainOwnershipIdentifiersSlotResponse struct { + // Collection of identifiers. IdentifierCollection } // WebAppsClientListFunctionKeysResponse contains the response from method WebAppsClient.ListFunctionKeys. type WebAppsClientListFunctionKeysResponse struct { + // String dictionary resource. StringDictionary } // WebAppsClientListFunctionKeysSlotResponse contains the response from method WebAppsClient.ListFunctionKeysSlot. type WebAppsClientListFunctionKeysSlotResponse struct { + // String dictionary resource. StringDictionary } // WebAppsClientListFunctionSecretsResponse contains the response from method WebAppsClient.ListFunctionSecrets. type WebAppsClientListFunctionSecretsResponse struct { + // Function secrets. FunctionSecrets } // WebAppsClientListFunctionSecretsSlotResponse contains the response from method WebAppsClient.ListFunctionSecretsSlot. type WebAppsClientListFunctionSecretsSlotResponse struct { + // Function secrets. FunctionSecrets } // WebAppsClientListFunctionsResponse contains the response from method WebAppsClient.NewListFunctionsPager. type WebAppsClientListFunctionsResponse struct { + // Collection of Kudu function information elements. FunctionEnvelopeCollection } // WebAppsClientListHostKeysResponse contains the response from method WebAppsClient.ListHostKeys. type WebAppsClientListHostKeysResponse struct { + // Functions host level keys. HostKeys } // WebAppsClientListHostKeysSlotResponse contains the response from method WebAppsClient.ListHostKeysSlot. type WebAppsClientListHostKeysSlotResponse struct { + // Functions host level keys. HostKeys } // WebAppsClientListHostNameBindingsResponse contains the response from method WebAppsClient.NewListHostNameBindingsPager. type WebAppsClientListHostNameBindingsResponse struct { + // Collection of hostname bindings. HostNameBindingCollection } // WebAppsClientListHostNameBindingsSlotResponse contains the response from method WebAppsClient.NewListHostNameBindingsSlotPager. type WebAppsClientListHostNameBindingsSlotResponse struct { + // Collection of hostname bindings. HostNameBindingCollection } // WebAppsClientListHybridConnectionsResponse contains the response from method WebAppsClient.ListHybridConnections. type WebAppsClientListHybridConnectionsResponse struct { + // Hybrid Connection contract. This is used to configure a Hybrid Connection. HybridConnection } // WebAppsClientListHybridConnectionsSlotResponse contains the response from method WebAppsClient.ListHybridConnectionsSlot. type WebAppsClientListHybridConnectionsSlotResponse struct { + // Hybrid Connection contract. This is used to configure a Hybrid Connection. HybridConnection } // WebAppsClientListInstanceFunctionsSlotResponse contains the response from method WebAppsClient.NewListInstanceFunctionsSlotPager. type WebAppsClientListInstanceFunctionsSlotResponse struct { + // Collection of Kudu function information elements. FunctionEnvelopeCollection } // WebAppsClientListInstanceIdentifiersResponse contains the response from method WebAppsClient.NewListInstanceIdentifiersPager. type WebAppsClientListInstanceIdentifiersResponse struct { + // Collection of app instances. WebAppInstanceStatusCollection } // WebAppsClientListInstanceIdentifiersSlotResponse contains the response from method WebAppsClient.NewListInstanceIdentifiersSlotPager. type WebAppsClientListInstanceIdentifiersSlotResponse struct { + // Collection of app instances. WebAppInstanceStatusCollection } // WebAppsClientListInstanceProcessModulesResponse contains the response from method WebAppsClient.NewListInstanceProcessModulesPager. type WebAppsClientListInstanceProcessModulesResponse struct { + // Collection of Kudu thread information elements. ProcessModuleInfoCollection } // WebAppsClientListInstanceProcessModulesSlotResponse contains the response from method WebAppsClient.NewListInstanceProcessModulesSlotPager. type WebAppsClientListInstanceProcessModulesSlotResponse struct { + // Collection of Kudu thread information elements. ProcessModuleInfoCollection } // WebAppsClientListInstanceProcessThreadsResponse contains the response from method WebAppsClient.NewListInstanceProcessThreadsPager. type WebAppsClientListInstanceProcessThreadsResponse struct { + // Collection of Kudu thread information elements. ProcessThreadInfoCollection } // WebAppsClientListInstanceProcessThreadsSlotResponse contains the response from method WebAppsClient.NewListInstanceProcessThreadsSlotPager. type WebAppsClientListInstanceProcessThreadsSlotResponse struct { + // Collection of Kudu thread information elements. ProcessThreadInfoCollection } // WebAppsClientListInstanceProcessesResponse contains the response from method WebAppsClient.NewListInstanceProcessesPager. type WebAppsClientListInstanceProcessesResponse struct { + // Collection of Kudu process information elements. ProcessInfoCollection } // WebAppsClientListInstanceProcessesSlotResponse contains the response from method WebAppsClient.NewListInstanceProcessesSlotPager. type WebAppsClientListInstanceProcessesSlotResponse struct { + // Collection of Kudu process information elements. ProcessInfoCollection } // WebAppsClientListInstanceWorkflowsSlotResponse contains the response from method WebAppsClient.NewListInstanceWorkflowsSlotPager. type WebAppsClientListInstanceWorkflowsSlotResponse struct { + // Collection of Kudu workflow information elements. WorkflowEnvelopeCollection } // WebAppsClientListMetadataResponse contains the response from method WebAppsClient.ListMetadata. type WebAppsClientListMetadataResponse struct { + // String dictionary resource. StringDictionary } // WebAppsClientListMetadataSlotResponse contains the response from method WebAppsClient.ListMetadataSlot. type WebAppsClientListMetadataSlotResponse struct { + // String dictionary resource. StringDictionary } // WebAppsClientListNetworkFeaturesResponse contains the response from method WebAppsClient.ListNetworkFeatures. type WebAppsClientListNetworkFeaturesResponse struct { + // Full view of network features for an app (presently VNET integration and Hybrid Connections). NetworkFeatures } // WebAppsClientListNetworkFeaturesSlotResponse contains the response from method WebAppsClient.ListNetworkFeaturesSlot. type WebAppsClientListNetworkFeaturesSlotResponse struct { + // Full view of network features for an app (presently VNET integration and Hybrid Connections). NetworkFeatures } // WebAppsClientListPerfMonCountersResponse contains the response from method WebAppsClient.NewListPerfMonCountersPager. type WebAppsClientListPerfMonCountersResponse struct { + // Collection of performance monitor counters. PerfMonCounterCollection } // WebAppsClientListPerfMonCountersSlotResponse contains the response from method WebAppsClient.NewListPerfMonCountersSlotPager. type WebAppsClientListPerfMonCountersSlotResponse struct { + // Collection of performance monitor counters. PerfMonCounterCollection } // WebAppsClientListPremierAddOnsResponse contains the response from method WebAppsClient.ListPremierAddOns. type WebAppsClientListPremierAddOnsResponse struct { + // Premier add-on. PremierAddOn } // WebAppsClientListPremierAddOnsSlotResponse contains the response from method WebAppsClient.ListPremierAddOnsSlot. type WebAppsClientListPremierAddOnsSlotResponse struct { + // Premier add-on. PremierAddOn } // WebAppsClientListProcessModulesResponse contains the response from method WebAppsClient.NewListProcessModulesPager. type WebAppsClientListProcessModulesResponse struct { + // Collection of Kudu thread information elements. ProcessModuleInfoCollection } // WebAppsClientListProcessModulesSlotResponse contains the response from method WebAppsClient.NewListProcessModulesSlotPager. type WebAppsClientListProcessModulesSlotResponse struct { + // Collection of Kudu thread information elements. ProcessModuleInfoCollection } // WebAppsClientListProcessThreadsResponse contains the response from method WebAppsClient.NewListProcessThreadsPager. type WebAppsClientListProcessThreadsResponse struct { + // Collection of Kudu thread information elements. ProcessThreadInfoCollection } // WebAppsClientListProcessThreadsSlotResponse contains the response from method WebAppsClient.NewListProcessThreadsSlotPager. type WebAppsClientListProcessThreadsSlotResponse struct { + // Collection of Kudu thread information elements. ProcessThreadInfoCollection } // WebAppsClientListProcessesResponse contains the response from method WebAppsClient.NewListProcessesPager. type WebAppsClientListProcessesResponse struct { + // Collection of Kudu process information elements. ProcessInfoCollection } // WebAppsClientListProcessesSlotResponse contains the response from method WebAppsClient.NewListProcessesSlotPager. type WebAppsClientListProcessesSlotResponse struct { + // Collection of Kudu process information elements. ProcessInfoCollection } // WebAppsClientListProductionSiteDeploymentStatusesResponse contains the response from method WebAppsClient.NewListProductionSiteDeploymentStatusesPager. type WebAppsClientListProductionSiteDeploymentStatusesResponse struct { + // Deployment status collection ARM resource. CsmDeploymentStatusCollection } // WebAppsClientListPublicCertificatesResponse contains the response from method WebAppsClient.NewListPublicCertificatesPager. type WebAppsClientListPublicCertificatesResponse struct { + // Collection of public certificates PublicCertificateCollection } // WebAppsClientListPublicCertificatesSlotResponse contains the response from method WebAppsClient.NewListPublicCertificatesSlotPager. type WebAppsClientListPublicCertificatesSlotResponse struct { + // Collection of public certificates PublicCertificateCollection } // WebAppsClientListPublishingCredentialsResponse contains the response from method WebAppsClient.BeginListPublishingCredentials. type WebAppsClientListPublishingCredentialsResponse struct { + // User credentials used for publishing activity. User } // WebAppsClientListPublishingCredentialsSlotResponse contains the response from method WebAppsClient.BeginListPublishingCredentialsSlot. type WebAppsClientListPublishingCredentialsSlotResponse struct { + // User credentials used for publishing activity. User } @@ -2848,101 +3261,121 @@ type WebAppsClientListPublishingProfileXMLWithSecretsSlotResponse struct { // WebAppsClientListRelayServiceConnectionsResponse contains the response from method WebAppsClient.ListRelayServiceConnections. type WebAppsClientListRelayServiceConnectionsResponse struct { + // Hybrid Connection for an App Service app. RelayServiceConnectionEntity } // WebAppsClientListRelayServiceConnectionsSlotResponse contains the response from method WebAppsClient.ListRelayServiceConnectionsSlot. type WebAppsClientListRelayServiceConnectionsSlotResponse struct { + // Hybrid Connection for an App Service app. RelayServiceConnectionEntity } // WebAppsClientListResponse contains the response from method WebAppsClient.NewListPager. type WebAppsClientListResponse struct { + // Collection of App Service apps. WebAppCollection } // WebAppsClientListSiteBackupsResponse contains the response from method WebAppsClient.NewListSiteBackupsPager. type WebAppsClientListSiteBackupsResponse struct { + // Collection of backup items. BackupItemCollection } // WebAppsClientListSiteBackupsSlotResponse contains the response from method WebAppsClient.NewListSiteBackupsSlotPager. type WebAppsClientListSiteBackupsSlotResponse struct { + // Collection of backup items. BackupItemCollection } // WebAppsClientListSiteExtensionsResponse contains the response from method WebAppsClient.NewListSiteExtensionsPager. type WebAppsClientListSiteExtensionsResponse struct { + // Collection of Kudu site extension information elements. SiteExtensionInfoCollection } // WebAppsClientListSiteExtensionsSlotResponse contains the response from method WebAppsClient.NewListSiteExtensionsSlotPager. type WebAppsClientListSiteExtensionsSlotResponse struct { + // Collection of Kudu site extension information elements. SiteExtensionInfoCollection } // WebAppsClientListSitePushSettingsResponse contains the response from method WebAppsClient.ListSitePushSettings. type WebAppsClientListSitePushSettingsResponse struct { + // Push settings for the App. PushSettings } // WebAppsClientListSitePushSettingsSlotResponse contains the response from method WebAppsClient.ListSitePushSettingsSlot. type WebAppsClientListSitePushSettingsSlotResponse struct { + // Push settings for the App. PushSettings } // WebAppsClientListSlotConfigurationNamesResponse contains the response from method WebAppsClient.ListSlotConfigurationNames. type WebAppsClientListSlotConfigurationNamesResponse struct { + // Slot Config names azure resource. SlotConfigNamesResource } // WebAppsClientListSlotDifferencesFromProductionResponse contains the response from method WebAppsClient.NewListSlotDifferencesFromProductionPager. type WebAppsClientListSlotDifferencesFromProductionResponse struct { + // Collection of slot differences. SlotDifferenceCollection } // WebAppsClientListSlotDifferencesSlotResponse contains the response from method WebAppsClient.NewListSlotDifferencesSlotPager. type WebAppsClientListSlotDifferencesSlotResponse struct { + // Collection of slot differences. SlotDifferenceCollection } // WebAppsClientListSlotSiteDeploymentStatusesSlotResponse contains the response from method WebAppsClient.NewListSlotSiteDeploymentStatusesSlotPager. type WebAppsClientListSlotSiteDeploymentStatusesSlotResponse struct { + // Deployment status collection ARM resource. CsmDeploymentStatusCollection } // WebAppsClientListSlotsResponse contains the response from method WebAppsClient.NewListSlotsPager. type WebAppsClientListSlotsResponse struct { + // Collection of App Service apps. WebAppCollection } // WebAppsClientListSnapshotsFromDRSecondaryResponse contains the response from method WebAppsClient.NewListSnapshotsFromDRSecondaryPager. type WebAppsClientListSnapshotsFromDRSecondaryResponse struct { + // Collection of snapshots which can be used to revert an app to a previous time. SnapshotCollection } // WebAppsClientListSnapshotsFromDRSecondarySlotResponse contains the response from method WebAppsClient.NewListSnapshotsFromDRSecondarySlotPager. type WebAppsClientListSnapshotsFromDRSecondarySlotResponse struct { + // Collection of snapshots which can be used to revert an app to a previous time. SnapshotCollection } // WebAppsClientListSnapshotsResponse contains the response from method WebAppsClient.NewListSnapshotsPager. type WebAppsClientListSnapshotsResponse struct { + // Collection of snapshots which can be used to revert an app to a previous time. SnapshotCollection } // WebAppsClientListSnapshotsSlotResponse contains the response from method WebAppsClient.NewListSnapshotsSlotPager. type WebAppsClientListSnapshotsSlotResponse struct { + // Collection of snapshots which can be used to revert an app to a previous time. SnapshotCollection } // WebAppsClientListSyncFunctionTriggersResponse contains the response from method WebAppsClient.ListSyncFunctionTriggers. type WebAppsClientListSyncFunctionTriggersResponse struct { + // Function secrets. FunctionSecrets } // WebAppsClientListSyncFunctionTriggersSlotResponse contains the response from method WebAppsClient.ListSyncFunctionTriggersSlot. type WebAppsClientListSyncFunctionTriggersSlotResponse struct { + // Function secrets. FunctionSecrets } @@ -2958,31 +3391,37 @@ type WebAppsClientListSyncStatusSlotResponse struct { // WebAppsClientListTriggeredWebJobHistoryResponse contains the response from method WebAppsClient.NewListTriggeredWebJobHistoryPager. type WebAppsClientListTriggeredWebJobHistoryResponse struct { + // Collection of Kudu continuous web job information elements. TriggeredJobHistoryCollection } // WebAppsClientListTriggeredWebJobHistorySlotResponse contains the response from method WebAppsClient.NewListTriggeredWebJobHistorySlotPager. type WebAppsClientListTriggeredWebJobHistorySlotResponse struct { + // Collection of Kudu continuous web job information elements. TriggeredJobHistoryCollection } // WebAppsClientListTriggeredWebJobsResponse contains the response from method WebAppsClient.NewListTriggeredWebJobsPager. type WebAppsClientListTriggeredWebJobsResponse struct { + // Collection of Kudu continuous web job information elements. TriggeredWebJobCollection } // WebAppsClientListTriggeredWebJobsSlotResponse contains the response from method WebAppsClient.NewListTriggeredWebJobsSlotPager. type WebAppsClientListTriggeredWebJobsSlotResponse struct { + // Collection of Kudu continuous web job information elements. TriggeredWebJobCollection } // WebAppsClientListUsagesResponse contains the response from method WebAppsClient.NewListUsagesPager. type WebAppsClientListUsagesResponse struct { + // Collection of CSM usage quotas. CsmUsageQuotaCollection } // WebAppsClientListUsagesSlotResponse contains the response from method WebAppsClient.NewListUsagesSlotPager. type WebAppsClientListUsagesSlotResponse struct { + // Collection of CSM usage quotas. CsmUsageQuotaCollection } @@ -3000,46 +3439,55 @@ type WebAppsClientListVnetConnectionsSlotResponse struct { // WebAppsClientListWebJobsResponse contains the response from method WebAppsClient.NewListWebJobsPager. type WebAppsClientListWebJobsResponse struct { + // Collection of Kudu web job information elements. WebJobCollection } // WebAppsClientListWebJobsSlotResponse contains the response from method WebAppsClient.NewListWebJobsSlotPager. type WebAppsClientListWebJobsSlotResponse struct { + // Collection of Kudu web job information elements. WebJobCollection } // WebAppsClientListWorkflowsConnectionsResponse contains the response from method WebAppsClient.ListWorkflowsConnections. type WebAppsClientListWorkflowsConnectionsResponse struct { + // Workflow properties definition. WorkflowEnvelope } // WebAppsClientListWorkflowsConnectionsSlotResponse contains the response from method WebAppsClient.ListWorkflowsConnectionsSlot. type WebAppsClientListWorkflowsConnectionsSlotResponse struct { + // Workflow properties definition. WorkflowEnvelope } // WebAppsClientListWorkflowsResponse contains the response from method WebAppsClient.NewListWorkflowsPager. type WebAppsClientListWorkflowsResponse struct { + // Collection of Kudu workflow information elements. WorkflowEnvelopeCollection } // WebAppsClientMigrateMySQLResponse contains the response from method WebAppsClient.BeginMigrateMySQL. type WebAppsClientMigrateMySQLResponse struct { + // An operation on a resource. Operation } // WebAppsClientMigrateStorageResponse contains the response from method WebAppsClient.BeginMigrateStorage. type WebAppsClientMigrateStorageResponse struct { + // Response for a migration of app content request. StorageMigrationResponse } // WebAppsClientPutPrivateAccessVnetResponse contains the response from method WebAppsClient.PutPrivateAccessVnet. type WebAppsClientPutPrivateAccessVnetResponse struct { + // Description of the parameters of Private Access for a Web Site. PrivateAccess } // WebAppsClientPutPrivateAccessVnetSlotResponse contains the response from method WebAppsClient.PutPrivateAccessVnetSlot. type WebAppsClientPutPrivateAccessVnetSlotResponse struct { + // Description of the parameters of Private Access for a Web Site. PrivateAccess } @@ -3279,271 +3727,332 @@ type WebAppsClientSyncRepositorySlotResponse struct { // WebAppsClientUpdateApplicationSettingsResponse contains the response from method WebAppsClient.UpdateApplicationSettings. type WebAppsClientUpdateApplicationSettingsResponse struct { + // String dictionary resource. StringDictionary } // WebAppsClientUpdateApplicationSettingsSlotResponse contains the response from method WebAppsClient.UpdateApplicationSettingsSlot. type WebAppsClientUpdateApplicationSettingsSlotResponse struct { + // String dictionary resource. StringDictionary } // WebAppsClientUpdateAuthSettingsResponse contains the response from method WebAppsClient.UpdateAuthSettings. type WebAppsClientUpdateAuthSettingsResponse struct { + // Configuration settings for the Azure App Service Authentication / Authorization feature. SiteAuthSettings } // WebAppsClientUpdateAuthSettingsSlotResponse contains the response from method WebAppsClient.UpdateAuthSettingsSlot. type WebAppsClientUpdateAuthSettingsSlotResponse struct { + // Configuration settings for the Azure App Service Authentication / Authorization feature. SiteAuthSettings } // WebAppsClientUpdateAuthSettingsV2Response contains the response from method WebAppsClient.UpdateAuthSettingsV2. type WebAppsClientUpdateAuthSettingsV2Response struct { + // Configuration settings for the Azure App Service Authentication / Authorization V2 feature. SiteAuthSettingsV2 } // WebAppsClientUpdateAuthSettingsV2SlotResponse contains the response from method WebAppsClient.UpdateAuthSettingsV2Slot. type WebAppsClientUpdateAuthSettingsV2SlotResponse struct { + // Configuration settings for the Azure App Service Authentication / Authorization V2 feature. SiteAuthSettingsV2 } // WebAppsClientUpdateAzureStorageAccountsResponse contains the response from method WebAppsClient.UpdateAzureStorageAccounts. type WebAppsClientUpdateAzureStorageAccountsResponse struct { + // AzureStorageInfo dictionary resource. AzureStoragePropertyDictionaryResource } // WebAppsClientUpdateAzureStorageAccountsSlotResponse contains the response from method WebAppsClient.UpdateAzureStorageAccountsSlot. type WebAppsClientUpdateAzureStorageAccountsSlotResponse struct { + // AzureStorageInfo dictionary resource. AzureStoragePropertyDictionaryResource } // WebAppsClientUpdateBackupConfigurationResponse contains the response from method WebAppsClient.UpdateBackupConfiguration. type WebAppsClientUpdateBackupConfigurationResponse struct { + // Description of a backup which will be performed. BackupRequest } // WebAppsClientUpdateBackupConfigurationSlotResponse contains the response from method WebAppsClient.UpdateBackupConfigurationSlot. type WebAppsClientUpdateBackupConfigurationSlotResponse struct { + // Description of a backup which will be performed. BackupRequest } // WebAppsClientUpdateConfigurationResponse contains the response from method WebAppsClient.UpdateConfiguration. type WebAppsClientUpdateConfigurationResponse struct { + // Web app configuration ARM resource. SiteConfigResource } // WebAppsClientUpdateConfigurationSlotResponse contains the response from method WebAppsClient.UpdateConfigurationSlot. type WebAppsClientUpdateConfigurationSlotResponse struct { + // Web app configuration ARM resource. SiteConfigResource } // WebAppsClientUpdateConnectionStringsResponse contains the response from method WebAppsClient.UpdateConnectionStrings. type WebAppsClientUpdateConnectionStringsResponse struct { + // String dictionary resource. ConnectionStringDictionary } // WebAppsClientUpdateConnectionStringsSlotResponse contains the response from method WebAppsClient.UpdateConnectionStringsSlot. type WebAppsClientUpdateConnectionStringsSlotResponse struct { + // String dictionary resource. ConnectionStringDictionary } // WebAppsClientUpdateDiagnosticLogsConfigResponse contains the response from method WebAppsClient.UpdateDiagnosticLogsConfig. type WebAppsClientUpdateDiagnosticLogsConfigResponse struct { + // Configuration of App Service site logs. SiteLogsConfig } // WebAppsClientUpdateDiagnosticLogsConfigSlotResponse contains the response from method WebAppsClient.UpdateDiagnosticLogsConfigSlot. type WebAppsClientUpdateDiagnosticLogsConfigSlotResponse struct { + // Configuration of App Service site logs. SiteLogsConfig } // WebAppsClientUpdateDomainOwnershipIdentifierResponse contains the response from method WebAppsClient.UpdateDomainOwnershipIdentifier. type WebAppsClientUpdateDomainOwnershipIdentifierResponse struct { + // A domain specific resource identifier. Identifier } // WebAppsClientUpdateDomainOwnershipIdentifierSlotResponse contains the response from method WebAppsClient.UpdateDomainOwnershipIdentifierSlot. type WebAppsClientUpdateDomainOwnershipIdentifierSlotResponse struct { + // A domain specific resource identifier. Identifier } // WebAppsClientUpdateFtpAllowedResponse contains the response from method WebAppsClient.UpdateFtpAllowed. type WebAppsClientUpdateFtpAllowedResponse struct { + // Publishing Credentials Policies parameters. CsmPublishingCredentialsPoliciesEntity } // WebAppsClientUpdateFtpAllowedSlotResponse contains the response from method WebAppsClient.UpdateFtpAllowedSlot. type WebAppsClientUpdateFtpAllowedSlotResponse struct { + // Publishing Credentials Policies parameters. CsmPublishingCredentialsPoliciesEntity } // WebAppsClientUpdateHybridConnectionResponse contains the response from method WebAppsClient.UpdateHybridConnection. type WebAppsClientUpdateHybridConnectionResponse struct { + // Hybrid Connection contract. This is used to configure a Hybrid Connection. HybridConnection } // WebAppsClientUpdateHybridConnectionSlotResponse contains the response from method WebAppsClient.UpdateHybridConnectionSlot. type WebAppsClientUpdateHybridConnectionSlotResponse struct { + // Hybrid Connection contract. This is used to configure a Hybrid Connection. HybridConnection } // WebAppsClientUpdateMetadataResponse contains the response from method WebAppsClient.UpdateMetadata. type WebAppsClientUpdateMetadataResponse struct { + // String dictionary resource. StringDictionary } // WebAppsClientUpdateMetadataSlotResponse contains the response from method WebAppsClient.UpdateMetadataSlot. type WebAppsClientUpdateMetadataSlotResponse struct { + // String dictionary resource. StringDictionary } // WebAppsClientUpdatePremierAddOnResponse contains the response from method WebAppsClient.UpdatePremierAddOn. type WebAppsClientUpdatePremierAddOnResponse struct { + // Premier add-on. PremierAddOn } // WebAppsClientUpdatePremierAddOnSlotResponse contains the response from method WebAppsClient.UpdatePremierAddOnSlot. type WebAppsClientUpdatePremierAddOnSlotResponse struct { + // Premier add-on. PremierAddOn } // WebAppsClientUpdateRelayServiceConnectionResponse contains the response from method WebAppsClient.UpdateRelayServiceConnection. type WebAppsClientUpdateRelayServiceConnectionResponse struct { + // Hybrid Connection for an App Service app. RelayServiceConnectionEntity } // WebAppsClientUpdateRelayServiceConnectionSlotResponse contains the response from method WebAppsClient.UpdateRelayServiceConnectionSlot. type WebAppsClientUpdateRelayServiceConnectionSlotResponse struct { + // Hybrid Connection for an App Service app. RelayServiceConnectionEntity } // WebAppsClientUpdateResponse contains the response from method WebAppsClient.Update. type WebAppsClientUpdateResponse struct { + // A web app, a mobile app backend, or an API app. Site } // WebAppsClientUpdateScmAllowedResponse contains the response from method WebAppsClient.UpdateScmAllowed. type WebAppsClientUpdateScmAllowedResponse struct { + // Publishing Credentials Policies parameters. CsmPublishingCredentialsPoliciesEntity } // WebAppsClientUpdateScmAllowedSlotResponse contains the response from method WebAppsClient.UpdateScmAllowedSlot. type WebAppsClientUpdateScmAllowedSlotResponse struct { + // Publishing Credentials Policies parameters. CsmPublishingCredentialsPoliciesEntity } // WebAppsClientUpdateSitePushSettingsResponse contains the response from method WebAppsClient.UpdateSitePushSettings. type WebAppsClientUpdateSitePushSettingsResponse struct { + // Push settings for the App. PushSettings } // WebAppsClientUpdateSitePushSettingsSlotResponse contains the response from method WebAppsClient.UpdateSitePushSettingsSlot. type WebAppsClientUpdateSitePushSettingsSlotResponse struct { + // Push settings for the App. PushSettings } // WebAppsClientUpdateSlotConfigurationNamesResponse contains the response from method WebAppsClient.UpdateSlotConfigurationNames. type WebAppsClientUpdateSlotConfigurationNamesResponse struct { + // Slot Config names azure resource. SlotConfigNamesResource } // WebAppsClientUpdateSlotResponse contains the response from method WebAppsClient.UpdateSlot. type WebAppsClientUpdateSlotResponse struct { + // A web app, a mobile app backend, or an API app. Site } // WebAppsClientUpdateSourceControlResponse contains the response from method WebAppsClient.UpdateSourceControl. type WebAppsClientUpdateSourceControlResponse struct { + // Source control configuration for an app. SiteSourceControl } // WebAppsClientUpdateSourceControlSlotResponse contains the response from method WebAppsClient.UpdateSourceControlSlot. type WebAppsClientUpdateSourceControlSlotResponse struct { + // Source control configuration for an app. SiteSourceControl } // WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckResponse contains the response from method WebAppsClient.UpdateSwiftVirtualNetworkConnectionWithCheck. type WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckResponse struct { + // Swift Virtual Network Contract. This is used to enable the new Swift way of doing virtual network integration. SwiftVirtualNetwork } // WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse contains the response from method WebAppsClient.UpdateSwiftVirtualNetworkConnectionWithCheckSlot. type WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse struct { + // Swift Virtual Network Contract. This is used to enable the new Swift way of doing virtual network integration. SwiftVirtualNetwork } // WebAppsClientUpdateVnetConnectionGatewayResponse contains the response from method WebAppsClient.UpdateVnetConnectionGateway. type WebAppsClientUpdateVnetConnectionGatewayResponse struct { + // The Virtual Network gateway contract. This is used to give the Virtual Network gateway access to the VPN package. VnetGateway } // WebAppsClientUpdateVnetConnectionGatewaySlotResponse contains the response from method WebAppsClient.UpdateVnetConnectionGatewaySlot. type WebAppsClientUpdateVnetConnectionGatewaySlotResponse struct { + // The Virtual Network gateway contract. This is used to give the Virtual Network gateway access to the VPN package. VnetGateway } // WebAppsClientUpdateVnetConnectionResponse contains the response from method WebAppsClient.UpdateVnetConnection. type WebAppsClientUpdateVnetConnectionResponse struct { + // Virtual Network information ARM resource. VnetInfoResource } // WebAppsClientUpdateVnetConnectionSlotResponse contains the response from method WebAppsClient.UpdateVnetConnectionSlot. type WebAppsClientUpdateVnetConnectionSlotResponse struct { + // Virtual Network information ARM resource. VnetInfoResource } // WebSiteManagementClientCheckNameAvailabilityResponse contains the response from method WebSiteManagementClient.CheckNameAvailability. type WebSiteManagementClientCheckNameAvailabilityResponse struct { + // Information regarding availability of a resource name. ResourceNameAvailability } // WebSiteManagementClientGetPublishingUserResponse contains the response from method WebSiteManagementClient.GetPublishingUser. type WebSiteManagementClientGetPublishingUserResponse struct { + // User credentials used for publishing activity. User } // WebSiteManagementClientGetSourceControlResponse contains the response from method WebSiteManagementClient.GetSourceControl. type WebSiteManagementClientGetSourceControlResponse struct { + // The source control OAuth token. SourceControl } // WebSiteManagementClientGetSubscriptionDeploymentLocationsResponse contains the response from method WebSiteManagementClient.GetSubscriptionDeploymentLocations. type WebSiteManagementClientGetSubscriptionDeploymentLocationsResponse struct { + // List of available locations (regions or App Service Environments) for + // deployment of App Service resources. DeploymentLocations } +// WebSiteManagementClientListAseRegionsResponse contains the response from method WebSiteManagementClient.NewListAseRegionsPager. +type WebSiteManagementClientListAseRegionsResponse struct { + // Collection of ASE regions. + AseRegionCollection +} + // WebSiteManagementClientListBillingMetersResponse contains the response from method WebSiteManagementClient.NewListBillingMetersPager. type WebSiteManagementClientListBillingMetersResponse struct { + // Collection of Billing Meters BillingMeterCollection } // WebSiteManagementClientListCustomHostNameSitesResponse contains the response from method WebSiteManagementClient.NewListCustomHostNameSitesPager. type WebSiteManagementClientListCustomHostNameSitesResponse struct { + // Collection of custom hostname sites CustomHostnameSitesCollection } // WebSiteManagementClientListGeoRegionsResponse contains the response from method WebSiteManagementClient.NewListGeoRegionsPager. type WebSiteManagementClientListGeoRegionsResponse struct { + // Collection of geographical regions. GeoRegionCollection } // WebSiteManagementClientListPremierAddOnOffersResponse contains the response from method WebSiteManagementClient.NewListPremierAddOnOffersPager. type WebSiteManagementClientListPremierAddOnOffersResponse struct { + // Collection of premier add-on offers. PremierAddOnOfferCollection } // WebSiteManagementClientListSKUsResponse contains the response from method WebSiteManagementClient.ListSKUs. type WebSiteManagementClientListSKUsResponse struct { + // Collection of SKU information. SKUInfos } // WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse contains the response from method WebSiteManagementClient.NewListSiteIdentifiersAssignedToHostNamePager. type WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse struct { + // Collection of identifiers. IdentifierCollection } // WebSiteManagementClientListSourceControlsResponse contains the response from method WebSiteManagementClient.NewListSourceControlsPager. type WebSiteManagementClientListSourceControlsResponse struct { + // Collection of source controls. SourceControlCollection } @@ -3554,11 +4063,13 @@ type WebSiteManagementClientMoveResponse struct { // WebSiteManagementClientUpdatePublishingUserResponse contains the response from method WebSiteManagementClient.UpdatePublishingUser. type WebSiteManagementClientUpdatePublishingUserResponse struct { + // User credentials used for publishing activity. User } // WebSiteManagementClientUpdateSourceControlResponse contains the response from method WebSiteManagementClient.UpdateSourceControl. type WebSiteManagementClientUpdateSourceControlResponse struct { + // The source control OAuth token. SourceControl } @@ -3569,61 +4080,73 @@ type WebSiteManagementClientValidateMoveResponse struct { // WebSiteManagementClientValidateResponse contains the response from method WebSiteManagementClient.Validate. type WebSiteManagementClientValidateResponse struct { + // Describes the result of resource validation. ValidateResponse } // WebSiteManagementClientVerifyHostingEnvironmentVnetResponse contains the response from method WebSiteManagementClient.VerifyHostingEnvironmentVnet. type WebSiteManagementClientVerifyHostingEnvironmentVnetResponse struct { + // A class that describes the reason for a validation failure. VnetValidationFailureDetails } // WorkflowRunActionRepetitionsClientGetResponse contains the response from method WorkflowRunActionRepetitionsClient.Get. type WorkflowRunActionRepetitionsClientGetResponse struct { + // The workflow run action repetition definition. WorkflowRunActionRepetitionDefinition } // WorkflowRunActionRepetitionsClientListExpressionTracesResponse contains the response from method WorkflowRunActionRepetitionsClient.NewListExpressionTracesPager. type WorkflowRunActionRepetitionsClientListExpressionTracesResponse struct { + // The expression traces. ExpressionTraces } // WorkflowRunActionRepetitionsClientListResponse contains the response from method WorkflowRunActionRepetitionsClient.NewListPager. type WorkflowRunActionRepetitionsClientListResponse struct { + // A collection of workflow run action repetitions. WorkflowRunActionRepetitionDefinitionCollection } // WorkflowRunActionRepetitionsRequestHistoriesClientGetResponse contains the response from method WorkflowRunActionRepetitionsRequestHistoriesClient.Get. type WorkflowRunActionRepetitionsRequestHistoriesClientGetResponse struct { + // The request history. RequestHistory } // WorkflowRunActionRepetitionsRequestHistoriesClientListResponse contains the response from method WorkflowRunActionRepetitionsRequestHistoriesClient.NewListPager. type WorkflowRunActionRepetitionsRequestHistoriesClientListResponse struct { + // The list of workflow request histories. RequestHistoryListResult } // WorkflowRunActionScopeRepetitionsClientGetResponse contains the response from method WorkflowRunActionScopeRepetitionsClient.Get. type WorkflowRunActionScopeRepetitionsClientGetResponse struct { + // The workflow run action repetition definition. WorkflowRunActionRepetitionDefinition } // WorkflowRunActionScopeRepetitionsClientListResponse contains the response from method WorkflowRunActionScopeRepetitionsClient.NewListPager. type WorkflowRunActionScopeRepetitionsClientListResponse struct { + // A collection of workflow run action repetitions. WorkflowRunActionRepetitionDefinitionCollection } // WorkflowRunActionsClientGetResponse contains the response from method WorkflowRunActionsClient.Get. type WorkflowRunActionsClientGetResponse struct { + // The workflow run action. WorkflowRunAction } // WorkflowRunActionsClientListExpressionTracesResponse contains the response from method WorkflowRunActionsClient.NewListExpressionTracesPager. type WorkflowRunActionsClientListExpressionTracesResponse struct { + // The expression traces. ExpressionTraces } // WorkflowRunActionsClientListResponse contains the response from method WorkflowRunActionsClient.NewListPager. type WorkflowRunActionsClientListResponse struct { + // The list of workflow run actions. WorkflowRunActionListResult } @@ -3634,21 +4157,25 @@ type WorkflowRunsClientCancelResponse struct { // WorkflowRunsClientGetResponse contains the response from method WorkflowRunsClient.Get. type WorkflowRunsClientGetResponse struct { + // The workflow run. WorkflowRun } // WorkflowRunsClientListResponse contains the response from method WorkflowRunsClient.NewListPager. type WorkflowRunsClientListResponse struct { + // The list of workflow runs. WorkflowRunListResult } // WorkflowTriggerHistoriesClientGetResponse contains the response from method WorkflowTriggerHistoriesClient.Get. type WorkflowTriggerHistoriesClientGetResponse struct { + // The workflow trigger history. WorkflowTriggerHistory } // WorkflowTriggerHistoriesClientListResponse contains the response from method WorkflowTriggerHistoriesClient.NewListPager. type WorkflowTriggerHistoriesClientListResponse struct { + // The list of workflow trigger histories. WorkflowTriggerHistoryListResult } @@ -3659,21 +4186,25 @@ type WorkflowTriggerHistoriesClientResubmitResponse struct { // WorkflowTriggersClientGetResponse contains the response from method WorkflowTriggersClient.Get. type WorkflowTriggersClientGetResponse struct { + // The workflow trigger. WorkflowTrigger } // WorkflowTriggersClientGetSchemaJSONResponse contains the response from method WorkflowTriggersClient.GetSchemaJSON. type WorkflowTriggersClientGetSchemaJSONResponse struct { + // The JSON schema. JSONSchema } // WorkflowTriggersClientListCallbackURLResponse contains the response from method WorkflowTriggersClient.ListCallbackURL. type WorkflowTriggersClientListCallbackURLResponse struct { + // The workflow trigger callback URL. WorkflowTriggerCallbackURL } // WorkflowTriggersClientListResponse contains the response from method WorkflowTriggersClient.NewListPager. type WorkflowTriggersClientListResponse struct { + // The list of workflow triggers. WorkflowTriggerListResult } @@ -3684,11 +4215,13 @@ type WorkflowTriggersClientRunResponse struct { // WorkflowVersionsClientGetResponse contains the response from method WorkflowVersionsClient.Get. type WorkflowVersionsClientGetResponse struct { + // The workflow version. WorkflowVersion } // WorkflowVersionsClientListResponse contains the response from method WorkflowVersionsClient.NewListPager. type WorkflowVersionsClientListResponse struct { + // The list of workflow versions. WorkflowVersionListResult } diff --git a/sdk/resourcemanager/appservice/armappservice/staticsites_client.go b/sdk/resourcemanager/appservice/armappservice/staticsites_client.go index f6ead40b34ed..76f15824922b 100644 --- a/sdk/resourcemanager/appservice/armappservice/staticsites_client.go +++ b/sdk/resourcemanager/appservice/armappservice/staticsites_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappservice @@ -34,7 +33,7 @@ type StaticSitesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewStaticSitesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StaticSitesClient, error) { - cl, err := arm.NewClient(moduleName+".StaticSitesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,7 +47,7 @@ func NewStaticSitesClient(subscriptionID string, credential azcore.TokenCredenti // BeginApproveOrRejectPrivateEndpointConnection - Description for Approves or rejects a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - privateEndpointConnectionName - Name of the private endpoint connection. @@ -61,29 +60,40 @@ func (client *StaticSitesClient) BeginApproveOrRejectPrivateEndpointConnection(c if err != nil { return nil, err } - return runtime.NewPoller[StaticSitesClientApproveOrRejectPrivateEndpointConnectionResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StaticSitesClientApproveOrRejectPrivateEndpointConnectionResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[StaticSitesClientApproveOrRejectPrivateEndpointConnectionResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StaticSitesClientApproveOrRejectPrivateEndpointConnectionResponse]{ + Tracer: client.internal.Tracer(), + }) } } // ApproveOrRejectPrivateEndpointConnection - Description for Approves or rejects a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *StaticSitesClient) approveOrRejectPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper PrivateLinkConnectionApprovalRequestResource, options *StaticSitesClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*http.Response, error) { + var err error + const operationName = "StaticSitesClient.BeginApproveOrRejectPrivateEndpointConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.approveOrRejectPrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // approveOrRejectPrivateEndpointConnectionCreateRequest creates the ApproveOrRejectPrivateEndpointConnection request. @@ -110,16 +120,19 @@ func (client *StaticSitesClient) approveOrRejectPrivateEndpointConnectionCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, privateEndpointWrapper) + if err := runtime.MarshalAsJSON(req, privateEndpointWrapper); err != nil { + return nil, err + } + return req, nil } // CreateOrUpdateBasicAuth - Description for Adds or updates basic auth for a static site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - basicAuthName - name of the basic auth entry. @@ -127,18 +140,25 @@ func (client *StaticSitesClient) approveOrRejectPrivateEndpointConnectionCreateR // - options - StaticSitesClientCreateOrUpdateBasicAuthOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateBasicAuth // method. func (client *StaticSitesClient) CreateOrUpdateBasicAuth(ctx context.Context, resourceGroupName string, name string, basicAuthName BasicAuthName, basicAuthEnvelope StaticSiteBasicAuthPropertiesARMResource, options *StaticSitesClientCreateOrUpdateBasicAuthOptions) (StaticSitesClientCreateOrUpdateBasicAuthResponse, error) { + var err error + const operationName = "StaticSitesClient.CreateOrUpdateBasicAuth" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateBasicAuthCreateRequest(ctx, resourceGroupName, name, basicAuthName, basicAuthEnvelope, options) if err != nil { return StaticSitesClientCreateOrUpdateBasicAuthResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientCreateOrUpdateBasicAuthResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientCreateOrUpdateBasicAuthResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientCreateOrUpdateBasicAuthResponse{}, err } - return client.createOrUpdateBasicAuthHandleResponse(resp) + resp, err := client.createOrUpdateBasicAuthHandleResponse(httpResp) + return resp, err } // createOrUpdateBasicAuthCreateRequest creates the CreateOrUpdateBasicAuth request. @@ -165,10 +185,13 @@ func (client *StaticSitesClient) createOrUpdateBasicAuthCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, basicAuthEnvelope) + if err := runtime.MarshalAsJSON(req, basicAuthEnvelope); err != nil { + return nil, err + } + return req, nil } // createOrUpdateBasicAuthHandleResponse handles the CreateOrUpdateBasicAuth response. @@ -183,7 +206,7 @@ func (client *StaticSitesClient) createOrUpdateBasicAuthHandleResponse(resp *htt // CreateOrUpdateBuildDatabaseConnection - Description for Create or update a database connection for a static site build // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site // - environmentName - The stage site identifier. @@ -192,18 +215,25 @@ func (client *StaticSitesClient) createOrUpdateBasicAuthHandleResponse(resp *htt // - options - StaticSitesClientCreateOrUpdateBuildDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateBuildDatabaseConnection // method. func (client *StaticSitesClient) CreateOrUpdateBuildDatabaseConnection(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string, databaseConnectionRequestEnvelope DatabaseConnection, options *StaticSitesClientCreateOrUpdateBuildDatabaseConnectionOptions) (StaticSitesClientCreateOrUpdateBuildDatabaseConnectionResponse, error) { + var err error + const operationName = "StaticSitesClient.CreateOrUpdateBuildDatabaseConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateBuildDatabaseConnectionCreateRequest(ctx, resourceGroupName, name, environmentName, databaseConnectionName, databaseConnectionRequestEnvelope, options) if err != nil { return StaticSitesClientCreateOrUpdateBuildDatabaseConnectionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientCreateOrUpdateBuildDatabaseConnectionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientCreateOrUpdateBuildDatabaseConnectionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientCreateOrUpdateBuildDatabaseConnectionResponse{}, err } - return client.createOrUpdateBuildDatabaseConnectionHandleResponse(resp) + resp, err := client.createOrUpdateBuildDatabaseConnectionHandleResponse(httpResp) + return resp, err } // createOrUpdateBuildDatabaseConnectionCreateRequest creates the CreateOrUpdateBuildDatabaseConnection request. @@ -234,10 +264,13 @@ func (client *StaticSitesClient) createOrUpdateBuildDatabaseConnectionCreateRequ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, databaseConnectionRequestEnvelope) + if err := runtime.MarshalAsJSON(req, databaseConnectionRequestEnvelope); err != nil { + return nil, err + } + return req, nil } // createOrUpdateBuildDatabaseConnectionHandleResponse handles the CreateOrUpdateBuildDatabaseConnection response. @@ -252,7 +285,7 @@ func (client *StaticSitesClient) createOrUpdateBuildDatabaseConnectionHandleResp // CreateOrUpdateDatabaseConnection - Description for Create or update a database connection for a static site // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site // - databaseConnectionName - Name of the database connection. @@ -260,18 +293,25 @@ func (client *StaticSitesClient) createOrUpdateBuildDatabaseConnectionHandleResp // - options - StaticSitesClientCreateOrUpdateDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateDatabaseConnection // method. func (client *StaticSitesClient) CreateOrUpdateDatabaseConnection(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string, databaseConnectionRequestEnvelope DatabaseConnection, options *StaticSitesClientCreateOrUpdateDatabaseConnectionOptions) (StaticSitesClientCreateOrUpdateDatabaseConnectionResponse, error) { + var err error + const operationName = "StaticSitesClient.CreateOrUpdateDatabaseConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateDatabaseConnectionCreateRequest(ctx, resourceGroupName, name, databaseConnectionName, databaseConnectionRequestEnvelope, options) if err != nil { return StaticSitesClientCreateOrUpdateDatabaseConnectionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientCreateOrUpdateDatabaseConnectionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientCreateOrUpdateDatabaseConnectionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientCreateOrUpdateDatabaseConnectionResponse{}, err } - return client.createOrUpdateDatabaseConnectionHandleResponse(resp) + resp, err := client.createOrUpdateDatabaseConnectionHandleResponse(httpResp) + return resp, err } // createOrUpdateDatabaseConnectionCreateRequest creates the CreateOrUpdateDatabaseConnection request. @@ -298,10 +338,13 @@ func (client *StaticSitesClient) createOrUpdateDatabaseConnectionCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, databaseConnectionRequestEnvelope) + if err := runtime.MarshalAsJSON(req, databaseConnectionRequestEnvelope); err != nil { + return nil, err + } + return req, nil } // createOrUpdateDatabaseConnectionHandleResponse handles the CreateOrUpdateDatabaseConnection response. @@ -317,7 +360,7 @@ func (client *StaticSitesClient) createOrUpdateDatabaseConnectionHandleResponse( // existing static site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site to create or update. // - staticSiteEnvelope - A JSON representation of the staticsite properties. See example. @@ -329,9 +372,14 @@ func (client *StaticSitesClient) BeginCreateOrUpdateStaticSite(ctx context.Conte if err != nil { return nil, err } - return runtime.NewPoller[StaticSitesClientCreateOrUpdateStaticSiteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StaticSitesClientCreateOrUpdateStaticSiteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[StaticSitesClientCreateOrUpdateStaticSiteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StaticSitesClientCreateOrUpdateStaticSiteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -339,20 +387,26 @@ func (client *StaticSitesClient) BeginCreateOrUpdateStaticSite(ctx context.Conte // static site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *StaticSitesClient) createOrUpdateStaticSite(ctx context.Context, resourceGroupName string, name string, staticSiteEnvelope StaticSiteARMResource, options *StaticSitesClientBeginCreateOrUpdateStaticSiteOptions) (*http.Response, error) { + var err error + const operationName = "StaticSitesClient.BeginCreateOrUpdateStaticSite" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateStaticSiteCreateRequest(ctx, resourceGroupName, name, staticSiteEnvelope, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateStaticSiteCreateRequest creates the CreateOrUpdateStaticSite request. @@ -375,34 +429,44 @@ func (client *StaticSitesClient) createOrUpdateStaticSiteCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, staticSiteEnvelope) + if err := runtime.MarshalAsJSON(req, staticSiteEnvelope); err != nil { + return nil, err + } + return req, nil } // CreateOrUpdateStaticSiteAppSettings - Description for Creates or updates the app settings of a static site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - appSettings - The dictionary containing the static site app settings to update. // - options - StaticSitesClientCreateOrUpdateStaticSiteAppSettingsOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateStaticSiteAppSettings // method. func (client *StaticSitesClient) CreateOrUpdateStaticSiteAppSettings(ctx context.Context, resourceGroupName string, name string, appSettings StringDictionary, options *StaticSitesClientCreateOrUpdateStaticSiteAppSettingsOptions) (StaticSitesClientCreateOrUpdateStaticSiteAppSettingsResponse, error) { + var err error + const operationName = "StaticSitesClient.CreateOrUpdateStaticSiteAppSettings" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateStaticSiteAppSettingsCreateRequest(ctx, resourceGroupName, name, appSettings, options) if err != nil { return StaticSitesClientCreateOrUpdateStaticSiteAppSettingsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientCreateOrUpdateStaticSiteAppSettingsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientCreateOrUpdateStaticSiteAppSettingsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientCreateOrUpdateStaticSiteAppSettingsResponse{}, err } - return client.createOrUpdateStaticSiteAppSettingsHandleResponse(resp) + resp, err := client.createOrUpdateStaticSiteAppSettingsHandleResponse(httpResp) + return resp, err } // createOrUpdateStaticSiteAppSettingsCreateRequest creates the CreateOrUpdateStaticSiteAppSettings request. @@ -425,10 +489,13 @@ func (client *StaticSitesClient) createOrUpdateStaticSiteAppSettingsCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, appSettings) + if err := runtime.MarshalAsJSON(req, appSettings); err != nil { + return nil, err + } + return req, nil } // createOrUpdateStaticSiteAppSettingsHandleResponse handles the CreateOrUpdateStaticSiteAppSettings response. @@ -443,7 +510,7 @@ func (client *StaticSitesClient) createOrUpdateStaticSiteAppSettingsHandleRespon // CreateOrUpdateStaticSiteBuildAppSettings - Description for Creates or updates the app settings of a static site build. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - environmentName - The stage site identifier. @@ -451,18 +518,25 @@ func (client *StaticSitesClient) createOrUpdateStaticSiteAppSettingsHandleRespon // - options - StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsOptions contains the optional parameters for the StaticSitesClient.CreateOrUpdateStaticSiteBuildAppSettings // method. func (client *StaticSitesClient) CreateOrUpdateStaticSiteBuildAppSettings(ctx context.Context, resourceGroupName string, name string, environmentName string, appSettings StringDictionary, options *StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsOptions) (StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsResponse, error) { + var err error + const operationName = "StaticSitesClient.CreateOrUpdateStaticSiteBuildAppSettings" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateStaticSiteBuildAppSettingsCreateRequest(ctx, resourceGroupName, name, environmentName, appSettings, options) if err != nil { return StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientCreateOrUpdateStaticSiteBuildAppSettingsResponse{}, err } - return client.createOrUpdateStaticSiteBuildAppSettingsHandleResponse(resp) + resp, err := client.createOrUpdateStaticSiteBuildAppSettingsHandleResponse(httpResp) + return resp, err } // createOrUpdateStaticSiteBuildAppSettingsCreateRequest creates the CreateOrUpdateStaticSiteBuildAppSettings request. @@ -489,10 +563,13 @@ func (client *StaticSitesClient) createOrUpdateStaticSiteBuildAppSettingsCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, appSettings) + if err := runtime.MarshalAsJSON(req, appSettings); err != nil { + return nil, err + } + return req, nil } // createOrUpdateStaticSiteBuildAppSettingsHandleResponse handles the CreateOrUpdateStaticSiteBuildAppSettings response. @@ -508,7 +585,7 @@ func (client *StaticSitesClient) createOrUpdateStaticSiteBuildAppSettingsHandleR // site build. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - environmentName - The stage site identifier. @@ -516,18 +593,25 @@ func (client *StaticSitesClient) createOrUpdateStaticSiteBuildAppSettingsHandleR // - options - StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsOptions contains the optional parameters for // the StaticSitesClient.CreateOrUpdateStaticSiteBuildFunctionAppSettings method. func (client *StaticSitesClient) CreateOrUpdateStaticSiteBuildFunctionAppSettings(ctx context.Context, resourceGroupName string, name string, environmentName string, appSettings StringDictionary, options *StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsOptions) (StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsResponse, error) { + var err error + const operationName = "StaticSitesClient.CreateOrUpdateStaticSiteBuildFunctionAppSettings" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateStaticSiteBuildFunctionAppSettingsCreateRequest(ctx, resourceGroupName, name, environmentName, appSettings, options) if err != nil { return StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientCreateOrUpdateStaticSiteBuildFunctionAppSettingsResponse{}, err } - return client.createOrUpdateStaticSiteBuildFunctionAppSettingsHandleResponse(resp) + resp, err := client.createOrUpdateStaticSiteBuildFunctionAppSettingsHandleResponse(httpResp) + return resp, err } // createOrUpdateStaticSiteBuildFunctionAppSettingsCreateRequest creates the CreateOrUpdateStaticSiteBuildFunctionAppSettings request. @@ -554,10 +638,13 @@ func (client *StaticSitesClient) createOrUpdateStaticSiteBuildFunctionAppSetting return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, appSettings) + if err := runtime.MarshalAsJSON(req, appSettings); err != nil { + return nil, err + } + return req, nil } // createOrUpdateStaticSiteBuildFunctionAppSettingsHandleResponse handles the CreateOrUpdateStaticSiteBuildFunctionAppSettings response. @@ -573,7 +660,7 @@ func (client *StaticSitesClient) createOrUpdateStaticSiteBuildFunctionAppSetting // group and static site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - domainName - The custom domain to create. @@ -587,9 +674,14 @@ func (client *StaticSitesClient) BeginCreateOrUpdateStaticSiteCustomDomain(ctx c if err != nil { return nil, err } - return runtime.NewPoller[StaticSitesClientCreateOrUpdateStaticSiteCustomDomainResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StaticSitesClientCreateOrUpdateStaticSiteCustomDomainResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[StaticSitesClientCreateOrUpdateStaticSiteCustomDomainResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StaticSitesClientCreateOrUpdateStaticSiteCustomDomainResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -597,20 +689,26 @@ func (client *StaticSitesClient) BeginCreateOrUpdateStaticSiteCustomDomain(ctx c // group and static site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *StaticSitesClient) createOrUpdateStaticSiteCustomDomain(ctx context.Context, resourceGroupName string, name string, domainName string, staticSiteCustomDomainRequestPropertiesEnvelope StaticSiteCustomDomainRequestPropertiesARMResource, options *StaticSitesClientBeginCreateOrUpdateStaticSiteCustomDomainOptions) (*http.Response, error) { + var err error + const operationName = "StaticSitesClient.BeginCreateOrUpdateStaticSiteCustomDomain" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateStaticSiteCustomDomainCreateRequest(ctx, resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateStaticSiteCustomDomainCreateRequest creates the CreateOrUpdateStaticSiteCustomDomain request. @@ -637,35 +735,45 @@ func (client *StaticSitesClient) createOrUpdateStaticSiteCustomDomainCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, staticSiteCustomDomainRequestPropertiesEnvelope) + if err := runtime.MarshalAsJSON(req, staticSiteCustomDomainRequestPropertiesEnvelope); err != nil { + return nil, err + } + return req, nil } // CreateOrUpdateStaticSiteFunctionAppSettings - Description for Creates or updates the function app settings of a static // site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - appSettings - The dictionary containing the static site function app settings to update. // - options - StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsOptions contains the optional parameters for the // StaticSitesClient.CreateOrUpdateStaticSiteFunctionAppSettings method. func (client *StaticSitesClient) CreateOrUpdateStaticSiteFunctionAppSettings(ctx context.Context, resourceGroupName string, name string, appSettings StringDictionary, options *StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsOptions) (StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsResponse, error) { + var err error + const operationName = "StaticSitesClient.CreateOrUpdateStaticSiteFunctionAppSettings" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateStaticSiteFunctionAppSettingsCreateRequest(ctx, resourceGroupName, name, appSettings, options) if err != nil { return StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientCreateOrUpdateStaticSiteFunctionAppSettingsResponse{}, err } - return client.createOrUpdateStaticSiteFunctionAppSettingsHandleResponse(resp) + resp, err := client.createOrUpdateStaticSiteFunctionAppSettingsHandleResponse(httpResp) + return resp, err } // createOrUpdateStaticSiteFunctionAppSettingsCreateRequest creates the CreateOrUpdateStaticSiteFunctionAppSettings request. @@ -688,10 +796,13 @@ func (client *StaticSitesClient) createOrUpdateStaticSiteFunctionAppSettingsCrea return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, appSettings) + if err := runtime.MarshalAsJSON(req, appSettings); err != nil { + return nil, err + } + return req, nil } // createOrUpdateStaticSiteFunctionAppSettingsHandleResponse handles the CreateOrUpdateStaticSiteFunctionAppSettings response. @@ -706,24 +817,31 @@ func (client *StaticSitesClient) createOrUpdateStaticSiteFunctionAppSettingsHand // CreateUserRolesInvitationLink - Description for Creates an invitation link for a user with the role // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - options - StaticSitesClientCreateUserRolesInvitationLinkOptions contains the optional parameters for the StaticSitesClient.CreateUserRolesInvitationLink // method. func (client *StaticSitesClient) CreateUserRolesInvitationLink(ctx context.Context, resourceGroupName string, name string, staticSiteUserRolesInvitationEnvelope StaticSiteUserInvitationRequestResource, options *StaticSitesClientCreateUserRolesInvitationLinkOptions) (StaticSitesClientCreateUserRolesInvitationLinkResponse, error) { + var err error + const operationName = "StaticSitesClient.CreateUserRolesInvitationLink" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createUserRolesInvitationLinkCreateRequest(ctx, resourceGroupName, name, staticSiteUserRolesInvitationEnvelope, options) if err != nil { return StaticSitesClientCreateUserRolesInvitationLinkResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientCreateUserRolesInvitationLinkResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientCreateUserRolesInvitationLinkResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientCreateUserRolesInvitationLinkResponse{}, err } - return client.createUserRolesInvitationLinkHandleResponse(resp) + resp, err := client.createUserRolesInvitationLinkHandleResponse(httpResp) + return resp, err } // createUserRolesInvitationLinkCreateRequest creates the CreateUserRolesInvitationLink request. @@ -746,10 +864,13 @@ func (client *StaticSitesClient) createUserRolesInvitationLinkCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, staticSiteUserRolesInvitationEnvelope) + if err := runtime.MarshalAsJSON(req, staticSiteUserRolesInvitationEnvelope); err != nil { + return nil, err + } + return req, nil } // createUserRolesInvitationLinkHandleResponse handles the CreateUserRolesInvitationLink response. @@ -764,7 +885,7 @@ func (client *StaticSitesClient) createUserRolesInvitationLinkHandleResponse(res // BeginCreateZipDeploymentForStaticSite - Description for Deploys zipped content to a static site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - staticSiteZipDeploymentEnvelope - A JSON representation of the StaticSiteZipDeployment properties. See example. @@ -776,29 +897,40 @@ func (client *StaticSitesClient) BeginCreateZipDeploymentForStaticSite(ctx conte if err != nil { return nil, err } - return runtime.NewPoller[StaticSitesClientCreateZipDeploymentForStaticSiteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StaticSitesClientCreateZipDeploymentForStaticSiteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[StaticSitesClientCreateZipDeploymentForStaticSiteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StaticSitesClientCreateZipDeploymentForStaticSiteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateZipDeploymentForStaticSite - Description for Deploys zipped content to a static site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *StaticSitesClient) createZipDeploymentForStaticSite(ctx context.Context, resourceGroupName string, name string, staticSiteZipDeploymentEnvelope StaticSiteZipDeploymentARMResource, options *StaticSitesClientBeginCreateZipDeploymentForStaticSiteOptions) (*http.Response, error) { + var err error + const operationName = "StaticSitesClient.BeginCreateZipDeploymentForStaticSite" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createZipDeploymentForStaticSiteCreateRequest(ctx, resourceGroupName, name, staticSiteZipDeploymentEnvelope, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createZipDeploymentForStaticSiteCreateRequest creates the CreateZipDeploymentForStaticSite request. @@ -821,17 +953,20 @@ func (client *StaticSitesClient) createZipDeploymentForStaticSiteCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, staticSiteZipDeploymentEnvelope) + if err := runtime.MarshalAsJSON(req, staticSiteZipDeploymentEnvelope); err != nil { + return nil, err + } + return req, nil } // BeginCreateZipDeploymentForStaticSiteBuild - Description for Deploys zipped content to a specific environment of a static // site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - environmentName - Name of the environment. @@ -844,29 +979,40 @@ func (client *StaticSitesClient) BeginCreateZipDeploymentForStaticSiteBuild(ctx if err != nil { return nil, err } - return runtime.NewPoller[StaticSitesClientCreateZipDeploymentForStaticSiteBuildResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StaticSitesClientCreateZipDeploymentForStaticSiteBuildResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[StaticSitesClientCreateZipDeploymentForStaticSiteBuildResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StaticSitesClientCreateZipDeploymentForStaticSiteBuildResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateZipDeploymentForStaticSiteBuild - Description for Deploys zipped content to a specific environment of a static site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *StaticSitesClient) createZipDeploymentForStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, staticSiteZipDeploymentEnvelope StaticSiteZipDeploymentARMResource, options *StaticSitesClientBeginCreateZipDeploymentForStaticSiteBuildOptions) (*http.Response, error) { + var err error + const operationName = "StaticSitesClient.BeginCreateZipDeploymentForStaticSiteBuild" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createZipDeploymentForStaticSiteBuildCreateRequest(ctx, resourceGroupName, name, environmentName, staticSiteZipDeploymentEnvelope, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createZipDeploymentForStaticSiteBuildCreateRequest creates the CreateZipDeploymentForStaticSiteBuild request. @@ -893,16 +1039,19 @@ func (client *StaticSitesClient) createZipDeploymentForStaticSiteBuildCreateRequ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, staticSiteZipDeploymentEnvelope) + if err := runtime.MarshalAsJSON(req, staticSiteZipDeploymentEnvelope); err != nil { + return nil, err + } + return req, nil } // DeleteBuildDatabaseConnection - Delete a database connection for a static site build // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site // - environmentName - The stage site identifier. @@ -910,16 +1059,22 @@ func (client *StaticSitesClient) createZipDeploymentForStaticSiteBuildCreateRequ // - options - StaticSitesClientDeleteBuildDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.DeleteBuildDatabaseConnection // method. func (client *StaticSitesClient) DeleteBuildDatabaseConnection(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string, options *StaticSitesClientDeleteBuildDatabaseConnectionOptions) (StaticSitesClientDeleteBuildDatabaseConnectionResponse, error) { + var err error + const operationName = "StaticSitesClient.DeleteBuildDatabaseConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteBuildDatabaseConnectionCreateRequest(ctx, resourceGroupName, name, environmentName, databaseConnectionName, options) if err != nil { return StaticSitesClientDeleteBuildDatabaseConnectionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientDeleteBuildDatabaseConnectionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return StaticSitesClientDeleteBuildDatabaseConnectionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientDeleteBuildDatabaseConnectionResponse{}, err } return StaticSitesClientDeleteBuildDatabaseConnectionResponse{}, nil } @@ -952,7 +1107,7 @@ func (client *StaticSitesClient) deleteBuildDatabaseConnectionCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -961,23 +1116,29 @@ func (client *StaticSitesClient) deleteBuildDatabaseConnectionCreateRequest(ctx // DeleteDatabaseConnection - Delete a database connection for a static site // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site // - databaseConnectionName - Name of the database connection. // - options - StaticSitesClientDeleteDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.DeleteDatabaseConnection // method. func (client *StaticSitesClient) DeleteDatabaseConnection(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string, options *StaticSitesClientDeleteDatabaseConnectionOptions) (StaticSitesClientDeleteDatabaseConnectionResponse, error) { + var err error + const operationName = "StaticSitesClient.DeleteDatabaseConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteDatabaseConnectionCreateRequest(ctx, resourceGroupName, name, databaseConnectionName, options) if err != nil { return StaticSitesClientDeleteDatabaseConnectionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientDeleteDatabaseConnectionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return StaticSitesClientDeleteDatabaseConnectionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientDeleteDatabaseConnectionResponse{}, err } return StaticSitesClientDeleteDatabaseConnectionResponse{}, nil } @@ -1006,7 +1167,7 @@ func (client *StaticSitesClient) deleteDatabaseConnectionCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1015,7 +1176,7 @@ func (client *StaticSitesClient) deleteDatabaseConnectionCreateRequest(ctx conte // BeginDeletePrivateEndpointConnection - Description for Deletes a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - privateEndpointConnectionName - Name of the private endpoint connection. @@ -1027,29 +1188,40 @@ func (client *StaticSitesClient) BeginDeletePrivateEndpointConnection(ctx contex if err != nil { return nil, err } - return runtime.NewPoller[StaticSitesClientDeletePrivateEndpointConnectionResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StaticSitesClientDeletePrivateEndpointConnectionResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[StaticSitesClientDeletePrivateEndpointConnectionResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StaticSitesClientDeletePrivateEndpointConnectionResponse]{ + Tracer: client.internal.Tracer(), + }) } } // DeletePrivateEndpointConnection - Description for Deletes a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *StaticSitesClient) deletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *StaticSitesClientBeginDeletePrivateEndpointConnectionOptions) (*http.Response, error) { + var err error + const operationName = "StaticSitesClient.BeginDeletePrivateEndpointConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deletePrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deletePrivateEndpointConnectionCreateRequest creates the DeletePrivateEndpointConnection request. @@ -1076,7 +1248,7 @@ func (client *StaticSitesClient) deletePrivateEndpointConnectionCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1085,7 +1257,7 @@ func (client *StaticSitesClient) deletePrivateEndpointConnectionCreateRequest(ct // BeginDeleteStaticSite - Description for Deletes a static site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site to delete. // - options - StaticSitesClientBeginDeleteStaticSiteOptions contains the optional parameters for the StaticSitesClient.BeginDeleteStaticSite @@ -1096,29 +1268,40 @@ func (client *StaticSitesClient) BeginDeleteStaticSite(ctx context.Context, reso if err != nil { return nil, err } - return runtime.NewPoller[StaticSitesClientDeleteStaticSiteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StaticSitesClientDeleteStaticSiteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[StaticSitesClientDeleteStaticSiteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StaticSitesClientDeleteStaticSiteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // DeleteStaticSite - Description for Deletes a static site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *StaticSitesClient) deleteStaticSite(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientBeginDeleteStaticSiteOptions) (*http.Response, error) { + var err error + const operationName = "StaticSitesClient.BeginDeleteStaticSite" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteStaticSiteCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteStaticSiteCreateRequest creates the DeleteStaticSite request. @@ -1141,7 +1324,7 @@ func (client *StaticSitesClient) deleteStaticSiteCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1150,7 +1333,7 @@ func (client *StaticSitesClient) deleteStaticSiteCreateRequest(ctx context.Conte // BeginDeleteStaticSiteBuild - Description for Deletes a static site build. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - environmentName - The stage site identifier. @@ -1162,29 +1345,40 @@ func (client *StaticSitesClient) BeginDeleteStaticSiteBuild(ctx context.Context, if err != nil { return nil, err } - return runtime.NewPoller[StaticSitesClientDeleteStaticSiteBuildResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StaticSitesClientDeleteStaticSiteBuildResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[StaticSitesClientDeleteStaticSiteBuildResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StaticSitesClientDeleteStaticSiteBuildResponse]{ + Tracer: client.internal.Tracer(), + }) } } // DeleteStaticSiteBuild - Description for Deletes a static site build. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *StaticSitesClient) deleteStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, options *StaticSitesClientBeginDeleteStaticSiteBuildOptions) (*http.Response, error) { + var err error + const operationName = "StaticSitesClient.BeginDeleteStaticSiteBuild" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteStaticSiteBuildCreateRequest(ctx, resourceGroupName, name, environmentName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteStaticSiteBuildCreateRequest creates the DeleteStaticSiteBuild request. @@ -1211,7 +1405,7 @@ func (client *StaticSitesClient) deleteStaticSiteBuildCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1220,7 +1414,7 @@ func (client *StaticSitesClient) deleteStaticSiteBuildCreateRequest(ctx context. // BeginDeleteStaticSiteCustomDomain - Description for Deletes a custom domain. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - domainName - The custom domain to delete. @@ -1232,29 +1426,40 @@ func (client *StaticSitesClient) BeginDeleteStaticSiteCustomDomain(ctx context.C if err != nil { return nil, err } - return runtime.NewPoller[StaticSitesClientDeleteStaticSiteCustomDomainResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StaticSitesClientDeleteStaticSiteCustomDomainResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[StaticSitesClientDeleteStaticSiteCustomDomainResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StaticSitesClientDeleteStaticSiteCustomDomainResponse]{ + Tracer: client.internal.Tracer(), + }) } } // DeleteStaticSiteCustomDomain - Description for Deletes a custom domain. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *StaticSitesClient) deleteStaticSiteCustomDomain(ctx context.Context, resourceGroupName string, name string, domainName string, options *StaticSitesClientBeginDeleteStaticSiteCustomDomainOptions) (*http.Response, error) { + var err error + const operationName = "StaticSitesClient.BeginDeleteStaticSiteCustomDomain" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteStaticSiteCustomDomainCreateRequest(ctx, resourceGroupName, name, domainName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deleteStaticSiteCustomDomainCreateRequest creates the DeleteStaticSiteCustomDomain request. @@ -1281,7 +1486,7 @@ func (client *StaticSitesClient) deleteStaticSiteCustomDomainCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1290,7 +1495,7 @@ func (client *StaticSitesClient) deleteStaticSiteCustomDomainCreateRequest(ctx c // DeleteStaticSiteUser - Description for Deletes the user entry from the static site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the staticsite. // - authprovider - The auth provider for this user. @@ -1298,16 +1503,22 @@ func (client *StaticSitesClient) deleteStaticSiteCustomDomainCreateRequest(ctx c // - options - StaticSitesClientDeleteStaticSiteUserOptions contains the optional parameters for the StaticSitesClient.DeleteStaticSiteUser // method. func (client *StaticSitesClient) DeleteStaticSiteUser(ctx context.Context, resourceGroupName string, name string, authprovider string, userid string, options *StaticSitesClientDeleteStaticSiteUserOptions) (StaticSitesClientDeleteStaticSiteUserResponse, error) { + var err error + const operationName = "StaticSitesClient.DeleteStaticSiteUser" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteStaticSiteUserCreateRequest(ctx, resourceGroupName, name, authprovider, userid, options) if err != nil { return StaticSitesClientDeleteStaticSiteUserResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientDeleteStaticSiteUserResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientDeleteStaticSiteUserResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientDeleteStaticSiteUserResponse{}, err } return StaticSitesClientDeleteStaticSiteUserResponse{}, nil } @@ -1340,7 +1551,7 @@ func (client *StaticSitesClient) deleteStaticSiteUserCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1349,7 +1560,7 @@ func (client *StaticSitesClient) deleteStaticSiteUserCreateRequest(ctx context.C // BeginDetachStaticSite - Description for Detaches a static site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site to detach. // - options - StaticSitesClientBeginDetachStaticSiteOptions contains the optional parameters for the StaticSitesClient.BeginDetachStaticSite @@ -1360,29 +1571,40 @@ func (client *StaticSitesClient) BeginDetachStaticSite(ctx context.Context, reso if err != nil { return nil, err } - return runtime.NewPoller[StaticSitesClientDetachStaticSiteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StaticSitesClientDetachStaticSiteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[StaticSitesClientDetachStaticSiteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StaticSitesClientDetachStaticSiteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // DetachStaticSite - Description for Detaches a static site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *StaticSitesClient) detachStaticSite(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientBeginDetachStaticSiteOptions) (*http.Response, error) { + var err error + const operationName = "StaticSitesClient.BeginDetachStaticSite" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.detachStaticSiteCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // detachStaticSiteCreateRequest creates the DetachStaticSite request. @@ -1405,7 +1627,7 @@ func (client *StaticSitesClient) detachStaticSiteCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1414,23 +1636,29 @@ func (client *StaticSitesClient) detachStaticSiteCreateRequest(ctx context.Conte // DetachUserProvidedFunctionAppFromStaticSite - Description for Detach the user provided function app from the static site // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - functionAppName - Name of the function app registered with the static site. // - options - StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteOptions contains the optional parameters for the // StaticSitesClient.DetachUserProvidedFunctionAppFromStaticSite method. func (client *StaticSitesClient) DetachUserProvidedFunctionAppFromStaticSite(ctx context.Context, resourceGroupName string, name string, functionAppName string, options *StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteOptions) (StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteResponse, error) { + var err error + const operationName = "StaticSitesClient.DetachUserProvidedFunctionAppFromStaticSite" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.detachUserProvidedFunctionAppFromStaticSiteCreateRequest(ctx, resourceGroupName, name, functionAppName, options) if err != nil { return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteResponse{}, err } return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteResponse{}, nil } @@ -1459,7 +1687,7 @@ func (client *StaticSitesClient) detachUserProvidedFunctionAppFromStaticSiteCrea return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1469,7 +1697,7 @@ func (client *StaticSitesClient) detachUserProvidedFunctionAppFromStaticSiteCrea // site build // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - environmentName - The stage site identifier. @@ -1477,16 +1705,22 @@ func (client *StaticSitesClient) detachUserProvidedFunctionAppFromStaticSiteCrea // - options - StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildOptions contains the optional parameters for // the StaticSitesClient.DetachUserProvidedFunctionAppFromStaticSiteBuild method. func (client *StaticSitesClient) DetachUserProvidedFunctionAppFromStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, functionAppName string, options *StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildOptions) (StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildResponse, error) { + var err error + const operationName = "StaticSitesClient.DetachUserProvidedFunctionAppFromStaticSiteBuild" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.detachUserProvidedFunctionAppFromStaticSiteBuildCreateRequest(ctx, resourceGroupName, name, environmentName, functionAppName, options) if err != nil { return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildResponse{}, err } return StaticSitesClientDetachUserProvidedFunctionAppFromStaticSiteBuildResponse{}, nil } @@ -1519,7 +1753,7 @@ func (client *StaticSitesClient) detachUserProvidedFunctionAppFromStaticSiteBuil return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1528,25 +1762,32 @@ func (client *StaticSitesClient) detachUserProvidedFunctionAppFromStaticSiteBuil // GetBasicAuth - Description for Gets the basic auth properties for a static site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - basicAuthName - name of the basic auth entry. // - options - StaticSitesClientGetBasicAuthOptions contains the optional parameters for the StaticSitesClient.GetBasicAuth // method. func (client *StaticSitesClient) GetBasicAuth(ctx context.Context, resourceGroupName string, name string, basicAuthName BasicAuthName, options *StaticSitesClientGetBasicAuthOptions) (StaticSitesClientGetBasicAuthResponse, error) { + var err error + const operationName = "StaticSitesClient.GetBasicAuth" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getBasicAuthCreateRequest(ctx, resourceGroupName, name, basicAuthName, options) if err != nil { return StaticSitesClientGetBasicAuthResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientGetBasicAuthResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientGetBasicAuthResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientGetBasicAuthResponse{}, err } - return client.getBasicAuthHandleResponse(resp) + resp, err := client.getBasicAuthHandleResponse(httpResp) + return resp, err } // getBasicAuthCreateRequest creates the GetBasicAuth request. @@ -1573,7 +1814,7 @@ func (client *StaticSitesClient) getBasicAuthCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1591,7 +1832,7 @@ func (client *StaticSitesClient) getBasicAuthHandleResponse(resp *http.Response) // GetBuildDatabaseConnection - Returns overview of a database connection for a static site build by name // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site // - environmentName - The stage site identifier. @@ -1599,18 +1840,25 @@ func (client *StaticSitesClient) getBasicAuthHandleResponse(resp *http.Response) // - options - StaticSitesClientGetBuildDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.GetBuildDatabaseConnection // method. func (client *StaticSitesClient) GetBuildDatabaseConnection(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string, options *StaticSitesClientGetBuildDatabaseConnectionOptions) (StaticSitesClientGetBuildDatabaseConnectionResponse, error) { + var err error + const operationName = "StaticSitesClient.GetBuildDatabaseConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getBuildDatabaseConnectionCreateRequest(ctx, resourceGroupName, name, environmentName, databaseConnectionName, options) if err != nil { return StaticSitesClientGetBuildDatabaseConnectionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientGetBuildDatabaseConnectionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientGetBuildDatabaseConnectionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientGetBuildDatabaseConnectionResponse{}, err } - return client.getBuildDatabaseConnectionHandleResponse(resp) + resp, err := client.getBuildDatabaseConnectionHandleResponse(httpResp) + return resp, err } // getBuildDatabaseConnectionCreateRequest creates the GetBuildDatabaseConnection request. @@ -1641,7 +1889,7 @@ func (client *StaticSitesClient) getBuildDatabaseConnectionCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1659,7 +1907,7 @@ func (client *StaticSitesClient) getBuildDatabaseConnectionHandleResponse(resp * // GetBuildDatabaseConnectionWithDetails - Returns details of a database connection for a static site build by name // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site // - environmentName - The stage site identifier. @@ -1667,18 +1915,25 @@ func (client *StaticSitesClient) getBuildDatabaseConnectionHandleResponse(resp * // - options - StaticSitesClientGetBuildDatabaseConnectionWithDetailsOptions contains the optional parameters for the StaticSitesClient.GetBuildDatabaseConnectionWithDetails // method. func (client *StaticSitesClient) GetBuildDatabaseConnectionWithDetails(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string, options *StaticSitesClientGetBuildDatabaseConnectionWithDetailsOptions) (StaticSitesClientGetBuildDatabaseConnectionWithDetailsResponse, error) { + var err error + const operationName = "StaticSitesClient.GetBuildDatabaseConnectionWithDetails" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getBuildDatabaseConnectionWithDetailsCreateRequest(ctx, resourceGroupName, name, environmentName, databaseConnectionName, options) if err != nil { return StaticSitesClientGetBuildDatabaseConnectionWithDetailsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientGetBuildDatabaseConnectionWithDetailsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientGetBuildDatabaseConnectionWithDetailsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientGetBuildDatabaseConnectionWithDetailsResponse{}, err } - return client.getBuildDatabaseConnectionWithDetailsHandleResponse(resp) + resp, err := client.getBuildDatabaseConnectionWithDetailsHandleResponse(httpResp) + return resp, err } // getBuildDatabaseConnectionWithDetailsCreateRequest creates the GetBuildDatabaseConnectionWithDetails request. @@ -1709,7 +1964,7 @@ func (client *StaticSitesClient) getBuildDatabaseConnectionWithDetailsCreateRequ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1726,7 +1981,7 @@ func (client *StaticSitesClient) getBuildDatabaseConnectionWithDetailsHandleResp // NewGetBuildDatabaseConnectionsPager - Returns overviews of database connections for a static site build // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site // - environmentName - The stage site identifier. @@ -1738,25 +1993,20 @@ func (client *StaticSitesClient) NewGetBuildDatabaseConnectionsPager(resourceGro return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *StaticSitesClientGetBuildDatabaseConnectionsResponse) (StaticSitesClientGetBuildDatabaseConnectionsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getBuildDatabaseConnectionsCreateRequest(ctx, resourceGroupName, name, environmentName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return StaticSitesClientGetBuildDatabaseConnectionsResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StaticSitesClient.NewGetBuildDatabaseConnectionsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getBuildDatabaseConnectionsCreateRequest(ctx, resourceGroupName, name, environmentName, options) + }, nil) if err != nil { return StaticSitesClientGetBuildDatabaseConnectionsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientGetBuildDatabaseConnectionsResponse{}, runtime.NewResponseError(resp) - } return client.getBuildDatabaseConnectionsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -1784,7 +2034,7 @@ func (client *StaticSitesClient) getBuildDatabaseConnectionsCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1801,7 +2051,7 @@ func (client *StaticSitesClient) getBuildDatabaseConnectionsHandleResponse(resp // NewGetBuildDatabaseConnectionsWithDetailsPager - Returns details of database connections for a static site build // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site // - environmentName - The stage site identifier. @@ -1813,25 +2063,20 @@ func (client *StaticSitesClient) NewGetBuildDatabaseConnectionsWithDetailsPager( return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *StaticSitesClientGetBuildDatabaseConnectionsWithDetailsResponse) (StaticSitesClientGetBuildDatabaseConnectionsWithDetailsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getBuildDatabaseConnectionsWithDetailsCreateRequest(ctx, resourceGroupName, name, environmentName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StaticSitesClient.NewGetBuildDatabaseConnectionsWithDetailsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getBuildDatabaseConnectionsWithDetailsCreateRequest(ctx, resourceGroupName, name, environmentName, options) + }, nil) if err != nil { return StaticSitesClientGetBuildDatabaseConnectionsWithDetailsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return StaticSitesClientGetBuildDatabaseConnectionsWithDetailsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientGetBuildDatabaseConnectionsWithDetailsResponse{}, runtime.NewResponseError(resp) - } return client.getBuildDatabaseConnectionsWithDetailsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -1859,7 +2104,7 @@ func (client *StaticSitesClient) getBuildDatabaseConnectionsWithDetailsCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1877,25 +2122,32 @@ func (client *StaticSitesClient) getBuildDatabaseConnectionsWithDetailsHandleRes // GetDatabaseConnection - Returns overview of a database connection for a static site by name // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site // - databaseConnectionName - Name of the database connection. // - options - StaticSitesClientGetDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.GetDatabaseConnection // method. func (client *StaticSitesClient) GetDatabaseConnection(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string, options *StaticSitesClientGetDatabaseConnectionOptions) (StaticSitesClientGetDatabaseConnectionResponse, error) { + var err error + const operationName = "StaticSitesClient.GetDatabaseConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getDatabaseConnectionCreateRequest(ctx, resourceGroupName, name, databaseConnectionName, options) if err != nil { return StaticSitesClientGetDatabaseConnectionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientGetDatabaseConnectionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientGetDatabaseConnectionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientGetDatabaseConnectionResponse{}, err } - return client.getDatabaseConnectionHandleResponse(resp) + resp, err := client.getDatabaseConnectionHandleResponse(httpResp) + return resp, err } // getDatabaseConnectionCreateRequest creates the GetDatabaseConnection request. @@ -1922,7 +2174,7 @@ func (client *StaticSitesClient) getDatabaseConnectionCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1940,25 +2192,32 @@ func (client *StaticSitesClient) getDatabaseConnectionHandleResponse(resp *http. // GetDatabaseConnectionWithDetails - Returns details of a database connection for a static site by name // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site // - databaseConnectionName - Name of the database connection. // - options - StaticSitesClientGetDatabaseConnectionWithDetailsOptions contains the optional parameters for the StaticSitesClient.GetDatabaseConnectionWithDetails // method. func (client *StaticSitesClient) GetDatabaseConnectionWithDetails(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string, options *StaticSitesClientGetDatabaseConnectionWithDetailsOptions) (StaticSitesClientGetDatabaseConnectionWithDetailsResponse, error) { + var err error + const operationName = "StaticSitesClient.GetDatabaseConnectionWithDetails" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getDatabaseConnectionWithDetailsCreateRequest(ctx, resourceGroupName, name, databaseConnectionName, options) if err != nil { return StaticSitesClientGetDatabaseConnectionWithDetailsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientGetDatabaseConnectionWithDetailsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientGetDatabaseConnectionWithDetailsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientGetDatabaseConnectionWithDetailsResponse{}, err } - return client.getDatabaseConnectionWithDetailsHandleResponse(resp) + resp, err := client.getDatabaseConnectionWithDetailsHandleResponse(httpResp) + return resp, err } // getDatabaseConnectionWithDetailsCreateRequest creates the GetDatabaseConnectionWithDetails request. @@ -1985,7 +2244,7 @@ func (client *StaticSitesClient) getDatabaseConnectionWithDetailsCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2002,7 +2261,7 @@ func (client *StaticSitesClient) getDatabaseConnectionWithDetailsHandleResponse( // NewGetDatabaseConnectionsPager - Returns overviews of database connections for a static site // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site // - options - StaticSitesClientGetDatabaseConnectionsOptions contains the optional parameters for the StaticSitesClient.NewGetDatabaseConnectionsPager @@ -2013,25 +2272,20 @@ func (client *StaticSitesClient) NewGetDatabaseConnectionsPager(resourceGroupNam return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *StaticSitesClientGetDatabaseConnectionsResponse) (StaticSitesClientGetDatabaseConnectionsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getDatabaseConnectionsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StaticSitesClient.NewGetDatabaseConnectionsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getDatabaseConnectionsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return StaticSitesClientGetDatabaseConnectionsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return StaticSitesClientGetDatabaseConnectionsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientGetDatabaseConnectionsResponse{}, runtime.NewResponseError(resp) - } return client.getDatabaseConnectionsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -2055,7 +2309,7 @@ func (client *StaticSitesClient) getDatabaseConnectionsCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2072,7 +2326,7 @@ func (client *StaticSitesClient) getDatabaseConnectionsHandleResponse(resp *http // NewGetDatabaseConnectionsWithDetailsPager - Returns details of database connections for a static site // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site // - options - StaticSitesClientGetDatabaseConnectionsWithDetailsOptions contains the optional parameters for the StaticSitesClient.NewGetDatabaseConnectionsWithDetailsPager @@ -2083,25 +2337,20 @@ func (client *StaticSitesClient) NewGetDatabaseConnectionsWithDetailsPager(resou return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *StaticSitesClientGetDatabaseConnectionsWithDetailsResponse) (StaticSitesClientGetDatabaseConnectionsWithDetailsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getDatabaseConnectionsWithDetailsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StaticSitesClient.NewGetDatabaseConnectionsWithDetailsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getDatabaseConnectionsWithDetailsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return StaticSitesClientGetDatabaseConnectionsWithDetailsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return StaticSitesClientGetDatabaseConnectionsWithDetailsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientGetDatabaseConnectionsWithDetailsResponse{}, runtime.NewResponseError(resp) - } return client.getDatabaseConnectionsWithDetailsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -2125,7 +2374,7 @@ func (client *StaticSitesClient) getDatabaseConnectionsWithDetailsCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2143,25 +2392,32 @@ func (client *StaticSitesClient) getDatabaseConnectionsWithDetailsHandleResponse // GetLinkedBackend - Returns the details of a linked backend linked to a static site by name // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site // - linkedBackendName - Name of the linked backend that should be retrieved // - options - StaticSitesClientGetLinkedBackendOptions contains the optional parameters for the StaticSitesClient.GetLinkedBackend // method. func (client *StaticSitesClient) GetLinkedBackend(ctx context.Context, resourceGroupName string, name string, linkedBackendName string, options *StaticSitesClientGetLinkedBackendOptions) (StaticSitesClientGetLinkedBackendResponse, error) { + var err error + const operationName = "StaticSitesClient.GetLinkedBackend" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getLinkedBackendCreateRequest(ctx, resourceGroupName, name, linkedBackendName, options) if err != nil { return StaticSitesClientGetLinkedBackendResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientGetLinkedBackendResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientGetLinkedBackendResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientGetLinkedBackendResponse{}, err } - return client.getLinkedBackendHandleResponse(resp) + resp, err := client.getLinkedBackendHandleResponse(httpResp) + return resp, err } // getLinkedBackendCreateRequest creates the GetLinkedBackend request. @@ -2188,7 +2444,7 @@ func (client *StaticSitesClient) getLinkedBackendCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2206,7 +2462,7 @@ func (client *StaticSitesClient) getLinkedBackendHandleResponse(resp *http.Respo // GetLinkedBackendForBuild - Returns the details of a linked backend linked to a static site build by name // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site // - environmentName - The stage site identifier @@ -2214,18 +2470,25 @@ func (client *StaticSitesClient) getLinkedBackendHandleResponse(resp *http.Respo // - options - StaticSitesClientGetLinkedBackendForBuildOptions contains the optional parameters for the StaticSitesClient.GetLinkedBackendForBuild // method. func (client *StaticSitesClient) GetLinkedBackendForBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, linkedBackendName string, options *StaticSitesClientGetLinkedBackendForBuildOptions) (StaticSitesClientGetLinkedBackendForBuildResponse, error) { + var err error + const operationName = "StaticSitesClient.GetLinkedBackendForBuild" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getLinkedBackendForBuildCreateRequest(ctx, resourceGroupName, name, environmentName, linkedBackendName, options) if err != nil { return StaticSitesClientGetLinkedBackendForBuildResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientGetLinkedBackendForBuildResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientGetLinkedBackendForBuildResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientGetLinkedBackendForBuildResponse{}, err } - return client.getLinkedBackendForBuildHandleResponse(resp) + resp, err := client.getLinkedBackendForBuildHandleResponse(httpResp) + return resp, err } // getLinkedBackendForBuildCreateRequest creates the GetLinkedBackendForBuild request. @@ -2256,7 +2519,7 @@ func (client *StaticSitesClient) getLinkedBackendForBuildCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2273,7 +2536,7 @@ func (client *StaticSitesClient) getLinkedBackendForBuildHandleResponse(resp *ht // NewGetLinkedBackendsPager - Returns details of all backends linked to a static site // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site // - options - StaticSitesClientGetLinkedBackendsOptions contains the optional parameters for the StaticSitesClient.NewGetLinkedBackendsPager @@ -2284,25 +2547,20 @@ func (client *StaticSitesClient) NewGetLinkedBackendsPager(resourceGroupName str return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *StaticSitesClientGetLinkedBackendsResponse) (StaticSitesClientGetLinkedBackendsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getLinkedBackendsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return StaticSitesClientGetLinkedBackendsResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StaticSitesClient.NewGetLinkedBackendsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getLinkedBackendsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return StaticSitesClientGetLinkedBackendsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientGetLinkedBackendsResponse{}, runtime.NewResponseError(resp) - } return client.getLinkedBackendsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -2326,7 +2584,7 @@ func (client *StaticSitesClient) getLinkedBackendsCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2343,7 +2601,7 @@ func (client *StaticSitesClient) getLinkedBackendsHandleResponse(resp *http.Resp // NewGetLinkedBackendsForBuildPager - Returns details of all backends linked to a static site build // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site // - environmentName - The stage site identifier @@ -2355,25 +2613,20 @@ func (client *StaticSitesClient) NewGetLinkedBackendsForBuildPager(resourceGroup return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *StaticSitesClientGetLinkedBackendsForBuildResponse) (StaticSitesClientGetLinkedBackendsForBuildResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getLinkedBackendsForBuildCreateRequest(ctx, resourceGroupName, name, environmentName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StaticSitesClient.NewGetLinkedBackendsForBuildPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getLinkedBackendsForBuildCreateRequest(ctx, resourceGroupName, name, environmentName, options) + }, nil) if err != nil { return StaticSitesClientGetLinkedBackendsForBuildResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return StaticSitesClientGetLinkedBackendsForBuildResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientGetLinkedBackendsForBuildResponse{}, runtime.NewResponseError(resp) - } return client.getLinkedBackendsForBuildHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -2401,7 +2654,7 @@ func (client *StaticSitesClient) getLinkedBackendsForBuildCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2419,25 +2672,32 @@ func (client *StaticSitesClient) getLinkedBackendsForBuildHandleResponse(resp *h // GetPrivateEndpointConnection - Description for Gets a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - privateEndpointConnectionName - Name of the private endpoint connection. // - options - StaticSitesClientGetPrivateEndpointConnectionOptions contains the optional parameters for the StaticSitesClient.GetPrivateEndpointConnection // method. func (client *StaticSitesClient) GetPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *StaticSitesClientGetPrivateEndpointConnectionOptions) (StaticSitesClientGetPrivateEndpointConnectionResponse, error) { + var err error + const operationName = "StaticSitesClient.GetPrivateEndpointConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getPrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, options) if err != nil { return StaticSitesClientGetPrivateEndpointConnectionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientGetPrivateEndpointConnectionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientGetPrivateEndpointConnectionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientGetPrivateEndpointConnectionResponse{}, err } - return client.getPrivateEndpointConnectionHandleResponse(resp) + resp, err := client.getPrivateEndpointConnectionHandleResponse(httpResp) + return resp, err } // getPrivateEndpointConnectionCreateRequest creates the GetPrivateEndpointConnection request. @@ -2464,7 +2724,7 @@ func (client *StaticSitesClient) getPrivateEndpointConnectionCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2482,7 +2742,7 @@ func (client *StaticSitesClient) getPrivateEndpointConnectionHandleResponse(resp // NewGetPrivateEndpointConnectionListPager - Description for Gets the list of private endpoint connections associated with // a static site // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - options - StaticSitesClientGetPrivateEndpointConnectionListOptions contains the optional parameters for the StaticSitesClient.NewGetPrivateEndpointConnectionListPager @@ -2493,25 +2753,20 @@ func (client *StaticSitesClient) NewGetPrivateEndpointConnectionListPager(resour return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *StaticSitesClientGetPrivateEndpointConnectionListResponse) (StaticSitesClientGetPrivateEndpointConnectionListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getPrivateEndpointConnectionListCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return StaticSitesClientGetPrivateEndpointConnectionListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StaticSitesClient.NewGetPrivateEndpointConnectionListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getPrivateEndpointConnectionListCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return StaticSitesClientGetPrivateEndpointConnectionListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientGetPrivateEndpointConnectionListResponse{}, runtime.NewResponseError(resp) - } return client.getPrivateEndpointConnectionListHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -2535,7 +2790,7 @@ func (client *StaticSitesClient) getPrivateEndpointConnectionListCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2553,24 +2808,31 @@ func (client *StaticSitesClient) getPrivateEndpointConnectionListHandleResponse( // GetPrivateLinkResources - Description for Gets the private link resources // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the site. // - options - StaticSitesClientGetPrivateLinkResourcesOptions contains the optional parameters for the StaticSitesClient.GetPrivateLinkResources // method. func (client *StaticSitesClient) GetPrivateLinkResources(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientGetPrivateLinkResourcesOptions) (StaticSitesClientGetPrivateLinkResourcesResponse, error) { + var err error + const operationName = "StaticSitesClient.GetPrivateLinkResources" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getPrivateLinkResourcesCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return StaticSitesClientGetPrivateLinkResourcesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientGetPrivateLinkResourcesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientGetPrivateLinkResourcesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientGetPrivateLinkResourcesResponse{}, err } - return client.getPrivateLinkResourcesHandleResponse(resp) + resp, err := client.getPrivateLinkResourcesHandleResponse(httpResp) + return resp, err } // getPrivateLinkResourcesCreateRequest creates the GetPrivateLinkResources request. @@ -2593,7 +2855,7 @@ func (client *StaticSitesClient) getPrivateLinkResourcesCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2611,24 +2873,31 @@ func (client *StaticSitesClient) getPrivateLinkResourcesHandleResponse(resp *htt // GetStaticSite - Description for Gets the details of a static site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - options - StaticSitesClientGetStaticSiteOptions contains the optional parameters for the StaticSitesClient.GetStaticSite // method. func (client *StaticSitesClient) GetStaticSite(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientGetStaticSiteOptions) (StaticSitesClientGetStaticSiteResponse, error) { + var err error + const operationName = "StaticSitesClient.GetStaticSite" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getStaticSiteCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return StaticSitesClientGetStaticSiteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientGetStaticSiteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientGetStaticSiteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientGetStaticSiteResponse{}, err } - return client.getStaticSiteHandleResponse(resp) + resp, err := client.getStaticSiteHandleResponse(httpResp) + return resp, err } // getStaticSiteCreateRequest creates the GetStaticSite request. @@ -2651,7 +2920,7 @@ func (client *StaticSitesClient) getStaticSiteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2669,25 +2938,32 @@ func (client *StaticSitesClient) getStaticSiteHandleResponse(resp *http.Response // GetStaticSiteBuild - Description for Gets the details of a static site build. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - environmentName - The stage site identifier. // - options - StaticSitesClientGetStaticSiteBuildOptions contains the optional parameters for the StaticSitesClient.GetStaticSiteBuild // method. func (client *StaticSitesClient) GetStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, options *StaticSitesClientGetStaticSiteBuildOptions) (StaticSitesClientGetStaticSiteBuildResponse, error) { + var err error + const operationName = "StaticSitesClient.GetStaticSiteBuild" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getStaticSiteBuildCreateRequest(ctx, resourceGroupName, name, environmentName, options) if err != nil { return StaticSitesClientGetStaticSiteBuildResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientGetStaticSiteBuildResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientGetStaticSiteBuildResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientGetStaticSiteBuildResponse{}, err } - return client.getStaticSiteBuildHandleResponse(resp) + resp, err := client.getStaticSiteBuildHandleResponse(httpResp) + return resp, err } // getStaticSiteBuildCreateRequest creates the GetStaticSiteBuild request. @@ -2714,7 +2990,7 @@ func (client *StaticSitesClient) getStaticSiteBuildCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2731,7 +3007,7 @@ func (client *StaticSitesClient) getStaticSiteBuildHandleResponse(resp *http.Res // NewGetStaticSiteBuildsPager - Description for Gets all static site builds for a particular static site. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - options - StaticSitesClientGetStaticSiteBuildsOptions contains the optional parameters for the StaticSitesClient.NewGetStaticSiteBuildsPager @@ -2742,25 +3018,20 @@ func (client *StaticSitesClient) NewGetStaticSiteBuildsPager(resourceGroupName s return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *StaticSitesClientGetStaticSiteBuildsResponse) (StaticSitesClientGetStaticSiteBuildsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getStaticSiteBuildsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return StaticSitesClientGetStaticSiteBuildsResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StaticSitesClient.NewGetStaticSiteBuildsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getStaticSiteBuildsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return StaticSitesClientGetStaticSiteBuildsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientGetStaticSiteBuildsResponse{}, runtime.NewResponseError(resp) - } return client.getStaticSiteBuildsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -2784,7 +3055,7 @@ func (client *StaticSitesClient) getStaticSiteBuildsCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2802,25 +3073,32 @@ func (client *StaticSitesClient) getStaticSiteBuildsHandleResponse(resp *http.Re // GetStaticSiteCustomDomain - Description for Gets an existing custom domain for a particular static site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site resource to search in. // - domainName - The custom domain name. // - options - StaticSitesClientGetStaticSiteCustomDomainOptions contains the optional parameters for the StaticSitesClient.GetStaticSiteCustomDomain // method. func (client *StaticSitesClient) GetStaticSiteCustomDomain(ctx context.Context, resourceGroupName string, name string, domainName string, options *StaticSitesClientGetStaticSiteCustomDomainOptions) (StaticSitesClientGetStaticSiteCustomDomainResponse, error) { + var err error + const operationName = "StaticSitesClient.GetStaticSiteCustomDomain" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getStaticSiteCustomDomainCreateRequest(ctx, resourceGroupName, name, domainName, options) if err != nil { return StaticSitesClientGetStaticSiteCustomDomainResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientGetStaticSiteCustomDomainResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientGetStaticSiteCustomDomainResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientGetStaticSiteCustomDomainResponse{}, err } - return client.getStaticSiteCustomDomainHandleResponse(resp) + resp, err := client.getStaticSiteCustomDomainHandleResponse(httpResp) + return resp, err } // getStaticSiteCustomDomainCreateRequest creates the GetStaticSiteCustomDomain request. @@ -2847,7 +3125,7 @@ func (client *StaticSitesClient) getStaticSiteCustomDomainCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2864,7 +3142,7 @@ func (client *StaticSitesClient) getStaticSiteCustomDomainHandleResponse(resp *h // NewGetStaticSitesByResourceGroupPager - Description for Gets all static sites in the specified resource group. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - options - StaticSitesClientGetStaticSitesByResourceGroupOptions contains the optional parameters for the StaticSitesClient.NewGetStaticSitesByResourceGroupPager // method. @@ -2874,25 +3152,20 @@ func (client *StaticSitesClient) NewGetStaticSitesByResourceGroupPager(resourceG return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *StaticSitesClientGetStaticSitesByResourceGroupResponse) (StaticSitesClientGetStaticSitesByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getStaticSitesByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return StaticSitesClientGetStaticSitesByResourceGroupResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StaticSitesClient.NewGetStaticSitesByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getStaticSitesByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return StaticSitesClientGetStaticSitesByResourceGroupResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientGetStaticSitesByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.getStaticSitesByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -2912,7 +3185,7 @@ func (client *StaticSitesClient) getStaticSitesByResourceGroupCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2931,25 +3204,32 @@ func (client *StaticSitesClient) getStaticSitesByResourceGroupHandleResponse(res // with a static site // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - functionAppName - Name of the function app registered with the static site. // - options - StaticSitesClientGetUserProvidedFunctionAppForStaticSiteOptions contains the optional parameters for the StaticSitesClient.GetUserProvidedFunctionAppForStaticSite // method. func (client *StaticSitesClient) GetUserProvidedFunctionAppForStaticSite(ctx context.Context, resourceGroupName string, name string, functionAppName string, options *StaticSitesClientGetUserProvidedFunctionAppForStaticSiteOptions) (StaticSitesClientGetUserProvidedFunctionAppForStaticSiteResponse, error) { + var err error + const operationName = "StaticSitesClient.GetUserProvidedFunctionAppForStaticSite" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getUserProvidedFunctionAppForStaticSiteCreateRequest(ctx, resourceGroupName, name, functionAppName, options) if err != nil { return StaticSitesClientGetUserProvidedFunctionAppForStaticSiteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientGetUserProvidedFunctionAppForStaticSiteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientGetUserProvidedFunctionAppForStaticSiteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientGetUserProvidedFunctionAppForStaticSiteResponse{}, err } - return client.getUserProvidedFunctionAppForStaticSiteHandleResponse(resp) + resp, err := client.getUserProvidedFunctionAppForStaticSiteHandleResponse(httpResp) + return resp, err } // getUserProvidedFunctionAppForStaticSiteCreateRequest creates the GetUserProvidedFunctionAppForStaticSite request. @@ -2976,7 +3256,7 @@ func (client *StaticSitesClient) getUserProvidedFunctionAppForStaticSiteCreateRe return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2995,7 +3275,7 @@ func (client *StaticSitesClient) getUserProvidedFunctionAppForStaticSiteHandleRe // with a static site build // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - environmentName - The stage site identifier. @@ -3003,18 +3283,25 @@ func (client *StaticSitesClient) getUserProvidedFunctionAppForStaticSiteHandleRe // - options - StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildOptions contains the optional parameters for the // StaticSitesClient.GetUserProvidedFunctionAppForStaticSiteBuild method. func (client *StaticSitesClient) GetUserProvidedFunctionAppForStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, functionAppName string, options *StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildOptions) (StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildResponse, error) { + var err error + const operationName = "StaticSitesClient.GetUserProvidedFunctionAppForStaticSiteBuild" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getUserProvidedFunctionAppForStaticSiteBuildCreateRequest(ctx, resourceGroupName, name, environmentName, functionAppName, options) if err != nil { return StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientGetUserProvidedFunctionAppForStaticSiteBuildResponse{}, err } - return client.getUserProvidedFunctionAppForStaticSiteBuildHandleResponse(resp) + resp, err := client.getUserProvidedFunctionAppForStaticSiteBuildHandleResponse(httpResp) + return resp, err } // getUserProvidedFunctionAppForStaticSiteBuildCreateRequest creates the GetUserProvidedFunctionAppForStaticSiteBuild request. @@ -3045,7 +3332,7 @@ func (client *StaticSitesClient) getUserProvidedFunctionAppForStaticSiteBuildCre return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3063,7 +3350,7 @@ func (client *StaticSitesClient) getUserProvidedFunctionAppForStaticSiteBuildHan // NewGetUserProvidedFunctionAppsForStaticSitePager - Description for Gets the details of the user provided function apps // registered with a static site // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - options - StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteOptions contains the optional parameters for the StaticSitesClient.NewGetUserProvidedFunctionAppsForStaticSitePager @@ -3074,25 +3361,20 @@ func (client *StaticSitesClient) NewGetUserProvidedFunctionAppsForStaticSitePage return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse) (StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getUserProvidedFunctionAppsForStaticSiteCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StaticSitesClient.NewGetUserProvidedFunctionAppsForStaticSitePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getUserProvidedFunctionAppsForStaticSiteCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteResponse{}, runtime.NewResponseError(resp) - } return client.getUserProvidedFunctionAppsForStaticSiteHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -3116,7 +3398,7 @@ func (client *StaticSitesClient) getUserProvidedFunctionAppsForStaticSiteCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3134,7 +3416,7 @@ func (client *StaticSitesClient) getUserProvidedFunctionAppsForStaticSiteHandleR // NewGetUserProvidedFunctionAppsForStaticSiteBuildPager - Description for Gets the details of the user provided function // apps registered with a static site build // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - environmentName - The stage site identifier. @@ -3146,25 +3428,20 @@ func (client *StaticSitesClient) NewGetUserProvidedFunctionAppsForStaticSiteBuil return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse) (StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getUserProvidedFunctionAppsForStaticSiteBuildCreateRequest(ctx, resourceGroupName, name, environmentName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StaticSitesClient.NewGetUserProvidedFunctionAppsForStaticSiteBuildPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getUserProvidedFunctionAppsForStaticSiteBuildCreateRequest(ctx, resourceGroupName, name, environmentName, options) + }, nil) if err != nil { return StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientGetUserProvidedFunctionAppsForStaticSiteBuildResponse{}, runtime.NewResponseError(resp) - } return client.getUserProvidedFunctionAppsForStaticSiteBuildHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -3192,7 +3469,7 @@ func (client *StaticSitesClient) getUserProvidedFunctionAppsForStaticSiteBuildCr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3210,7 +3487,7 @@ func (client *StaticSitesClient) getUserProvidedFunctionAppsForStaticSiteBuildHa // BeginLinkBackend - Link backend to a static site // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site // - linkedBackendName - Name of the backend to link to the static site @@ -3223,29 +3500,40 @@ func (client *StaticSitesClient) BeginLinkBackend(ctx context.Context, resourceG if err != nil { return nil, err } - return runtime.NewPoller[StaticSitesClientLinkBackendResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StaticSitesClientLinkBackendResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[StaticSitesClientLinkBackendResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StaticSitesClientLinkBackendResponse]{ + Tracer: client.internal.Tracer(), + }) } } // LinkBackend - Link backend to a static site // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *StaticSitesClient) linkBackend(ctx context.Context, resourceGroupName string, name string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource, options *StaticSitesClientBeginLinkBackendOptions) (*http.Response, error) { + var err error + const operationName = "StaticSitesClient.BeginLinkBackend" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.linkBackendCreateRequest(ctx, resourceGroupName, name, linkedBackendName, staticSiteLinkedBackendEnvelope, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // linkBackendCreateRequest creates the LinkBackend request. @@ -3272,16 +3560,19 @@ func (client *StaticSitesClient) linkBackendCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, staticSiteLinkedBackendEnvelope) + if err := runtime.MarshalAsJSON(req, staticSiteLinkedBackendEnvelope); err != nil { + return nil, err + } + return req, nil } // BeginLinkBackendToBuild - Link backend to a static site build // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site // - environmentName - The stage site identifier @@ -3295,29 +3586,40 @@ func (client *StaticSitesClient) BeginLinkBackendToBuild(ctx context.Context, re if err != nil { return nil, err } - return runtime.NewPoller[StaticSitesClientLinkBackendToBuildResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StaticSitesClientLinkBackendToBuildResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[StaticSitesClientLinkBackendToBuildResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StaticSitesClientLinkBackendToBuildResponse]{ + Tracer: client.internal.Tracer(), + }) } } // LinkBackendToBuild - Link backend to a static site build // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *StaticSitesClient) linkBackendToBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource, options *StaticSitesClientBeginLinkBackendToBuildOptions) (*http.Response, error) { + var err error + const operationName = "StaticSitesClient.BeginLinkBackendToBuild" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.linkBackendToBuildCreateRequest(ctx, resourceGroupName, name, environmentName, linkedBackendName, staticSiteLinkedBackendEnvelope, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // linkBackendToBuildCreateRequest creates the LinkBackendToBuild request. @@ -3348,15 +3650,18 @@ func (client *StaticSitesClient) linkBackendToBuildCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, staticSiteLinkedBackendEnvelope) + if err := runtime.MarshalAsJSON(req, staticSiteLinkedBackendEnvelope); err != nil { + return nil, err + } + return req, nil } // NewListPager - Description for Get all Static Sites for a subscription. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - options - StaticSitesClientListOptions contains the optional parameters for the StaticSitesClient.NewListPager method. func (client *StaticSitesClient) NewListPager(options *StaticSitesClientListOptions) *runtime.Pager[StaticSitesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[StaticSitesClientListResponse]{ @@ -3364,25 +3669,20 @@ func (client *StaticSitesClient) NewListPager(options *StaticSitesClientListOpti return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *StaticSitesClientListResponse) (StaticSitesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StaticSitesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return StaticSitesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return StaticSitesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -3398,7 +3698,7 @@ func (client *StaticSitesClient) listCreateRequest(ctx context.Context, options return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3415,7 +3715,7 @@ func (client *StaticSitesClient) listHandleResponse(resp *http.Response) (Static // NewListBasicAuthPager - Description for Gets the basic auth properties for a static site as a collection. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - options - StaticSitesClientListBasicAuthOptions contains the optional parameters for the StaticSitesClient.NewListBasicAuthPager @@ -3426,25 +3726,20 @@ func (client *StaticSitesClient) NewListBasicAuthPager(resourceGroupName string, return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *StaticSitesClientListBasicAuthResponse) (StaticSitesClientListBasicAuthResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBasicAuthCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return StaticSitesClientListBasicAuthResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StaticSitesClient.NewListBasicAuthPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBasicAuthCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return StaticSitesClientListBasicAuthResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientListBasicAuthResponse{}, runtime.NewResponseError(resp) - } return client.listBasicAuthHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -3468,7 +3763,7 @@ func (client *StaticSitesClient) listBasicAuthCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3486,24 +3781,31 @@ func (client *StaticSitesClient) listBasicAuthHandleResponse(resp *http.Response // ListStaticSiteAppSettings - Description for Gets the application settings of a static site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - options - StaticSitesClientListStaticSiteAppSettingsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteAppSettings // method. func (client *StaticSitesClient) ListStaticSiteAppSettings(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientListStaticSiteAppSettingsOptions) (StaticSitesClientListStaticSiteAppSettingsResponse, error) { + var err error + const operationName = "StaticSitesClient.ListStaticSiteAppSettings" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listStaticSiteAppSettingsCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return StaticSitesClientListStaticSiteAppSettingsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientListStaticSiteAppSettingsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientListStaticSiteAppSettingsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientListStaticSiteAppSettingsResponse{}, err } - return client.listStaticSiteAppSettingsHandleResponse(resp) + resp, err := client.listStaticSiteAppSettingsHandleResponse(httpResp) + return resp, err } // listStaticSiteAppSettingsCreateRequest creates the ListStaticSiteAppSettings request. @@ -3526,7 +3828,7 @@ func (client *StaticSitesClient) listStaticSiteAppSettingsCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3544,25 +3846,32 @@ func (client *StaticSitesClient) listStaticSiteAppSettingsHandleResponse(resp *h // ListStaticSiteBuildAppSettings - Description for Gets the application settings of a static site build. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - environmentName - The stage site identifier. // - options - StaticSitesClientListStaticSiteBuildAppSettingsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteBuildAppSettings // method. func (client *StaticSitesClient) ListStaticSiteBuildAppSettings(ctx context.Context, resourceGroupName string, name string, environmentName string, options *StaticSitesClientListStaticSiteBuildAppSettingsOptions) (StaticSitesClientListStaticSiteBuildAppSettingsResponse, error) { + var err error + const operationName = "StaticSitesClient.ListStaticSiteBuildAppSettings" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listStaticSiteBuildAppSettingsCreateRequest(ctx, resourceGroupName, name, environmentName, options) if err != nil { return StaticSitesClientListStaticSiteBuildAppSettingsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientListStaticSiteBuildAppSettingsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientListStaticSiteBuildAppSettingsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientListStaticSiteBuildAppSettingsResponse{}, err } - return client.listStaticSiteBuildAppSettingsHandleResponse(resp) + resp, err := client.listStaticSiteBuildAppSettingsHandleResponse(httpResp) + return resp, err } // listStaticSiteBuildAppSettingsCreateRequest creates the ListStaticSiteBuildAppSettings request. @@ -3589,7 +3898,7 @@ func (client *StaticSitesClient) listStaticSiteBuildAppSettingsCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3607,25 +3916,32 @@ func (client *StaticSitesClient) listStaticSiteBuildAppSettingsHandleResponse(re // ListStaticSiteBuildFunctionAppSettings - Description for Gets the application settings of a static site build. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - environmentName - The stage site identifier. // - options - StaticSitesClientListStaticSiteBuildFunctionAppSettingsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteBuildFunctionAppSettings // method. func (client *StaticSitesClient) ListStaticSiteBuildFunctionAppSettings(ctx context.Context, resourceGroupName string, name string, environmentName string, options *StaticSitesClientListStaticSiteBuildFunctionAppSettingsOptions) (StaticSitesClientListStaticSiteBuildFunctionAppSettingsResponse, error) { + var err error + const operationName = "StaticSitesClient.ListStaticSiteBuildFunctionAppSettings" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listStaticSiteBuildFunctionAppSettingsCreateRequest(ctx, resourceGroupName, name, environmentName, options) if err != nil { return StaticSitesClientListStaticSiteBuildFunctionAppSettingsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientListStaticSiteBuildFunctionAppSettingsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientListStaticSiteBuildFunctionAppSettingsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientListStaticSiteBuildFunctionAppSettingsResponse{}, err } - return client.listStaticSiteBuildFunctionAppSettingsHandleResponse(resp) + resp, err := client.listStaticSiteBuildFunctionAppSettingsHandleResponse(httpResp) + return resp, err } // listStaticSiteBuildFunctionAppSettingsCreateRequest creates the ListStaticSiteBuildFunctionAppSettings request. @@ -3652,7 +3968,7 @@ func (client *StaticSitesClient) listStaticSiteBuildFunctionAppSettingsCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3669,7 +3985,7 @@ func (client *StaticSitesClient) listStaticSiteBuildFunctionAppSettingsHandleRes // NewListStaticSiteBuildFunctionsPager - Description for Gets the functions of a particular static site build. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - environmentName - The stage site identifier. @@ -3681,25 +3997,20 @@ func (client *StaticSitesClient) NewListStaticSiteBuildFunctionsPager(resourceGr return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *StaticSitesClientListStaticSiteBuildFunctionsResponse) (StaticSitesClientListStaticSiteBuildFunctionsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listStaticSiteBuildFunctionsCreateRequest(ctx, resourceGroupName, name, environmentName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StaticSitesClient.NewListStaticSiteBuildFunctionsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listStaticSiteBuildFunctionsCreateRequest(ctx, resourceGroupName, name, environmentName, options) + }, nil) if err != nil { return StaticSitesClientListStaticSiteBuildFunctionsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return StaticSitesClientListStaticSiteBuildFunctionsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientListStaticSiteBuildFunctionsResponse{}, runtime.NewResponseError(resp) - } return client.listStaticSiteBuildFunctionsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -3727,7 +4038,7 @@ func (client *StaticSitesClient) listStaticSiteBuildFunctionsCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3745,24 +4056,31 @@ func (client *StaticSitesClient) listStaticSiteBuildFunctionsHandleResponse(resp // ListStaticSiteConfiguredRoles - Description for Lists the roles configured for the static site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - options - StaticSitesClientListStaticSiteConfiguredRolesOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteConfiguredRoles // method. func (client *StaticSitesClient) ListStaticSiteConfiguredRoles(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientListStaticSiteConfiguredRolesOptions) (StaticSitesClientListStaticSiteConfiguredRolesResponse, error) { + var err error + const operationName = "StaticSitesClient.ListStaticSiteConfiguredRoles" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listStaticSiteConfiguredRolesCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return StaticSitesClientListStaticSiteConfiguredRolesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientListStaticSiteConfiguredRolesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientListStaticSiteConfiguredRolesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientListStaticSiteConfiguredRolesResponse{}, err } - return client.listStaticSiteConfiguredRolesHandleResponse(resp) + resp, err := client.listStaticSiteConfiguredRolesHandleResponse(httpResp) + return resp, err } // listStaticSiteConfiguredRolesCreateRequest creates the ListStaticSiteConfiguredRoles request. @@ -3785,7 +4103,7 @@ func (client *StaticSitesClient) listStaticSiteConfiguredRolesCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3802,7 +4120,7 @@ func (client *StaticSitesClient) listStaticSiteConfiguredRolesHandleResponse(res // NewListStaticSiteCustomDomainsPager - Description for Gets all static site custom domains for a particular static site. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site resource to search in. // - options - StaticSitesClientListStaticSiteCustomDomainsOptions contains the optional parameters for the StaticSitesClient.NewListStaticSiteCustomDomainsPager @@ -3813,25 +4131,20 @@ func (client *StaticSitesClient) NewListStaticSiteCustomDomainsPager(resourceGro return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *StaticSitesClientListStaticSiteCustomDomainsResponse) (StaticSitesClientListStaticSiteCustomDomainsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listStaticSiteCustomDomainsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return StaticSitesClientListStaticSiteCustomDomainsResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StaticSitesClient.NewListStaticSiteCustomDomainsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listStaticSiteCustomDomainsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return StaticSitesClientListStaticSiteCustomDomainsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientListStaticSiteCustomDomainsResponse{}, runtime.NewResponseError(resp) - } return client.listStaticSiteCustomDomainsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -3855,7 +4168,7 @@ func (client *StaticSitesClient) listStaticSiteCustomDomainsCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3873,24 +4186,31 @@ func (client *StaticSitesClient) listStaticSiteCustomDomainsHandleResponse(resp // ListStaticSiteFunctionAppSettings - Description for Gets the application settings of a static site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - options - StaticSitesClientListStaticSiteFunctionAppSettingsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteFunctionAppSettings // method. func (client *StaticSitesClient) ListStaticSiteFunctionAppSettings(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientListStaticSiteFunctionAppSettingsOptions) (StaticSitesClientListStaticSiteFunctionAppSettingsResponse, error) { + var err error + const operationName = "StaticSitesClient.ListStaticSiteFunctionAppSettings" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listStaticSiteFunctionAppSettingsCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return StaticSitesClientListStaticSiteFunctionAppSettingsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientListStaticSiteFunctionAppSettingsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientListStaticSiteFunctionAppSettingsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientListStaticSiteFunctionAppSettingsResponse{}, err } - return client.listStaticSiteFunctionAppSettingsHandleResponse(resp) + resp, err := client.listStaticSiteFunctionAppSettingsHandleResponse(httpResp) + return resp, err } // listStaticSiteFunctionAppSettingsCreateRequest creates the ListStaticSiteFunctionAppSettings request. @@ -3913,7 +4233,7 @@ func (client *StaticSitesClient) listStaticSiteFunctionAppSettingsCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3930,7 +4250,7 @@ func (client *StaticSitesClient) listStaticSiteFunctionAppSettingsHandleResponse // NewListStaticSiteFunctionsPager - Description for Gets the functions of a static site. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - options - StaticSitesClientListStaticSiteFunctionsOptions contains the optional parameters for the StaticSitesClient.NewListStaticSiteFunctionsPager @@ -3941,25 +4261,20 @@ func (client *StaticSitesClient) NewListStaticSiteFunctionsPager(resourceGroupNa return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *StaticSitesClientListStaticSiteFunctionsResponse) (StaticSitesClientListStaticSiteFunctionsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listStaticSiteFunctionsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return StaticSitesClientListStaticSiteFunctionsResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StaticSitesClient.NewListStaticSiteFunctionsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listStaticSiteFunctionsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return StaticSitesClientListStaticSiteFunctionsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientListStaticSiteFunctionsResponse{}, runtime.NewResponseError(resp) - } return client.listStaticSiteFunctionsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -3983,7 +4298,7 @@ func (client *StaticSitesClient) listStaticSiteFunctionsCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -4001,24 +4316,31 @@ func (client *StaticSitesClient) listStaticSiteFunctionsHandleResponse(resp *htt // ListStaticSiteSecrets - Description for Lists the secrets for an existing static site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - options - StaticSitesClientListStaticSiteSecretsOptions contains the optional parameters for the StaticSitesClient.ListStaticSiteSecrets // method. func (client *StaticSitesClient) ListStaticSiteSecrets(ctx context.Context, resourceGroupName string, name string, options *StaticSitesClientListStaticSiteSecretsOptions) (StaticSitesClientListStaticSiteSecretsResponse, error) { + var err error + const operationName = "StaticSitesClient.ListStaticSiteSecrets" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listStaticSiteSecretsCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return StaticSitesClientListStaticSiteSecretsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientListStaticSiteSecretsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientListStaticSiteSecretsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientListStaticSiteSecretsResponse{}, err } - return client.listStaticSiteSecretsHandleResponse(resp) + resp, err := client.listStaticSiteSecretsHandleResponse(httpResp) + return resp, err } // listStaticSiteSecretsCreateRequest creates the ListStaticSiteSecrets request. @@ -4041,7 +4363,7 @@ func (client *StaticSitesClient) listStaticSiteSecretsCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -4058,7 +4380,7 @@ func (client *StaticSitesClient) listStaticSiteSecretsHandleResponse(resp *http. // NewListStaticSiteUsersPager - Description for Gets the list of users of a static site. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - authprovider - The auth provider for the users. @@ -4070,25 +4392,20 @@ func (client *StaticSitesClient) NewListStaticSiteUsersPager(resourceGroupName s return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *StaticSitesClientListStaticSiteUsersResponse) (StaticSitesClientListStaticSiteUsersResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listStaticSiteUsersCreateRequest(ctx, resourceGroupName, name, authprovider, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return StaticSitesClientListStaticSiteUsersResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "StaticSitesClient.NewListStaticSiteUsersPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listStaticSiteUsersCreateRequest(ctx, resourceGroupName, name, authprovider, options) + }, nil) if err != nil { return StaticSitesClientListStaticSiteUsersResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientListStaticSiteUsersResponse{}, runtime.NewResponseError(resp) - } return client.listStaticSiteUsersHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -4116,7 +4433,7 @@ func (client *StaticSitesClient) listStaticSiteUsersCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -4134,24 +4451,31 @@ func (client *StaticSitesClient) listStaticSiteUsersHandleResponse(resp *http.Re // PreviewWorkflow - Description for Generates a preview workflow file for the static site // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - location - Location where you plan to create the static site. // - staticSitesWorkflowPreviewRequest - A JSON representation of the StaticSitesWorkflowPreviewRequest properties. See example. // - options - StaticSitesClientPreviewWorkflowOptions contains the optional parameters for the StaticSitesClient.PreviewWorkflow // method. func (client *StaticSitesClient) PreviewWorkflow(ctx context.Context, location string, staticSitesWorkflowPreviewRequest StaticSitesWorkflowPreviewRequest, options *StaticSitesClientPreviewWorkflowOptions) (StaticSitesClientPreviewWorkflowResponse, error) { + var err error + const operationName = "StaticSitesClient.PreviewWorkflow" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.previewWorkflowCreateRequest(ctx, location, staticSitesWorkflowPreviewRequest, options) if err != nil { return StaticSitesClientPreviewWorkflowResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientPreviewWorkflowResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientPreviewWorkflowResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientPreviewWorkflowResponse{}, err } - return client.previewWorkflowHandleResponse(resp) + resp, err := client.previewWorkflowHandleResponse(httpResp) + return resp, err } // previewWorkflowCreateRequest creates the PreviewWorkflow request. @@ -4170,10 +4494,13 @@ func (client *StaticSitesClient) previewWorkflowCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, staticSitesWorkflowPreviewRequest) + if err := runtime.MarshalAsJSON(req, staticSitesWorkflowPreviewRequest); err != nil { + return nil, err + } + return req, nil } // previewWorkflowHandleResponse handles the PreviewWorkflow response. @@ -4189,7 +4516,7 @@ func (client *StaticSitesClient) previewWorkflowHandleResponse(resp *http.Respon // site // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - functionAppName - Name of the function app to register with the static site. @@ -4202,29 +4529,40 @@ func (client *StaticSitesClient) BeginRegisterUserProvidedFunctionAppWithStaticS if err != nil { return nil, err } - return runtime.NewPoller[StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteResponse]{ + Tracer: client.internal.Tracer(), + }) } } // RegisterUserProvidedFunctionAppWithStaticSite - Description for Register a user provided function app with a static site // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *StaticSitesClient) registerUserProvidedFunctionAppWithStaticSite(ctx context.Context, resourceGroupName string, name string, functionAppName string, staticSiteUserProvidedFunctionEnvelope StaticSiteUserProvidedFunctionAppARMResource, options *StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteOptions) (*http.Response, error) { + var err error + const operationName = "StaticSitesClient.BeginRegisterUserProvidedFunctionAppWithStaticSite" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.registerUserProvidedFunctionAppWithStaticSiteCreateRequest(ctx, resourceGroupName, name, functionAppName, staticSiteUserProvidedFunctionEnvelope, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // registerUserProvidedFunctionAppWithStaticSiteCreateRequest creates the RegisterUserProvidedFunctionAppWithStaticSite request. @@ -4254,17 +4592,20 @@ func (client *StaticSitesClient) registerUserProvidedFunctionAppWithStaticSiteCr if options != nil && options.IsForced != nil { reqQP.Set("isForced", strconv.FormatBool(*options.IsForced)) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, staticSiteUserProvidedFunctionEnvelope) + if err := runtime.MarshalAsJSON(req, staticSiteUserProvidedFunctionEnvelope); err != nil { + return nil, err + } + return req, nil } // BeginRegisterUserProvidedFunctionAppWithStaticSiteBuild - Description for Register a user provided function app with a // static site build // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - environmentName - The stage site identifier. @@ -4278,9 +4619,14 @@ func (client *StaticSitesClient) BeginRegisterUserProvidedFunctionAppWithStaticS if err != nil { return nil, err } - return runtime.NewPoller[StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StaticSitesClientRegisterUserProvidedFunctionAppWithStaticSiteBuildResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -4288,20 +4634,26 @@ func (client *StaticSitesClient) BeginRegisterUserProvidedFunctionAppWithStaticS // site build // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *StaticSitesClient) registerUserProvidedFunctionAppWithStaticSiteBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, functionAppName string, staticSiteUserProvidedFunctionEnvelope StaticSiteUserProvidedFunctionAppARMResource, options *StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteBuildOptions) (*http.Response, error) { + var err error + const operationName = "StaticSitesClient.BeginRegisterUserProvidedFunctionAppWithStaticSiteBuild" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.registerUserProvidedFunctionAppWithStaticSiteBuildCreateRequest(ctx, resourceGroupName, name, environmentName, functionAppName, staticSiteUserProvidedFunctionEnvelope, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // registerUserProvidedFunctionAppWithStaticSiteBuildCreateRequest creates the RegisterUserProvidedFunctionAppWithStaticSiteBuild request. @@ -4335,31 +4687,40 @@ func (client *StaticSitesClient) registerUserProvidedFunctionAppWithStaticSiteBu if options != nil && options.IsForced != nil { reqQP.Set("isForced", strconv.FormatBool(*options.IsForced)) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, staticSiteUserProvidedFunctionEnvelope) + if err := runtime.MarshalAsJSON(req, staticSiteUserProvidedFunctionEnvelope); err != nil { + return nil, err + } + return req, nil } // ResetStaticSiteAPIKey - Description for Resets the api key for an existing static site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - options - StaticSitesClientResetStaticSiteAPIKeyOptions contains the optional parameters for the StaticSitesClient.ResetStaticSiteAPIKey // method. func (client *StaticSitesClient) ResetStaticSiteAPIKey(ctx context.Context, resourceGroupName string, name string, resetPropertiesEnvelope StaticSiteResetPropertiesARMResource, options *StaticSitesClientResetStaticSiteAPIKeyOptions) (StaticSitesClientResetStaticSiteAPIKeyResponse, error) { + var err error + const operationName = "StaticSitesClient.ResetStaticSiteAPIKey" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.resetStaticSiteAPIKeyCreateRequest(ctx, resourceGroupName, name, resetPropertiesEnvelope, options) if err != nil { return StaticSitesClientResetStaticSiteAPIKeyResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientResetStaticSiteAPIKeyResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientResetStaticSiteAPIKeyResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientResetStaticSiteAPIKeyResponse{}, err } return StaticSitesClientResetStaticSiteAPIKeyResponse{}, nil } @@ -4384,32 +4745,41 @@ func (client *StaticSitesClient) resetStaticSiteAPIKeyCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, resetPropertiesEnvelope) + if err := runtime.MarshalAsJSON(req, resetPropertiesEnvelope); err != nil { + return nil, err + } + return req, nil } // UnlinkBackend - Unlink a backend from a static site // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site // - linkedBackendName - Name of the backend linked to the static site // - options - StaticSitesClientUnlinkBackendOptions contains the optional parameters for the StaticSitesClient.UnlinkBackend // method. func (client *StaticSitesClient) UnlinkBackend(ctx context.Context, resourceGroupName string, name string, linkedBackendName string, options *StaticSitesClientUnlinkBackendOptions) (StaticSitesClientUnlinkBackendResponse, error) { + var err error + const operationName = "StaticSitesClient.UnlinkBackend" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.unlinkBackendCreateRequest(ctx, resourceGroupName, name, linkedBackendName, options) if err != nil { return StaticSitesClientUnlinkBackendResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientUnlinkBackendResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return StaticSitesClientUnlinkBackendResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientUnlinkBackendResponse{}, err } return StaticSitesClientUnlinkBackendResponse{}, nil } @@ -4441,7 +4811,7 @@ func (client *StaticSitesClient) unlinkBackendCreateRequest(ctx context.Context, if options != nil && options.IsCleaningAuthConfig != nil { reqQP.Set("isCleaningAuthConfig", strconv.FormatBool(*options.IsCleaningAuthConfig)) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -4450,7 +4820,7 @@ func (client *StaticSitesClient) unlinkBackendCreateRequest(ctx context.Context, // UnlinkBackendFromBuild - Unlink a backend from a static site build // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site // - environmentName - The stage site identifier @@ -4458,16 +4828,22 @@ func (client *StaticSitesClient) unlinkBackendCreateRequest(ctx context.Context, // - options - StaticSitesClientUnlinkBackendFromBuildOptions contains the optional parameters for the StaticSitesClient.UnlinkBackendFromBuild // method. func (client *StaticSitesClient) UnlinkBackendFromBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, linkedBackendName string, options *StaticSitesClientUnlinkBackendFromBuildOptions) (StaticSitesClientUnlinkBackendFromBuildResponse, error) { + var err error + const operationName = "StaticSitesClient.UnlinkBackendFromBuild" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.unlinkBackendFromBuildCreateRequest(ctx, resourceGroupName, name, environmentName, linkedBackendName, options) if err != nil { return StaticSitesClientUnlinkBackendFromBuildResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientUnlinkBackendFromBuildResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return StaticSitesClientUnlinkBackendFromBuildResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientUnlinkBackendFromBuildResponse{}, err } return StaticSitesClientUnlinkBackendFromBuildResponse{}, nil } @@ -4503,7 +4879,7 @@ func (client *StaticSitesClient) unlinkBackendFromBuildCreateRequest(ctx context if options != nil && options.IsCleaningAuthConfig != nil { reqQP.Set("isCleaningAuthConfig", strconv.FormatBool(*options.IsCleaningAuthConfig)) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -4512,7 +4888,7 @@ func (client *StaticSitesClient) unlinkBackendFromBuildCreateRequest(ctx context // UpdateBuildDatabaseConnection - Description for Create or update a database connection for a static site build // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site // - environmentName - The stage site identifier. @@ -4521,18 +4897,25 @@ func (client *StaticSitesClient) unlinkBackendFromBuildCreateRequest(ctx context // - options - StaticSitesClientUpdateBuildDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.UpdateBuildDatabaseConnection // method. func (client *StaticSitesClient) UpdateBuildDatabaseConnection(ctx context.Context, resourceGroupName string, name string, environmentName string, databaseConnectionName string, databaseConnectionRequestEnvelope DatabaseConnectionPatchRequest, options *StaticSitesClientUpdateBuildDatabaseConnectionOptions) (StaticSitesClientUpdateBuildDatabaseConnectionResponse, error) { + var err error + const operationName = "StaticSitesClient.UpdateBuildDatabaseConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateBuildDatabaseConnectionCreateRequest(ctx, resourceGroupName, name, environmentName, databaseConnectionName, databaseConnectionRequestEnvelope, options) if err != nil { return StaticSitesClientUpdateBuildDatabaseConnectionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientUpdateBuildDatabaseConnectionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientUpdateBuildDatabaseConnectionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientUpdateBuildDatabaseConnectionResponse{}, err } - return client.updateBuildDatabaseConnectionHandleResponse(resp) + resp, err := client.updateBuildDatabaseConnectionHandleResponse(httpResp) + return resp, err } // updateBuildDatabaseConnectionCreateRequest creates the UpdateBuildDatabaseConnection request. @@ -4563,10 +4946,13 @@ func (client *StaticSitesClient) updateBuildDatabaseConnectionCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, databaseConnectionRequestEnvelope) + if err := runtime.MarshalAsJSON(req, databaseConnectionRequestEnvelope); err != nil { + return nil, err + } + return req, nil } // updateBuildDatabaseConnectionHandleResponse handles the UpdateBuildDatabaseConnection response. @@ -4581,7 +4967,7 @@ func (client *StaticSitesClient) updateBuildDatabaseConnectionHandleResponse(res // UpdateDatabaseConnection - Description for Create or update a database connection for a static site // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site // - databaseConnectionName - Name of the database connection. @@ -4589,18 +4975,25 @@ func (client *StaticSitesClient) updateBuildDatabaseConnectionHandleResponse(res // - options - StaticSitesClientUpdateDatabaseConnectionOptions contains the optional parameters for the StaticSitesClient.UpdateDatabaseConnection // method. func (client *StaticSitesClient) UpdateDatabaseConnection(ctx context.Context, resourceGroupName string, name string, databaseConnectionName string, databaseConnectionRequestEnvelope DatabaseConnectionPatchRequest, options *StaticSitesClientUpdateDatabaseConnectionOptions) (StaticSitesClientUpdateDatabaseConnectionResponse, error) { + var err error + const operationName = "StaticSitesClient.UpdateDatabaseConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateDatabaseConnectionCreateRequest(ctx, resourceGroupName, name, databaseConnectionName, databaseConnectionRequestEnvelope, options) if err != nil { return StaticSitesClientUpdateDatabaseConnectionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientUpdateDatabaseConnectionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientUpdateDatabaseConnectionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientUpdateDatabaseConnectionResponse{}, err } - return client.updateDatabaseConnectionHandleResponse(resp) + resp, err := client.updateDatabaseConnectionHandleResponse(httpResp) + return resp, err } // updateDatabaseConnectionCreateRequest creates the UpdateDatabaseConnection request. @@ -4627,10 +5020,13 @@ func (client *StaticSitesClient) updateDatabaseConnectionCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, databaseConnectionRequestEnvelope) + if err := runtime.MarshalAsJSON(req, databaseConnectionRequestEnvelope); err != nil { + return nil, err + } + return req, nil } // updateDatabaseConnectionHandleResponse handles the UpdateDatabaseConnection response. @@ -4646,25 +5042,32 @@ func (client *StaticSitesClient) updateDatabaseConnectionHandleResponse(resp *ht // site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site to create or update. // - staticSiteEnvelope - A JSON representation of the staticsite properties. See example. // - options - StaticSitesClientUpdateStaticSiteOptions contains the optional parameters for the StaticSitesClient.UpdateStaticSite // method. func (client *StaticSitesClient) UpdateStaticSite(ctx context.Context, resourceGroupName string, name string, staticSiteEnvelope StaticSitePatchResource, options *StaticSitesClientUpdateStaticSiteOptions) (StaticSitesClientUpdateStaticSiteResponse, error) { + var err error + const operationName = "StaticSitesClient.UpdateStaticSite" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateStaticSiteCreateRequest(ctx, resourceGroupName, name, staticSiteEnvelope, options) if err != nil { return StaticSitesClientUpdateStaticSiteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientUpdateStaticSiteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return StaticSitesClientUpdateStaticSiteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientUpdateStaticSiteResponse{}, err } - return client.updateStaticSiteHandleResponse(resp) + resp, err := client.updateStaticSiteHandleResponse(httpResp) + return resp, err } // updateStaticSiteCreateRequest creates the UpdateStaticSite request. @@ -4687,10 +5090,13 @@ func (client *StaticSitesClient) updateStaticSiteCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, staticSiteEnvelope) + if err := runtime.MarshalAsJSON(req, staticSiteEnvelope); err != nil { + return nil, err + } + return req, nil } // updateStaticSiteHandleResponse handles the UpdateStaticSite response. @@ -4705,7 +5111,7 @@ func (client *StaticSitesClient) updateStaticSiteHandleResponse(resp *http.Respo // UpdateStaticSiteUser - Description for Updates a user entry with the listed roles // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - authprovider - The auth provider for this user. @@ -4714,18 +5120,25 @@ func (client *StaticSitesClient) updateStaticSiteHandleResponse(resp *http.Respo // - options - StaticSitesClientUpdateStaticSiteUserOptions contains the optional parameters for the StaticSitesClient.UpdateStaticSiteUser // method. func (client *StaticSitesClient) UpdateStaticSiteUser(ctx context.Context, resourceGroupName string, name string, authprovider string, userid string, staticSiteUserEnvelope StaticSiteUserARMResource, options *StaticSitesClientUpdateStaticSiteUserOptions) (StaticSitesClientUpdateStaticSiteUserResponse, error) { + var err error + const operationName = "StaticSitesClient.UpdateStaticSiteUser" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateStaticSiteUserCreateRequest(ctx, resourceGroupName, name, authprovider, userid, staticSiteUserEnvelope, options) if err != nil { return StaticSitesClientUpdateStaticSiteUserResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return StaticSitesClientUpdateStaticSiteUserResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return StaticSitesClientUpdateStaticSiteUserResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return StaticSitesClientUpdateStaticSiteUserResponse{}, err } - return client.updateStaticSiteUserHandleResponse(resp) + resp, err := client.updateStaticSiteUserHandleResponse(httpResp) + return resp, err } // updateStaticSiteUserCreateRequest creates the UpdateStaticSiteUser request. @@ -4756,10 +5169,13 @@ func (client *StaticSitesClient) updateStaticSiteUserCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, staticSiteUserEnvelope) + if err := runtime.MarshalAsJSON(req, staticSiteUserEnvelope); err != nil { + return nil, err + } + return req, nil } // updateStaticSiteUserHandleResponse handles the UpdateStaticSiteUser response. @@ -4774,7 +5190,7 @@ func (client *StaticSitesClient) updateStaticSiteUserHandleResponse(resp *http.R // BeginValidateBackend - Validates that a backend can be linked to a static site // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site // - linkedBackendName - Name of the linked backend that should be retrieved @@ -4787,29 +5203,40 @@ func (client *StaticSitesClient) BeginValidateBackend(ctx context.Context, resou if err != nil { return nil, err } - return runtime.NewPoller[StaticSitesClientValidateBackendResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StaticSitesClientValidateBackendResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[StaticSitesClientValidateBackendResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StaticSitesClientValidateBackendResponse]{ + Tracer: client.internal.Tracer(), + }) } } // ValidateBackend - Validates that a backend can be linked to a static site // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *StaticSitesClient) validateBackend(ctx context.Context, resourceGroupName string, name string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource, options *StaticSitesClientBeginValidateBackendOptions) (*http.Response, error) { + var err error + const operationName = "StaticSitesClient.BeginValidateBackend" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.validateBackendCreateRequest(ctx, resourceGroupName, name, linkedBackendName, staticSiteLinkedBackendEnvelope, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // validateBackendCreateRequest creates the ValidateBackend request. @@ -4836,16 +5263,19 @@ func (client *StaticSitesClient) validateBackendCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, staticSiteLinkedBackendEnvelope) + if err := runtime.MarshalAsJSON(req, staticSiteLinkedBackendEnvelope); err != nil { + return nil, err + } + return req, nil } // BeginValidateBackendForBuild - Validates that a backend can be linked to a static site build // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site // - environmentName - The stage site identifier @@ -4859,29 +5289,40 @@ func (client *StaticSitesClient) BeginValidateBackendForBuild(ctx context.Contex if err != nil { return nil, err } - return runtime.NewPoller[StaticSitesClientValidateBackendForBuildResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StaticSitesClientValidateBackendForBuildResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[StaticSitesClientValidateBackendForBuildResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StaticSitesClientValidateBackendForBuildResponse]{ + Tracer: client.internal.Tracer(), + }) } } // ValidateBackendForBuild - Validates that a backend can be linked to a static site build // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *StaticSitesClient) validateBackendForBuild(ctx context.Context, resourceGroupName string, name string, environmentName string, linkedBackendName string, staticSiteLinkedBackendEnvelope StaticSiteLinkedBackendARMResource, options *StaticSitesClientBeginValidateBackendForBuildOptions) (*http.Response, error) { + var err error + const operationName = "StaticSitesClient.BeginValidateBackendForBuild" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.validateBackendForBuildCreateRequest(ctx, resourceGroupName, name, environmentName, linkedBackendName, staticSiteLinkedBackendEnvelope, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // validateBackendForBuildCreateRequest creates the ValidateBackendForBuild request. @@ -4912,17 +5353,20 @@ func (client *StaticSitesClient) validateBackendForBuildCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, staticSiteLinkedBackendEnvelope) + if err := runtime.MarshalAsJSON(req, staticSiteLinkedBackendEnvelope); err != nil { + return nil, err + } + return req, nil } // BeginValidateCustomDomainCanBeAddedToStaticSite - Description for Validates a particular custom domain can be added to // a static site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the static site. // - domainName - The custom domain to validate. @@ -4936,9 +5380,14 @@ func (client *StaticSitesClient) BeginValidateCustomDomainCanBeAddedToStaticSite if err != nil { return nil, err } - return runtime.NewPoller[StaticSitesClientValidateCustomDomainCanBeAddedToStaticSiteResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[StaticSitesClientValidateCustomDomainCanBeAddedToStaticSiteResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[StaticSitesClientValidateCustomDomainCanBeAddedToStaticSiteResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[StaticSitesClientValidateCustomDomainCanBeAddedToStaticSiteResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -4946,20 +5395,26 @@ func (client *StaticSitesClient) BeginValidateCustomDomainCanBeAddedToStaticSite // site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *StaticSitesClient) validateCustomDomainCanBeAddedToStaticSite(ctx context.Context, resourceGroupName string, name string, domainName string, staticSiteCustomDomainRequestPropertiesEnvelope StaticSiteCustomDomainRequestPropertiesARMResource, options *StaticSitesClientBeginValidateCustomDomainCanBeAddedToStaticSiteOptions) (*http.Response, error) { + var err error + const operationName = "StaticSitesClient.BeginValidateCustomDomainCanBeAddedToStaticSite" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.validateCustomDomainCanBeAddedToStaticSiteCreateRequest(ctx, resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // validateCustomDomainCanBeAddedToStaticSiteCreateRequest creates the ValidateCustomDomainCanBeAddedToStaticSite request. @@ -4986,8 +5441,11 @@ func (client *StaticSitesClient) validateCustomDomainCanBeAddedToStaticSiteCreat return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, staticSiteCustomDomainRequestPropertiesEnvelope) + if err := runtime.MarshalAsJSON(req, staticSiteCustomDomainRequestPropertiesEnvelope); err != nil { + return nil, err + } + return req, nil } diff --git a/sdk/resourcemanager/appservice/armappservice/staticsites_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/staticsites_client_example_test.go deleted file mode 100644 index 6860fdd360b5..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/staticsites_client_example_test.go +++ /dev/null @@ -1,2499 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GenerateStaticSiteWorkflowPreview.json -func ExampleStaticSitesClient_PreviewWorkflow() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewStaticSitesClient().PreviewWorkflow(ctx, "West US 2", armappservice.StaticSitesWorkflowPreviewRequest{ - Properties: &armappservice.StaticSitesWorkflowPreviewRequestProperties{ - Branch: to.Ptr("master"), - BuildProperties: &armappservice.StaticSiteBuildProperties{ - APILocation: to.Ptr("api"), - AppArtifactLocation: to.Ptr("build"), - AppLocation: to.Ptr("app"), - }, - RepositoryURL: to.Ptr("https://github.com/username/RepoName"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.StaticSitesWorkflowPreview = armappservice.StaticSitesWorkflowPreview{ - // Properties: &armappservice.StaticSitesWorkflowPreviewProperties{ - // Path: to.Ptr(".github/workflows/azure-static-web-apps-.yml"), - // Contents: to.Ptr("base64encodedworkflowcontentspreview"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetAllStaticSites.json -func ExampleStaticSitesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewStaticSitesClient().NewListPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.StaticSiteCollection = armappservice.StaticSiteCollection{ - // Value: []*armappservice.StaticSiteARMResource{ - // { - // Name: to.Ptr("testStaticSite0"), - // Type: to.Ptr("Microsoft.Web/staticSites"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0"), - // Location: to.Ptr("West US 2"), - // Properties: &armappservice.StaticSite{ - // AllowConfigFileUpdates: to.Ptr(true), - // Branch: to.Ptr("demo"), - // ContentDistributionEndpoint: to.Ptr(""), - // CustomDomains: []*string{ - // }, - // DefaultHostname: to.Ptr("happy-sea-15afae3e.azurestaticwebsites.net"), - // KeyVaultReferenceIdentity: to.Ptr("SystemAssigned"), - // PrivateEndpointConnections: []*armappservice.ResponseMessageEnvelopeRemotePrivateEndpointConnection{ - // }, - // RepositoryURL: to.Ptr("https://github.com/username/repo"), - // StagingEnvironmentPolicy: to.Ptr(armappservice.StagingEnvironmentPolicyEnabled), - // UserProvidedFunctionApps: []*armappservice.StaticSiteUserProvidedFunctionApp{ - // }, - // }, - // SKU: &armappservice.SKUDescription{ - // Name: to.Ptr("Standard"), - // Tier: to.Ptr("Standard"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetStaticSites.json -func ExampleStaticSitesClient_NewGetStaticSitesByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewStaticSitesClient().NewGetStaticSitesByResourceGroupPager("rg", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.StaticSiteCollection = armappservice.StaticSiteCollection{ - // Value: []*armappservice.StaticSiteARMResource{ - // { - // Name: to.Ptr("testStaticSite0"), - // Type: to.Ptr("Microsoft.Web/staticSites"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0"), - // Location: to.Ptr("West US 2"), - // Properties: &armappservice.StaticSite{ - // AllowConfigFileUpdates: to.Ptr(true), - // Branch: to.Ptr("demo"), - // ContentDistributionEndpoint: to.Ptr(""), - // CustomDomains: []*string{ - // }, - // DefaultHostname: to.Ptr("happy-sea-15afae3e.azurestaticwebsites.net"), - // KeyVaultReferenceIdentity: to.Ptr("SystemAssigned"), - // LinkedBackends: []*armappservice.StaticSiteLinkedBackend{ - // }, - // PrivateEndpointConnections: []*armappservice.ResponseMessageEnvelopeRemotePrivateEndpointConnection{ - // }, - // RepositoryURL: to.Ptr("https://github.com/username/repo"), - // StagingEnvironmentPolicy: to.Ptr(armappservice.StagingEnvironmentPolicyEnabled), - // }, - // SKU: &armappservice.SKUDescription{ - // Name: to.Ptr("Standard"), - // Tier: to.Ptr("Standard"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetStaticSite.json -func ExampleStaticSitesClient_GetStaticSite() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewStaticSitesClient().GetStaticSite(ctx, "rg", "testStaticSite0", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.StaticSiteARMResource = armappservice.StaticSiteARMResource{ - // Name: to.Ptr("testStaticSite0"), - // Type: to.Ptr("Microsoft.Web/staticSites"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0"), - // Location: to.Ptr("West US 2"), - // Properties: &armappservice.StaticSite{ - // AllowConfigFileUpdates: to.Ptr(true), - // Branch: to.Ptr("demo"), - // ContentDistributionEndpoint: to.Ptr(""), - // CustomDomains: []*string{ - // }, - // DefaultHostname: to.Ptr("happy-sea-15afae3e.azurestaticwebsites.net"), - // KeyVaultReferenceIdentity: to.Ptr("SystemAssigned"), - // LinkedBackends: []*armappservice.StaticSiteLinkedBackend{ - // { - // BackendResourceID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.ApiManagement/service/apimService0"), - // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-27T04:57:24.8058474"); return t}()), - // ProvisioningState: to.Ptr("Succeeded"), - // }}, - // PrivateEndpointConnections: []*armappservice.ResponseMessageEnvelopeRemotePrivateEndpointConnection{ - // }, - // RepositoryURL: to.Ptr("https://github.com/username/repo"), - // StagingEnvironmentPolicy: to.Ptr(armappservice.StagingEnvironmentPolicyEnabled), - // }, - // SKU: &armappservice.SKUDescription{ - // Name: to.Ptr("Basic"), - // Tier: to.Ptr("Basic"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/CreateOrUpdateStaticSite.json -func ExampleStaticSitesClient_BeginCreateOrUpdateStaticSite() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewStaticSitesClient().BeginCreateOrUpdateStaticSite(ctx, "rg", "testStaticSite0", armappservice.StaticSiteARMResource{ - Location: to.Ptr("West US 2"), - Properties: &armappservice.StaticSite{ - Branch: to.Ptr("master"), - BuildProperties: &armappservice.StaticSiteBuildProperties{ - APILocation: to.Ptr("api"), - AppArtifactLocation: to.Ptr("build"), - AppLocation: to.Ptr("app"), - }, - RepositoryToken: to.Ptr("repoToken123"), - RepositoryURL: to.Ptr("https://github.com/username/RepoName"), - }, - SKU: &armappservice.SKUDescription{ - Name: to.Ptr("Basic"), - Tier: to.Ptr("Basic"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.StaticSiteARMResource = armappservice.StaticSiteARMResource{ - // Name: to.Ptr("testStaticSite0"), - // Type: to.Ptr("Microsoft.Web/staticSites"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0"), - // Location: to.Ptr("West US 2"), - // Properties: &armappservice.StaticSite{ - // AllowConfigFileUpdates: to.Ptr(true), - // Branch: to.Ptr("demo"), - // ContentDistributionEndpoint: to.Ptr(""), - // CustomDomains: []*string{ - // }, - // DefaultHostname: to.Ptr("happy-sea-15afae3e.azurestaticwebsites.net"), - // KeyVaultReferenceIdentity: to.Ptr("SystemAssigned"), - // LinkedBackends: []*armappservice.StaticSiteLinkedBackend{ - // }, - // PrivateEndpointConnections: []*armappservice.ResponseMessageEnvelopeRemotePrivateEndpointConnection{ - // }, - // RepositoryURL: to.Ptr("https://github.com/username/RepoName"), - // StagingEnvironmentPolicy: to.Ptr(armappservice.StagingEnvironmentPolicyEnabled), - // }, - // SKU: &armappservice.SKUDescription{ - // Name: to.Ptr("Basic"), - // Tier: to.Ptr("Basic"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/DeleteStaticSite.json -func ExampleStaticSitesClient_BeginDeleteStaticSite() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewStaticSitesClient().BeginDeleteStaticSite(ctx, "rg", "testStaticSite0", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/PatchStaticSite.json -func ExampleStaticSitesClient_UpdateStaticSite() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewStaticSitesClient().UpdateStaticSite(ctx, "rg", "testStaticSite0", armappservice.StaticSitePatchResource{ - Properties: &armappservice.StaticSite{}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.StaticSiteARMResource = armappservice.StaticSiteARMResource{ - // Name: to.Ptr("testStaticSite0"), - // Type: to.Ptr("Microsoft.Web/staticSites"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0"), - // Location: to.Ptr("West US 2"), - // Properties: &armappservice.StaticSite{ - // AllowConfigFileUpdates: to.Ptr(true), - // Branch: to.Ptr("demo"), - // ContentDistributionEndpoint: to.Ptr(""), - // CustomDomains: []*string{ - // }, - // DefaultHostname: to.Ptr("happy-sea-15afae3e.azurestaticwebsites.net"), - // KeyVaultReferenceIdentity: to.Ptr("SystemAssigned"), - // PrivateEndpointConnections: []*armappservice.ResponseMessageEnvelopeRemotePrivateEndpointConnection{ - // }, - // RepositoryURL: to.Ptr("https://github.com/username/RepoName"), - // StagingEnvironmentPolicy: to.Ptr(armappservice.StagingEnvironmentPolicyEnabled), - // UserProvidedFunctionApps: []*armappservice.StaticSiteUserProvidedFunctionApp{ - // }, - // }, - // SKU: &armappservice.SKUDescription{ - // Name: to.Ptr("Basic"), - // Tier: to.Ptr("Basic"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListStaticSiteUsers.json -func ExampleStaticSitesClient_NewListStaticSiteUsersPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewStaticSitesClient().NewListStaticSiteUsersPager("rg", "testStaticSite0", "all", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.StaticSiteUserCollection = armappservice.StaticSiteUserCollection{ - // Value: []*armappservice.StaticSiteUserARMResource{ - // { - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/authproviders/all/users/1234"), - // Properties: &armappservice.StaticSiteUserARMResourceProperties{ - // DisplayName: to.Ptr("username"), - // Provider: to.Ptr("aad"), - // Roles: to.Ptr("admin,anonymous,authenticated"), - // UserID: to.Ptr("1234"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/DeleteStaticSiteUser.json -func ExampleStaticSitesClient_DeleteStaticSiteUser() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewStaticSitesClient().DeleteStaticSiteUser(ctx, "rg", "testStaticSite0", "aad", "1234", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/UpdateStaticSiteUser.json -func ExampleStaticSitesClient_UpdateStaticSiteUser() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewStaticSitesClient().UpdateStaticSiteUser(ctx, "rg", "testStaticSite0", "aad", "1234", armappservice.StaticSiteUserARMResource{ - Properties: &armappservice.StaticSiteUserARMResourceProperties{ - Roles: to.Ptr("contributor"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.StaticSiteUserARMResource = armappservice.StaticSiteUserARMResource{ - // Properties: &armappservice.StaticSiteUserARMResourceProperties{ - // DisplayName: to.Ptr("username"), - // Provider: to.Ptr("aad"), - // Roles: to.Ptr("contributor,anonymous,authenticated"), - // UserID: to.Ptr("1234"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetStaticSiteBuilds.json -func ExampleStaticSitesClient_NewGetStaticSiteBuildsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewStaticSitesClient().NewGetStaticSiteBuildsPager("rg", "testStaticSite0", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.StaticSiteBuildCollection = armappservice.StaticSiteBuildCollection{ - // Value: []*armappservice.StaticSiteBuildARMResource{ - // { - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/builds/default"), - // Properties: &armappservice.StaticSiteBuildARMResourceProperties{ - // BuildID: to.Ptr("default"), - // CreatedTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-04T17:33:11.641Z"); return t}()), - // Hostname: to.Ptr("happy-sea-15afae3e.azurestaticwebsites.net"), - // LastUpdatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-04T17:33:11.641Z"); return t}()), - // LinkedBackends: []*armappservice.StaticSiteLinkedBackend{ - // }, - // SourceBranch: to.Ptr("demo"), - // Status: to.Ptr(armappservice.BuildStatusReady), - // }, - // }, - // { - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/builds/12"), - // Properties: &armappservice.StaticSiteBuildARMResourceProperties{ - // BuildID: to.Ptr("12"), - // CreatedTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-04T17:33:11.641Z"); return t}()), - // Hostname: to.Ptr("happy-sea-15afae3e-12.westus2.azurestaticwebsites.net"), - // LastUpdatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-04T17:33:11.641Z"); return t}()), - // LinkedBackends: []*armappservice.StaticSiteLinkedBackend{ - // { - // BackendResourceID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.ApiManagement/service/apimService0"), - // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-27T04:57:24.8058474"); return t}()), - // ProvisioningState: to.Ptr("Succeeded"), - // }}, - // PullRequestTitle: to.Ptr("Update README.md"), - // SourceBranch: to.Ptr("demo-patch2"), - // Status: to.Ptr(armappservice.BuildStatusReady), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetStaticSiteBuild.json -func ExampleStaticSitesClient_GetStaticSiteBuild() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewStaticSitesClient().GetStaticSiteBuild(ctx, "rg", "testStaticSite0", "12", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.StaticSiteBuildARMResource = armappservice.StaticSiteBuildARMResource{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/builds/12"), - // Properties: &armappservice.StaticSiteBuildARMResourceProperties{ - // BuildID: to.Ptr("12"), - // CreatedTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-04T17:33:11.641Z"); return t}()), - // Hostname: to.Ptr("happy-sea-15afae3e-12.westus2.azurestaticwebsites.net"), - // LastUpdatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-04T17:33:11.641Z"); return t}()), - // LinkedBackends: []*armappservice.StaticSiteLinkedBackend{ - // { - // BackendResourceID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.ApiManagement/service/apimService0"), - // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-27T04:57:24.8058474"); return t}()), - // ProvisioningState: to.Ptr("Succeeded"), - // }}, - // PullRequestTitle: to.Ptr("Update README.md"), - // SourceBranch: to.Ptr("pr-branch"), - // Status: to.Ptr(armappservice.BuildStatusUploading), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/DeleteStaticSiteBuild.json -func ExampleStaticSitesClient_BeginDeleteStaticSiteBuild() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewStaticSitesClient().BeginDeleteStaticSiteBuild(ctx, "rg", "testStaticSite0", "12", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/CreateOrUpdateStaticSiteBuildAppSettings.json -func ExampleStaticSitesClient_CreateOrUpdateStaticSiteBuildAppSettings() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewStaticSitesClient().CreateOrUpdateStaticSiteBuildAppSettings(ctx, "rg", "testStaticSite0", "12", armappservice.StringDictionary{ - Properties: map[string]*string{ - "setting1": to.Ptr("someval"), - "setting2": to.Ptr("someval2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.StringDictionary = armappservice.StringDictionary{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/builds/12/config/appSettings"), - // Properties: map[string]*string{ - // "setting1": to.Ptr("someval"), - // "setting2": to.Ptr("someval2"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/CreateOrUpdateStaticSiteBuildFunctionAppSettings.json -func ExampleStaticSitesClient_CreateOrUpdateStaticSiteBuildFunctionAppSettings() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewStaticSitesClient().CreateOrUpdateStaticSiteBuildFunctionAppSettings(ctx, "rg", "testStaticSite0", "12", armappservice.StringDictionary{ - Properties: map[string]*string{ - "setting1": to.Ptr("someval"), - "setting2": to.Ptr("someval2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.StringDictionary = armappservice.StringDictionary{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/builds/12/config/appSettings"), - // Properties: map[string]*string{ - // "setting1": to.Ptr("someval"), - // "setting2": to.Ptr("someval2"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetStaticSiteBuildDatabaseConnections.json -func ExampleStaticSitesClient_NewGetBuildDatabaseConnectionsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewStaticSitesClient().NewGetBuildDatabaseConnectionsPager("rg", "testStaticSite0", "default", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DatabaseConnectionCollection = armappservice.DatabaseConnectionCollection{ - // Value: []*armappservice.DatabaseConnection{ - // { - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Web/staticSites/builds/databaseConnections"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/builds/default/databaseConnections/default"), - // Properties: &armappservice.DatabaseConnectionProperties{ - // ConnectionIdentity: to.Ptr("SystemAssigned"), - // Region: to.Ptr("West US 2"), - // ResourceID: to.Ptr("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/databaseRG/providers/Microsoft.DocumentDB/databaseAccounts/exampleDatabaseName"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetStaticSiteBuildDatabaseConnection.json -func ExampleStaticSitesClient_GetBuildDatabaseConnection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewStaticSitesClient().GetBuildDatabaseConnection(ctx, "rg", "testStaticSite0", "default", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DatabaseConnection = armappservice.DatabaseConnection{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Web/staticSites/builds/databaseConnections"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/builds/default/databaseConnections/default"), - // Properties: &armappservice.DatabaseConnectionProperties{ - // ConnectionIdentity: to.Ptr("SystemAssigned"), - // Region: to.Ptr("West US 2"), - // ResourceID: to.Ptr("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/databaseRG/providers/Microsoft.DocumentDB/databaseAccounts/exampleDatabaseName"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/CreateOrUpdateStaticSiteBuildDatabaseConnection.json -func ExampleStaticSitesClient_CreateOrUpdateBuildDatabaseConnection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewStaticSitesClient().CreateOrUpdateBuildDatabaseConnection(ctx, "rg", "testStaticSite0", "default", "default", armappservice.DatabaseConnection{ - Properties: &armappservice.DatabaseConnectionProperties{ - ConnectionIdentity: to.Ptr("SystemAssigned"), - ConnectionString: to.Ptr("AccountEndpoint=https://exampleDatabaseName.documents.azure.com:443/;Database=mydb;"), - Region: to.Ptr("West US 2"), - ResourceID: to.Ptr("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/databaseRG/providers/Microsoft.DocumentDB/databaseAccounts/exampleDatabaseName"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DatabaseConnection = armappservice.DatabaseConnection{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Web/staticSites/builds/databaseConnections"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/builds/default/databaseConnections/default"), - // Properties: &armappservice.DatabaseConnectionProperties{ - // ConnectionIdentity: to.Ptr("SystemAssigned"), - // Region: to.Ptr("West US 2"), - // ResourceID: to.Ptr("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/databaseRG/providers/Microsoft.DocumentDB/databaseAccounts/exampleDatabaseName"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/DeleteStaticSiteBuildDatabaseConnection.json -func ExampleStaticSitesClient_DeleteBuildDatabaseConnection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewStaticSitesClient().DeleteBuildDatabaseConnection(ctx, "rg", "testStaticSite0", "default", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/PatchStaticSiteBuildDatabaseConnection.json -func ExampleStaticSitesClient_UpdateBuildDatabaseConnection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewStaticSitesClient().UpdateBuildDatabaseConnection(ctx, "rg", "testStaticSite0", "default", "default", armappservice.DatabaseConnectionPatchRequest{ - Properties: &armappservice.DatabaseConnectionPatchRequestProperties{}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DatabaseConnection = armappservice.DatabaseConnection{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Web/staticSites/builds/databaseConnections"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/builds/default/databaseConnections/default"), - // Properties: &armappservice.DatabaseConnectionProperties{ - // ConnectionIdentity: to.Ptr("SystemAssigned"), - // Region: to.Ptr("West US 2"), - // ResourceID: to.Ptr("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/databaseRG/providers/Microsoft.DocumentDB/databaseAccounts/exampleDatabaseName"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetStaticSiteBuildDatabaseConnectionWithDetails.json -func ExampleStaticSitesClient_GetBuildDatabaseConnectionWithDetails() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewStaticSitesClient().GetBuildDatabaseConnectionWithDetails(ctx, "rg", "testStaticSite0", "default", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DatabaseConnection = armappservice.DatabaseConnection{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Web/staticSites/builds/databaseConnections"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/builds/default/databaseConnections/default"), - // Properties: &armappservice.DatabaseConnectionProperties{ - // ConfigurationFiles: []*armappservice.StaticSiteDatabaseConnectionConfigurationFileOverview{ - // { - // Type: to.Ptr("configuration"), - // Contents: to.Ptr("base64encodeddatabaseconfiguration"), - // FileName: to.Ptr("staticwebapp.database.config.json"), - // }, - // { - // Type: to.Ptr("graphqlschema"), - // Contents: to.Ptr("base64encodeddatabasegraphqlschema"), - // FileName: to.Ptr("staticwebapp.database.schema.gql"), - // }}, - // ConnectionIdentity: to.Ptr("SystemAssigned"), - // ConnectionString: to.Ptr("AccountEndpoint=https://exampleDatabaseName.documents.azure.com:443/;Database=mydb;"), - // Region: to.Ptr("West US 2"), - // ResourceID: to.Ptr("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/databaseRG/providers/Microsoft.DocumentDB/databaseAccounts/exampleDatabaseName"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListStaticSiteBuildFunctions.json -func ExampleStaticSitesClient_NewListStaticSiteBuildFunctionsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewStaticSitesClient().NewListStaticSiteBuildFunctionsPager("rg", "testStaticSite0", "default", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.StaticSiteFunctionOverviewCollection = armappservice.StaticSiteFunctionOverviewCollection{ - // Value: []*armappservice.StaticSiteFunctionOverviewARMResource{ - // { - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/builds/default/functions/GetList"), - // Properties: &armappservice.StaticSiteFunctionOverviewARMResourceProperties{ - // FunctionName: to.Ptr("GetList"), - // TriggerType: to.Ptr(armappservice.TriggerTypesHTTPTrigger), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListStaticSiteBuildAppSettings.json -func ExampleStaticSitesClient_ListStaticSiteBuildAppSettings() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewStaticSitesClient().ListStaticSiteBuildAppSettings(ctx, "rg", "testStaticSite0", "12", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.StringDictionary = armappservice.StringDictionary{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/builds/12/config/appSettings"), - // Properties: map[string]*string{ - // "setting0": to.Ptr("someVal"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListStaticSiteBuildFunctionAppSettings.json -func ExampleStaticSitesClient_ListStaticSiteBuildFunctionAppSettings() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewStaticSitesClient().ListStaticSiteBuildFunctionAppSettings(ctx, "rg", "testStaticSite0", "12", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.StringDictionary = armappservice.StringDictionary{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/builds/12/config/appSettings"), - // Properties: map[string]*string{ - // "setting0": to.Ptr("someVal"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetStaticSiteBuildDatabaseConnectionsWithDetails.json -func ExampleStaticSitesClient_NewGetBuildDatabaseConnectionsWithDetailsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewStaticSitesClient().NewGetBuildDatabaseConnectionsWithDetailsPager("rg", "testStaticSite0", "default", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DatabaseConnectionCollection = armappservice.DatabaseConnectionCollection{ - // Value: []*armappservice.DatabaseConnection{ - // { - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Web/staticSites/builds/databaseConnections"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/builds/default/databaseConnections/default"), - // Properties: &armappservice.DatabaseConnectionProperties{ - // ConfigurationFiles: []*armappservice.StaticSiteDatabaseConnectionConfigurationFileOverview{ - // { - // Type: to.Ptr("configuration"), - // Contents: to.Ptr("base64encodeddatabaseconfiguration"), - // FileName: to.Ptr("staticwebapp.database.config.json"), - // }, - // { - // Type: to.Ptr("graphqlschema"), - // Contents: to.Ptr("base64encodeddatabasegraphqlschema"), - // FileName: to.Ptr("staticwebapp.database.schema.gql"), - // }}, - // ConnectionIdentity: to.Ptr("SystemAssigned"), - // ConnectionString: to.Ptr("AccountEndpoint=https://exampleDatabaseName.documents.azure.com:443/;Database=mydb;"), - // Region: to.Ptr("West US 2"), - // ResourceID: to.Ptr("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/databaseRG/providers/Microsoft.DocumentDB/databaseAccounts/exampleDatabaseName"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetUserProvidedFunctionAppsForStaticSiteBuild.json -func ExampleStaticSitesClient_NewGetUserProvidedFunctionAppsForStaticSiteBuildPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewStaticSitesClient().NewGetUserProvidedFunctionAppsForStaticSiteBuildPager("rg", "testStaticSite0", "default", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.StaticSiteUserProvidedFunctionAppsCollection = armappservice.StaticSiteUserProvidedFunctionAppsCollection{ - // Value: []*armappservice.StaticSiteUserProvidedFunctionAppARMResource{ - // { - // Name: to.Ptr("testFunctionApp"), - // Type: to.Ptr("Microsoft.Web/staticSites/builds/userProvidedFunctionApps"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/builds/default/userProvidedFunctionApps/testFunctionApp"), - // Properties: &armappservice.StaticSiteUserProvidedFunctionAppARMResourceProperties{ - // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-04T17:33:11.641Z"); return t}()), - // FunctionAppRegion: to.Ptr("West US 2"), - // FunctionAppResourceID: to.Ptr("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/functionRG/providers/Microsoft.Web/sites/testFunctionApp"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetUserProvidedFunctionAppForStaticSiteBuild.json -func ExampleStaticSitesClient_GetUserProvidedFunctionAppForStaticSiteBuild() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewStaticSitesClient().GetUserProvidedFunctionAppForStaticSiteBuild(ctx, "rg", "testStaticSite0", "default", "testFunctionApp", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.StaticSiteUserProvidedFunctionAppARMResource = armappservice.StaticSiteUserProvidedFunctionAppARMResource{ - // Name: to.Ptr("testFunctionApp"), - // Type: to.Ptr("Microsoft.Web/staticSites/builds/userProvidedFunctionApps"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/builds/default/userProvidedFunctionApps/testFunctionApp"), - // Properties: &armappservice.StaticSiteUserProvidedFunctionAppARMResourceProperties{ - // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-04T17:33:11.641Z"); return t}()), - // FunctionAppRegion: to.Ptr("West US 2"), - // FunctionAppResourceID: to.Ptr("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/functionRG/providers/Microsoft.Web/sites/testFunctionApp"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/RegisterUserProvidedFunctionAppWithStaticSiteBuild.json -func ExampleStaticSitesClient_BeginRegisterUserProvidedFunctionAppWithStaticSiteBuild() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewStaticSitesClient().BeginRegisterUserProvidedFunctionAppWithStaticSiteBuild(ctx, "rg", "testStaticSite0", "default", "testFunctionApp", armappservice.StaticSiteUserProvidedFunctionAppARMResource{ - Properties: &armappservice.StaticSiteUserProvidedFunctionAppARMResourceProperties{ - FunctionAppRegion: to.Ptr("West US 2"), - FunctionAppResourceID: to.Ptr("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/functionRG/providers/Microsoft.Web/sites/testFunctionApp"), - }, - }, &armappservice.StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteBuildOptions{IsForced: to.Ptr(true)}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.StaticSiteUserProvidedFunctionAppARMResource = armappservice.StaticSiteUserProvidedFunctionAppARMResource{ - // Name: to.Ptr("testFunctionApp"), - // Type: to.Ptr("Microsoft.Web/staticSites/builds/userProvidedFunctionApps"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/builds/default/userProvidedFunctionApps/testFunctionApp"), - // Properties: &armappservice.StaticSiteUserProvidedFunctionAppARMResourceProperties{ - // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-04T17:33:11.641Z"); return t}()), - // FunctionAppRegion: to.Ptr("West US 2"), - // FunctionAppResourceID: to.Ptr("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/functionRG/providers/Microsoft.Web/sites/testFunctionApp"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/DetachUserProvidedFunctionAppFromStaticSiteBuild.json -func ExampleStaticSitesClient_DetachUserProvidedFunctionAppFromStaticSiteBuild() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewStaticSitesClient().DetachUserProvidedFunctionAppFromStaticSiteBuild(ctx, "rg", "testStaticSite0", "12", "testFunctionApp", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/StaticSiteBuildZipDeploy.json -func ExampleStaticSitesClient_BeginCreateZipDeploymentForStaticSiteBuild() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewStaticSitesClient().BeginCreateZipDeploymentForStaticSiteBuild(ctx, "rg", "testStaticSite0", "12", armappservice.StaticSiteZipDeploymentARMResource{ - Properties: &armappservice.StaticSiteZipDeployment{ - APIZipURL: to.Ptr("https://teststorageaccount.net/happy-sea-15afae3e-master-81828877/api-zipdeploy.zip"), - AppZipURL: to.Ptr("https://teststorageaccount.net/happy-sea-15afae3e-master-81828877/app-zipdeploy.zip"), - DeploymentTitle: to.Ptr("Update index.html"), - FunctionLanguage: to.Ptr("testFunctionLanguage"), - Provider: to.Ptr("testProvider"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/CreateOrUpdateStaticSiteAppSettings.json -func ExampleStaticSitesClient_CreateOrUpdateStaticSiteAppSettings() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewStaticSitesClient().CreateOrUpdateStaticSiteAppSettings(ctx, "rg", "testStaticSite0", armappservice.StringDictionary{ - Properties: map[string]*string{ - "setting1": to.Ptr("someval"), - "setting2": to.Ptr("someval2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.StringDictionary = armappservice.StringDictionary{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/config/appSettings"), - // Properties: map[string]*string{ - // "setting1": to.Ptr("someval"), - // "setting2": to.Ptr("someval2"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListStaticSiteBasicAuth.json -func ExampleStaticSitesClient_NewListBasicAuthPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewStaticSitesClient().NewListBasicAuthPager("rg", "testStaticSite0", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.StaticSiteBasicAuthPropertiesCollection = armappservice.StaticSiteBasicAuthPropertiesCollection{ - // Value: []*armappservice.StaticSiteBasicAuthPropertiesARMResource{ - // { - // Name: to.Ptr("default"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/basicAuth/default"), - // Properties: &armappservice.StaticSiteBasicAuthPropertiesARMResourceProperties{ - // ApplicableEnvironmentsMode: to.Ptr("AllEnvironments"), - // SecretState: to.Ptr("Password"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetStaticSiteBasicAuth.json -func ExampleStaticSitesClient_GetBasicAuth() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewStaticSitesClient().GetBasicAuth(ctx, "rg", "testStaticSite0", armappservice.BasicAuthNameDefault, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.StaticSiteBasicAuthPropertiesARMResource = armappservice.StaticSiteBasicAuthPropertiesARMResource{ - // Name: to.Ptr("default"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/basicAuth/default"), - // Properties: &armappservice.StaticSiteBasicAuthPropertiesARMResourceProperties{ - // ApplicableEnvironmentsMode: to.Ptr("AllEnvironments"), - // SecretState: to.Ptr("Password"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/CreateOrUpdateStaticSiteBasicAuth.json -func ExampleStaticSitesClient_CreateOrUpdateBasicAuth() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewStaticSitesClient().CreateOrUpdateBasicAuth(ctx, "rg", "testStaticSite0", armappservice.BasicAuthNameDefault, armappservice.StaticSiteBasicAuthPropertiesARMResource{ - Properties: &armappservice.StaticSiteBasicAuthPropertiesARMResourceProperties{ - ApplicableEnvironmentsMode: to.Ptr("AllEnvironments"), - Password: to.Ptr("**********************"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.StaticSiteBasicAuthPropertiesARMResource = armappservice.StaticSiteBasicAuthPropertiesARMResource{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/basicAuth/default"), - // Properties: &armappservice.StaticSiteBasicAuthPropertiesARMResourceProperties{ - // ApplicableEnvironmentsMode: to.Ptr("AllEnvironments"), - // SecretState: to.Ptr("Password"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/CreateOrUpdateStaticSiteFunctionAppSettings.json -func ExampleStaticSitesClient_CreateOrUpdateStaticSiteFunctionAppSettings() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewStaticSitesClient().CreateOrUpdateStaticSiteFunctionAppSettings(ctx, "rg", "testStaticSite0", armappservice.StringDictionary{ - Properties: map[string]*string{ - "setting1": to.Ptr("someval"), - "setting2": to.Ptr("someval2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.StringDictionary = armappservice.StringDictionary{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/config/appSettings"), - // Properties: map[string]*string{ - // "setting1": to.Ptr("someval"), - // "setting2": to.Ptr("someval2"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/CreateUserRolesInvitationLink.json -func ExampleStaticSitesClient_CreateUserRolesInvitationLink() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewStaticSitesClient().CreateUserRolesInvitationLink(ctx, "rg", "testStaticSite0", armappservice.StaticSiteUserInvitationRequestResource{ - Properties: &armappservice.StaticSiteUserInvitationRequestResourceProperties{ - Domain: to.Ptr("happy-sea-15afae3e.azurestaticwebsites.net"), - NumHoursToExpiration: to.Ptr[int32](1), - Provider: to.Ptr("aad"), - Roles: to.Ptr("admin,contributor"), - UserDetails: to.Ptr("username"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.StaticSiteUserInvitationResponseResource = armappservice.StaticSiteUserInvitationResponseResource{ - // Properties: &armappservice.StaticSiteUserInvitationResponseResourceProperties{ - // ExpiresOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-02-28T16:53:56.211Z"); return t}()), - // InvitationURL: to.Ptr("https://happy-sea-15afae3e.azurestaticwebsites.net?invite=asdf"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetStaticSiteCustomDomains.json -func ExampleStaticSitesClient_NewListStaticSiteCustomDomainsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewStaticSitesClient().NewListStaticSiteCustomDomainsPager("rg", "testStaticSite0", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.StaticSiteCustomDomainOverviewCollection = armappservice.StaticSiteCustomDomainOverviewCollection{ - // Value: []*armappservice.StaticSiteCustomDomainOverviewARMResource{ - // { - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSitesBuilds/testStaticSite0/customDomains/custom.domain.net"), - // Properties: &armappservice.StaticSiteCustomDomainOverviewARMResourceProperties{ - // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-04T17:33:11.641Z"); return t}()), - // DomainName: to.Ptr("custom.domain.net"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetStaticSiteCustomDomain.json -func ExampleStaticSitesClient_GetStaticSiteCustomDomain() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewStaticSitesClient().GetStaticSiteCustomDomain(ctx, "rg", "testStaticSite0", "custom.domain.net", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.StaticSiteCustomDomainOverviewARMResource = armappservice.StaticSiteCustomDomainOverviewARMResource{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSitesBuilds/testStaticSite0/customDomains/custom.domain.net"), - // Properties: &armappservice.StaticSiteCustomDomainOverviewARMResourceProperties{ - // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-04T17:33:11.641Z"); return t}()), - // DomainName: to.Ptr("custom.domain.net"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/CreateOrUpdateStaticSiteCustomDomain.json -func ExampleStaticSitesClient_BeginCreateOrUpdateStaticSiteCustomDomain() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewStaticSitesClient().BeginCreateOrUpdateStaticSiteCustomDomain(ctx, "rg", "testStaticSite0", "custom.domain.net", armappservice.StaticSiteCustomDomainRequestPropertiesARMResource{ - Properties: &armappservice.StaticSiteCustomDomainRequestPropertiesARMResourceProperties{}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.StaticSiteCustomDomainOverviewARMResource = armappservice.StaticSiteCustomDomainOverviewARMResource{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSitesBuilds/testStaticSite0/customDomains/custom.domain.net"), - // Properties: &armappservice.StaticSiteCustomDomainOverviewARMResourceProperties{ - // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-04T17:33:11.641Z"); return t}()), - // DomainName: to.Ptr("custom.domain.net"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/DeleteStaticSiteCustomDomain.json -func ExampleStaticSitesClient_BeginDeleteStaticSiteCustomDomain() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewStaticSitesClient().BeginDeleteStaticSiteCustomDomain(ctx, "rg", "testStaticSite0", "custom.domain.net", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ValidateStaticSiteCustomDomain.json -func ExampleStaticSitesClient_BeginValidateCustomDomainCanBeAddedToStaticSite() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewStaticSitesClient().BeginValidateCustomDomainCanBeAddedToStaticSite(ctx, "rg", "testStaticSite0", "custom.domain.net", armappservice.StaticSiteCustomDomainRequestPropertiesARMResource{ - Properties: &armappservice.StaticSiteCustomDomainRequestPropertiesARMResourceProperties{}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetStaticSiteDatabaseConnections.json -func ExampleStaticSitesClient_NewGetDatabaseConnectionsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewStaticSitesClient().NewGetDatabaseConnectionsPager("rg", "testStaticSite0", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DatabaseConnectionCollection = armappservice.DatabaseConnectionCollection{ - // Value: []*armappservice.DatabaseConnection{ - // { - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Web/staticSites/databaseConnections"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/databaseConnections/default"), - // Properties: &armappservice.DatabaseConnectionProperties{ - // ConnectionIdentity: to.Ptr("SystemAssigned"), - // Region: to.Ptr("West US 2"), - // ResourceID: to.Ptr("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/databaseRG/providers/Microsoft.DocumentDB/databaseAccounts/exampleDatabaseName"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetStaticSiteDatabaseConnection.json -func ExampleStaticSitesClient_GetDatabaseConnection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewStaticSitesClient().GetDatabaseConnection(ctx, "rg", "testStaticSite0", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DatabaseConnection = armappservice.DatabaseConnection{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Web/staticSites/databaseConnections"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/databaseConnections/default"), - // Properties: &armappservice.DatabaseConnectionProperties{ - // ConnectionIdentity: to.Ptr("SystemAssigned"), - // Region: to.Ptr("West US 2"), - // ResourceID: to.Ptr("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/databaseRG/providers/Microsoft.DocumentDB/databaseAccounts/exampleDatabaseName"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/CreateOrUpdateStaticSiteDatabaseConnection.json -func ExampleStaticSitesClient_CreateOrUpdateDatabaseConnection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewStaticSitesClient().CreateOrUpdateDatabaseConnection(ctx, "rg", "testStaticSite0", "default", armappservice.DatabaseConnection{ - Properties: &armappservice.DatabaseConnectionProperties{ - ConnectionIdentity: to.Ptr("SystemAssigned"), - ConnectionString: to.Ptr("AccountEndpoint=https://exampleDatabaseName.documents.azure.com:443/;Database=mydb;"), - Region: to.Ptr("West US 2"), - ResourceID: to.Ptr("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/databaseRG/providers/Microsoft.DocumentDB/databaseAccounts/exampleDatabaseName"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DatabaseConnection = armappservice.DatabaseConnection{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Web/staticSites/databaseConnections"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/databaseConnections/default"), - // Properties: &armappservice.DatabaseConnectionProperties{ - // ConnectionIdentity: to.Ptr("SystemAssigned"), - // Region: to.Ptr("West US 2"), - // ResourceID: to.Ptr("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/databaseRG/providers/Microsoft.DocumentDB/databaseAccounts/exampleDatabaseName"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/DeleteStaticSiteDatabaseConnection.json -func ExampleStaticSitesClient_DeleteDatabaseConnection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewStaticSitesClient().DeleteDatabaseConnection(ctx, "rg", "testStaticSite0", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/PatchStaticSiteDatabaseConnection.json -func ExampleStaticSitesClient_UpdateDatabaseConnection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewStaticSitesClient().UpdateDatabaseConnection(ctx, "rg", "testStaticSite0", "default", armappservice.DatabaseConnectionPatchRequest{ - Properties: &armappservice.DatabaseConnectionPatchRequestProperties{}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DatabaseConnection = armappservice.DatabaseConnection{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Web/staticSites/databaseConnections"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/databaseConnections/default"), - // Properties: &armappservice.DatabaseConnectionProperties{ - // ConnectionIdentity: to.Ptr("SystemAssigned"), - // Region: to.Ptr("West US 2"), - // ResourceID: to.Ptr("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/databaseRG/providers/Microsoft.DocumentDB/databaseAccounts/exampleDatabaseName"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetStaticSiteDatabaseConnectionWithDetails.json -func ExampleStaticSitesClient_GetDatabaseConnectionWithDetails() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewStaticSitesClient().GetDatabaseConnectionWithDetails(ctx, "rg", "testStaticSite0", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.DatabaseConnection = armappservice.DatabaseConnection{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Web/staticSites/databaseConnections"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/databaseConnections/default"), - // Properties: &armappservice.DatabaseConnectionProperties{ - // ConfigurationFiles: []*armappservice.StaticSiteDatabaseConnectionConfigurationFileOverview{ - // { - // Type: to.Ptr("configuration"), - // Contents: to.Ptr("base64encodeddatabaseconfiguration"), - // FileName: to.Ptr("staticwebapp.database.config.json"), - // }, - // { - // Type: to.Ptr("graphqlschema"), - // Contents: to.Ptr("base64encodeddatabasegraphqlschema"), - // FileName: to.Ptr("staticwebapp.database.schema.gql"), - // }}, - // ConnectionIdentity: to.Ptr("SystemAssigned"), - // ConnectionString: to.Ptr("AccountEndpoint=https://exampleDatabaseName.documents.azure.com:443/;Database=mydb;"), - // Region: to.Ptr("West US 2"), - // ResourceID: to.Ptr("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/databaseRG/providers/Microsoft.DocumentDB/databaseAccounts/exampleDatabaseName"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/DetachStaticSite.json -func ExampleStaticSitesClient_BeginDetachStaticSite() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewStaticSitesClient().BeginDetachStaticSite(ctx, "rg", "testStaticSite0", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListStaticSiteFunctions.json -func ExampleStaticSitesClient_NewListStaticSiteFunctionsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewStaticSitesClient().NewListStaticSiteFunctionsPager("rg", "testStaticSite0", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.StaticSiteFunctionOverviewCollection = armappservice.StaticSiteFunctionOverviewCollection{ - // Value: []*armappservice.StaticSiteFunctionOverviewARMResource{ - // { - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/functions/GetList"), - // Properties: &armappservice.StaticSiteFunctionOverviewARMResourceProperties{ - // FunctionName: to.Ptr("GetList"), - // TriggerType: to.Ptr(armappservice.TriggerTypesHTTPTrigger), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListStaticSiteAppSettings.json -func ExampleStaticSitesClient_ListStaticSiteAppSettings() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewStaticSitesClient().ListStaticSiteAppSettings(ctx, "rg", "testStaticSite0", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.StringDictionary = armappservice.StringDictionary{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/appSettings"), - // Properties: map[string]*string{ - // "setting0": to.Ptr("someVal"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListStaticSiteConfiguredRoles.json -func ExampleStaticSitesClient_ListStaticSiteConfiguredRoles() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewStaticSitesClient().ListStaticSiteConfiguredRoles(ctx, "rg", "testStaticSite0", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.StringList = armappservice.StringList{ - // Properties: []*string{ - // to.Ptr("authenticated"), - // to.Ptr("anonymous"), - // to.Ptr("customRole1")}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListStaticSiteFunctionAppSettings.json -func ExampleStaticSitesClient_ListStaticSiteFunctionAppSettings() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewStaticSitesClient().ListStaticSiteFunctionAppSettings(ctx, "rg", "testStaticSite0", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.StringDictionary = armappservice.StringDictionary{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/config/appsettings"), - // Properties: map[string]*string{ - // "setting0": to.Ptr("someVal"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListStaticSiteSecrets.json -func ExampleStaticSitesClient_ListStaticSiteSecrets() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewStaticSitesClient().ListStaticSiteSecrets(ctx, "rg", "testStaticSite0", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.StringDictionary = armappservice.StringDictionary{ - // Properties: map[string]*string{ - // "dnsOwnershipKey": to.Ptr("ownershipKey123123"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetSitePrivateEndpointConnectionList.json -func ExampleStaticSitesClient_NewGetPrivateEndpointConnectionListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewStaticSitesClient().NewGetPrivateEndpointConnectionListPager("rg", "testStaticSite0", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.PrivateEndpointConnectionCollection = armappservice.PrivateEndpointConnectionCollection{ - // Value: []*armappservice.RemotePrivateEndpointConnectionARMResource{ - // { - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/sites/testSite/privateEndpointConnections/connection"), - // Properties: &armappservice.RemotePrivateEndpointConnectionARMResourceProperties{ - // PrivateEndpoint: &armappservice.ArmIDWrapper{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"), - // }, - // PrivateLinkServiceConnectionState: &armappservice.PrivateLinkConnectionState{ - // Description: to.Ptr("Approved by admin."), - // ActionsRequired: to.Ptr(""), - // Status: to.Ptr("Approved"), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetSitePrivateEndpointConnection.json -func ExampleStaticSitesClient_GetPrivateEndpointConnection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewStaticSitesClient().GetPrivateEndpointConnection(ctx, "rg", "testSite", "connection", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.RemotePrivateEndpointConnectionARMResource = armappservice.RemotePrivateEndpointConnectionARMResource{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/sites/testSite/privateEndpointConnections/connection"), - // Properties: &armappservice.RemotePrivateEndpointConnectionARMResourceProperties{ - // PrivateEndpoint: &armappservice.ArmIDWrapper{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"), - // }, - // PrivateLinkServiceConnectionState: &armappservice.PrivateLinkConnectionState{ - // Description: to.Ptr("Approved by admin."), - // ActionsRequired: to.Ptr(""), - // Status: to.Ptr("Approved"), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ApproveRejectSitePrivateEndpointConnection.json -func ExampleStaticSitesClient_BeginApproveOrRejectPrivateEndpointConnection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewStaticSitesClient().BeginApproveOrRejectPrivateEndpointConnection(ctx, "rg", "testSite", "connection", armappservice.PrivateLinkConnectionApprovalRequestResource{ - Properties: &armappservice.PrivateLinkConnectionApprovalRequest{ - PrivateLinkServiceConnectionState: &armappservice.PrivateLinkConnectionState{ - Description: to.Ptr("Approved by admin."), - ActionsRequired: to.Ptr(""), - Status: to.Ptr("Approved"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.RemotePrivateEndpointConnectionARMResource = armappservice.RemotePrivateEndpointConnectionARMResource{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/sites/testSite/privateEndpointConnections/connection"), - // Properties: &armappservice.RemotePrivateEndpointConnectionARMResourceProperties{ - // PrivateEndpoint: &armappservice.ArmIDWrapper{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"), - // }, - // PrivateLinkServiceConnectionState: &armappservice.PrivateLinkConnectionState{ - // Description: to.Ptr("Approved by admin."), - // ActionsRequired: to.Ptr(""), - // Status: to.Ptr("Approved"), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/DeleteSitePrivateEndpointConnection.json -func ExampleStaticSitesClient_BeginDeletePrivateEndpointConnection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewStaticSitesClient().BeginDeletePrivateEndpointConnection(ctx, "rg", "testSite", "connection", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Interface = map[string]any{ - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetSitePrivateLinkResources.json -func ExampleStaticSitesClient_GetPrivateLinkResources() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewStaticSitesClient().GetPrivateLinkResources(ctx, "rg", "testSite", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PrivateLinkResourcesWrapper = armappservice.PrivateLinkResourcesWrapper{ - // Value: []*armappservice.PrivateLinkResource{ - // { - // Name: to.Ptr("site"), - // Type: to.Ptr("Microsoft.Web/sites/privateLinkResources"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/sites/testSite/privateLinkResources/site"), - // Properties: &armappservice.PrivateLinkResourceProperties{ - // GroupID: to.Ptr("sites"), - // RequiredMembers: []*string{ - // to.Ptr("sites")}, - // RequiredZoneNames: []*string{ - // to.Ptr("privatelink.testsite.azurewebsites.net")}, - // }, - // }}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ResetStaticSiteApiKey.json -func ExampleStaticSitesClient_ResetStaticSiteAPIKey() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewStaticSitesClient().ResetStaticSiteAPIKey(ctx, "rg", "testStaticSite0", armappservice.StaticSiteResetPropertiesARMResource{ - Properties: &armappservice.StaticSiteResetPropertiesARMResourceProperties{ - RepositoryToken: to.Ptr("repoToken123"), - ShouldUpdateRepository: to.Ptr(true), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetStaticSiteDatabaseConnectionsWithDetails.json -func ExampleStaticSitesClient_NewGetDatabaseConnectionsWithDetailsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewStaticSitesClient().NewGetDatabaseConnectionsWithDetailsPager("rg", "testStaticSite0", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.DatabaseConnectionCollection = armappservice.DatabaseConnectionCollection{ - // Value: []*armappservice.DatabaseConnection{ - // { - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.Web/staticSites/databaseConnections"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/databaseConnections/default"), - // Properties: &armappservice.DatabaseConnectionProperties{ - // ConfigurationFiles: []*armappservice.StaticSiteDatabaseConnectionConfigurationFileOverview{ - // { - // Type: to.Ptr("configuration"), - // Contents: to.Ptr("base64encodeddatabaseconfiguration"), - // FileName: to.Ptr("staticwebapp.database.config.json"), - // }, - // { - // Type: to.Ptr("graphqlschema"), - // Contents: to.Ptr("base64encodeddatabasegraphqlschema"), - // FileName: to.Ptr("staticwebapp.database.schema.gql"), - // }}, - // ConnectionIdentity: to.Ptr("SystemAssigned"), - // ConnectionString: to.Ptr("AccountEndpoint=https://exampleDatabaseName.documents.azure.com:443/;Database=mydb;"), - // Region: to.Ptr("West US 2"), - // ResourceID: to.Ptr("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/databaseRG/providers/Microsoft.DocumentDB/databaseAccounts/exampleDatabaseName"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetUserProvidedFunctionAppsForStaticSite.json -func ExampleStaticSitesClient_NewGetUserProvidedFunctionAppsForStaticSitePager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewStaticSitesClient().NewGetUserProvidedFunctionAppsForStaticSitePager("rg", "testStaticSite0", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.StaticSiteUserProvidedFunctionAppsCollection = armappservice.StaticSiteUserProvidedFunctionAppsCollection{ - // Value: []*armappservice.StaticSiteUserProvidedFunctionAppARMResource{ - // { - // Name: to.Ptr("testFunctionApp"), - // Type: to.Ptr("Microsoft.Web/staticSites/builds/userProvidedFunctionApps"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/builds/default/userProvidedFunctionApps/testFunctionApp"), - // Properties: &armappservice.StaticSiteUserProvidedFunctionAppARMResourceProperties{ - // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-04T17:33:11.641Z"); return t}()), - // FunctionAppRegion: to.Ptr("West US 2"), - // FunctionAppResourceID: to.Ptr("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/functionRG/providers/Microsoft.Web/sites/testFunctionApp"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetUserProvidedFunctionAppForStaticSite.json -func ExampleStaticSitesClient_GetUserProvidedFunctionAppForStaticSite() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewStaticSitesClient().GetUserProvidedFunctionAppForStaticSite(ctx, "rg", "testStaticSite0", "testFunctionApp", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.StaticSiteUserProvidedFunctionAppARMResource = armappservice.StaticSiteUserProvidedFunctionAppARMResource{ - // Name: to.Ptr("testFunctionApp"), - // Type: to.Ptr("Microsoft.Web/staticSites/builds/userProvidedFunctionApps"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/builds/default/userProvidedFunctionApps/testFunctionApp"), - // Properties: &armappservice.StaticSiteUserProvidedFunctionAppARMResourceProperties{ - // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-04T17:33:11.641Z"); return t}()), - // FunctionAppRegion: to.Ptr("West US 2"), - // FunctionAppResourceID: to.Ptr("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/functionRG/providers/Microsoft.Web/sites/testFunctionApp"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/RegisterUserProvidedFunctionAppWithStaticSite.json -func ExampleStaticSitesClient_BeginRegisterUserProvidedFunctionAppWithStaticSite() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewStaticSitesClient().BeginRegisterUserProvidedFunctionAppWithStaticSite(ctx, "rg", "testStaticSite0", "testFunctionApp", armappservice.StaticSiteUserProvidedFunctionAppARMResource{ - Properties: &armappservice.StaticSiteUserProvidedFunctionAppARMResourceProperties{ - FunctionAppRegion: to.Ptr("West US 2"), - FunctionAppResourceID: to.Ptr("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/functionRG/providers/Microsoft.Web/sites/testFunctionApp"), - }, - }, &armappservice.StaticSitesClientBeginRegisterUserProvidedFunctionAppWithStaticSiteOptions{IsForced: to.Ptr(true)}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.StaticSiteUserProvidedFunctionAppARMResource = armappservice.StaticSiteUserProvidedFunctionAppARMResource{ - // Name: to.Ptr("testFunctionApp"), - // Type: to.Ptr("Microsoft.Web/staticSites/builds/userProvidedFunctionApps"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/builds/default/userProvidedFunctionApps/testFunctionApp"), - // Properties: &armappservice.StaticSiteUserProvidedFunctionAppARMResourceProperties{ - // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-04T17:33:11.641Z"); return t}()), - // FunctionAppRegion: to.Ptr("West US 2"), - // FunctionAppResourceID: to.Ptr("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/functionRG/providers/Microsoft.Web/sites/testFunctionApp"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/DetachUserProvidedFunctionAppFromStaticSite.json -func ExampleStaticSitesClient_DetachUserProvidedFunctionAppFromStaticSite() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewStaticSitesClient().DetachUserProvidedFunctionAppFromStaticSite(ctx, "rg", "testStaticSite0", "testFunctionApp", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/StaticSiteZipDeploy.json -func ExampleStaticSitesClient_BeginCreateZipDeploymentForStaticSite() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewStaticSitesClient().BeginCreateZipDeploymentForStaticSite(ctx, "rg", "testStaticSite0", armappservice.StaticSiteZipDeploymentARMResource{ - Properties: &armappservice.StaticSiteZipDeployment{ - APIZipURL: to.Ptr("https://teststorageaccount.net/happy-sea-15afae3e-master-81828877/api-zipdeploy.zip"), - AppZipURL: to.Ptr("https://teststorageaccount.net/happy-sea-15afae3e-master-81828877/app-zipdeploy.zip"), - DeploymentTitle: to.Ptr("Update index.html"), - FunctionLanguage: to.Ptr("testFunctionLanguage"), - Provider: to.Ptr("testProvider"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ValidateLinkedBackendForStaticSite.json -func ExampleStaticSitesClient_BeginValidateBackend() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewStaticSitesClient().BeginValidateBackend(ctx, "rg", "testStaticSite0", "testBackend", armappservice.StaticSiteLinkedBackendARMResource{ - Properties: &armappservice.StaticSiteLinkedBackendARMResourceProperties{ - BackendResourceID: to.Ptr("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/backendRg/providers/Microsoft.Web/sites/testBackend"), - Region: to.Ptr("West US 2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ValidateLinkedBackendForStaticSiteBuild.json -func ExampleStaticSitesClient_BeginValidateBackendForBuild() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewStaticSitesClient().BeginValidateBackendForBuild(ctx, "rg", "testStaticSite0", "default", "testBackend", armappservice.StaticSiteLinkedBackendARMResource{ - Properties: &armappservice.StaticSiteLinkedBackendARMResourceProperties{ - BackendResourceID: to.Ptr("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/backendRg/providers/Microsoft.Web/sites/testBackend"), - Region: to.Ptr("West US 2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetLinkedBackendsForStaticSite.json -func ExampleStaticSitesClient_NewGetLinkedBackendsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewStaticSitesClient().NewGetLinkedBackendsPager("rg", "testStaticSite0", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.StaticSiteLinkedBackendsCollection = armappservice.StaticSiteLinkedBackendsCollection{ - // Value: []*armappservice.StaticSiteLinkedBackendARMResource{ - // { - // Name: to.Ptr("testBackend"), - // Type: to.Ptr("Microsoft.Web/staticSites/builds/linkedBackends"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/builds/default/linkedBackends/testBackend"), - // Properties: &armappservice.StaticSiteLinkedBackendARMResourceProperties{ - // BackendResourceID: to.Ptr("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/functionRG/providers/Microsoft.Web/sites/testBackend"), - // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-04T17:33:11.641Z"); return t}()), - // ProvisioningState: to.Ptr("Succeeded"), - // Region: to.Ptr("West US 2"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetLinkedBackendsForStaticSiteBuild.json -func ExampleStaticSitesClient_NewGetLinkedBackendsForBuildPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewStaticSitesClient().NewGetLinkedBackendsForBuildPager("rg", "testStaticSite0", "default", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.StaticSiteLinkedBackendsCollection = armappservice.StaticSiteLinkedBackendsCollection{ - // Value: []*armappservice.StaticSiteLinkedBackendARMResource{ - // { - // Name: to.Ptr("testBackend"), - // Type: to.Ptr("Microsoft.Web/staticSites/builds/linkedBackends"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/builds/default/linkedBackends/testBackend"), - // Properties: &armappservice.StaticSiteLinkedBackendARMResourceProperties{ - // BackendResourceID: to.Ptr("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/functionRG/providers/Microsoft.Web/sites/testBackend"), - // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-04T17:33:11.641Z"); return t}()), - // ProvisioningState: to.Ptr("Succeeded"), - // Region: to.Ptr("West US 2"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetLinkedBackendForStaticSite.json -func ExampleStaticSitesClient_GetLinkedBackend() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewStaticSitesClient().GetLinkedBackend(ctx, "rg", "testStaticSite0", "testBackend", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.StaticSiteLinkedBackendARMResource = armappservice.StaticSiteLinkedBackendARMResource{ - // Name: to.Ptr("testBackend"), - // Type: to.Ptr("Microsoft.Web/staticSites/builds/linkedBackends"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/builds/default/linkedBackends/testBackend"), - // Properties: &armappservice.StaticSiteLinkedBackendARMResourceProperties{ - // BackendResourceID: to.Ptr("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/backendRg/providers/Microsoft.Web/sites/testBackend"), - // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-12-24T17:33:11.641Z"); return t}()), - // ProvisioningState: to.Ptr("Succeeded"), - // Region: to.Ptr("West US 2"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/LinkBackendToStaticSite.json -func ExampleStaticSitesClient_BeginLinkBackend() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewStaticSitesClient().BeginLinkBackend(ctx, "rg", "testStaticSite0", "testBackend", armappservice.StaticSiteLinkedBackendARMResource{ - Properties: &armappservice.StaticSiteLinkedBackendARMResourceProperties{ - BackendResourceID: to.Ptr("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/backendRg/providers/Microsoft.Web/sites/testBackend"), - Region: to.Ptr("West US 2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.StaticSiteLinkedBackendARMResource = armappservice.StaticSiteLinkedBackendARMResource{ - // Name: to.Ptr("testBackend"), - // Type: to.Ptr("Microsoft.Web/staticSites/builds/linkedBackends"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/builds/default/linkedBackends/testBackend"), - // Properties: &armappservice.StaticSiteLinkedBackendARMResourceProperties{ - // BackendResourceID: to.Ptr("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/backendRg/providers/Microsoft.Web/sites/testBackend"), - // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-12-24T17:33:11.641Z"); return t}()), - // ProvisioningState: to.Ptr("Succeeded"), - // Region: to.Ptr("West US 2"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/UnlinkBackendFromStaticSite.json -func ExampleStaticSitesClient_UnlinkBackend() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewStaticSitesClient().UnlinkBackend(ctx, "rg", "testStaticSite0", "testBackend", &armappservice.StaticSitesClientUnlinkBackendOptions{IsCleaningAuthConfig: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetLinkedBackendForStaticSiteBuild.json -func ExampleStaticSitesClient_GetLinkedBackendForBuild() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewStaticSitesClient().GetLinkedBackendForBuild(ctx, "rg", "testStaticSite0", "default", "testBackend", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.StaticSiteLinkedBackendARMResource = armappservice.StaticSiteLinkedBackendARMResource{ - // Name: to.Ptr("testBackend"), - // Type: to.Ptr("Microsoft.Web/staticSites/builds/linkedBackends"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/builds/default/linkedBackends/testBackend"), - // Properties: &armappservice.StaticSiteLinkedBackendARMResourceProperties{ - // BackendResourceID: to.Ptr("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/backendRg/providers/Microsoft.Web/sites/testBackend"), - // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-12-24T17:33:11.641Z"); return t}()), - // ProvisioningState: to.Ptr("Succeeded"), - // Region: to.Ptr("West US 2"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/LinkBackendToStaticSiteBuild.json -func ExampleStaticSitesClient_BeginLinkBackendToBuild() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewStaticSitesClient().BeginLinkBackendToBuild(ctx, "rg", "testStaticSite0", "default", "testBackend", armappservice.StaticSiteLinkedBackendARMResource{ - Properties: &armappservice.StaticSiteLinkedBackendARMResourceProperties{ - BackendResourceID: to.Ptr("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/backendRg/providers/Microsoft.Web/sites/testBackend"), - Region: to.Ptr("West US 2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.StaticSiteLinkedBackendARMResource = armappservice.StaticSiteLinkedBackendARMResource{ - // Name: to.Ptr("testBackend"), - // Type: to.Ptr("Microsoft.Web/staticSites/builds/linkedBackends"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/builds/default/linkedBackends/testBackend"), - // Properties: &armappservice.StaticSiteLinkedBackendARMResourceProperties{ - // BackendResourceID: to.Ptr("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/backendRg/providers/Microsoft.Web/sites/testBackend"), - // CreatedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-12-24T17:33:11.641Z"); return t}()), - // ProvisioningState: to.Ptr("Succeeded"), - // Region: to.Ptr("West US 2"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/UnlinkBackendFromStaticSiteBuild.json -func ExampleStaticSitesClient_UnlinkBackendFromBuild() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewStaticSitesClient().UnlinkBackendFromBuild(ctx, "rg", "testStaticSite0", "12", "testBackend", &armappservice.StaticSitesClientUnlinkBackendFromBuildOptions{IsCleaningAuthConfig: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/appservice/armappservice/time_rfc3339.go b/sdk/resourcemanager/appservice/armappservice/time_rfc3339.go index 170ed1b119a3..3c5875954d9d 100644 --- a/sdk/resourcemanager/appservice/armappservice/time_rfc3339.go +++ b/sdk/resourcemanager/appservice/armappservice/time_rfc3339.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappservice @@ -19,50 +18,50 @@ import ( "time" ) -const ( - utcLayoutJSON = `"2006-01-02T15:04:05.999999999"` - utcLayout = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` -) - // Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. var tzOffsetRegex = regexp.MustCompile(`(Z|z|\+|-)(\d+:\d+)*"*$`) -type timeRFC3339 time.Time +const ( + utcDateTimeJSON = `"2006-01-02T15:04:05.999999999"` + utcDateTime = "2006-01-02T15:04:05.999999999" + dateTimeJSON = `"` + time.RFC3339Nano + `"` +) + +type dateTimeRFC3339 time.Time -func (t timeRFC3339) MarshalJSON() (json []byte, err error) { +func (t dateTimeRFC3339) MarshalJSON() ([]byte, error) { tt := time.Time(t) return tt.MarshalJSON() } -func (t timeRFC3339) MarshalText() (text []byte, err error) { +func (t dateTimeRFC3339) MarshalText() ([]byte, error) { tt := time.Time(t) return tt.MarshalText() } -func (t *timeRFC3339) UnmarshalJSON(data []byte) error { - layout := utcLayoutJSON +func (t *dateTimeRFC3339) UnmarshalJSON(data []byte) error { + layout := utcDateTimeJSON if tzOffsetRegex.Match(data) { - layout = rfc3339JSON + layout = dateTimeJSON } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) UnmarshalText(data []byte) (err error) { - layout := utcLayout +func (t *dateTimeRFC3339) UnmarshalText(data []byte) error { + layout := utcDateTime if tzOffsetRegex.Match(data) { layout = time.RFC3339Nano } return t.Parse(layout, string(data)) } -func (t *timeRFC3339) Parse(layout, value string) error { +func (t *dateTimeRFC3339) Parse(layout, value string) error { p, err := time.Parse(layout, strings.ToUpper(value)) - *t = timeRFC3339(p) + *t = dateTimeRFC3339(p) return err } -func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { +func populateDateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return } else if azcore.IsNullValue(t) { @@ -71,14 +70,14 @@ func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { } else if reflect.ValueOf(t).IsNil() { return } - m[k] = (*timeRFC3339)(t) + m[k] = (*dateTimeRFC3339)(t) } -func unpopulateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { +func unpopulateDateTimeRFC3339(data json.RawMessage, fn string, t **time.Time) error { if data == nil || strings.EqualFold(string(data), "null") { return nil } - var aux timeRFC3339 + var aux dateTimeRFC3339 if err := json.Unmarshal(data, &aux); err != nil { return fmt.Errorf("struct field %s: %v", fn, err) } diff --git a/sdk/resourcemanager/appservice/armappservice/topleveldomains_client.go b/sdk/resourcemanager/appservice/armappservice/topleveldomains_client.go index 11992d969080..eb671ff8a1b1 100644 --- a/sdk/resourcemanager/appservice/armappservice/topleveldomains_client.go +++ b/sdk/resourcemanager/appservice/armappservice/topleveldomains_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappservice @@ -33,7 +32,7 @@ type TopLevelDomainsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewTopLevelDomainsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TopLevelDomainsClient, error) { - cl, err := arm.NewClient(moduleName+".TopLevelDomainsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,22 +46,29 @@ func NewTopLevelDomainsClient(subscriptionID string, credential azcore.TokenCred // Get - Description for Get details of a top-level domain. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - name - Name of the top-level domain. // - options - TopLevelDomainsClientGetOptions contains the optional parameters for the TopLevelDomainsClient.Get method. func (client *TopLevelDomainsClient) Get(ctx context.Context, name string, options *TopLevelDomainsClientGetOptions) (TopLevelDomainsClientGetResponse, error) { + var err error + const operationName = "TopLevelDomainsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, name, options) if err != nil { return TopLevelDomainsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return TopLevelDomainsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TopLevelDomainsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TopLevelDomainsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -81,7 +87,7 @@ func (client *TopLevelDomainsClient) getCreateRequest(ctx context.Context, name return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -98,7 +104,7 @@ func (client *TopLevelDomainsClient) getHandleResponse(resp *http.Response) (Top // NewListPager - Description for Get all top-level domains supported for registration. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - options - TopLevelDomainsClientListOptions contains the optional parameters for the TopLevelDomainsClient.NewListPager // method. func (client *TopLevelDomainsClient) NewListPager(options *TopLevelDomainsClientListOptions) *runtime.Pager[TopLevelDomainsClientListResponse] { @@ -107,25 +113,20 @@ func (client *TopLevelDomainsClient) NewListPager(options *TopLevelDomainsClient return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *TopLevelDomainsClientListResponse) (TopLevelDomainsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return TopLevelDomainsClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "TopLevelDomainsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return TopLevelDomainsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TopLevelDomainsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -141,7 +142,7 @@ func (client *TopLevelDomainsClient) listCreateRequest(ctx context.Context, opti return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -158,7 +159,7 @@ func (client *TopLevelDomainsClient) listHandleResponse(resp *http.Response) (To // NewListAgreementsPager - Description for Gets all legal agreements that user needs to accept before purchasing a domain. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - name - Name of the top-level domain. // - agreementOption - Domain agreement options. // - options - TopLevelDomainsClientListAgreementsOptions contains the optional parameters for the TopLevelDomainsClient.NewListAgreementsPager @@ -169,25 +170,20 @@ func (client *TopLevelDomainsClient) NewListAgreementsPager(name string, agreeme return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *TopLevelDomainsClientListAgreementsResponse) (TopLevelDomainsClientListAgreementsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listAgreementsCreateRequest(ctx, name, agreementOption, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return TopLevelDomainsClientListAgreementsResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "TopLevelDomainsClient.NewListAgreementsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAgreementsCreateRequest(ctx, name, agreementOption, options) + }, nil) if err != nil { return TopLevelDomainsClientListAgreementsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return TopLevelDomainsClientListAgreementsResponse{}, runtime.NewResponseError(resp) - } return client.listAgreementsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -207,10 +203,13 @@ func (client *TopLevelDomainsClient) listAgreementsCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, agreementOption) + if err := runtime.MarshalAsJSON(req, agreementOption); err != nil { + return nil, err + } + return req, nil } // listAgreementsHandleResponse handles the ListAgreements response. diff --git a/sdk/resourcemanager/appservice/armappservice/topleveldomains_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/topleveldomains_client_example_test.go deleted file mode 100644 index 45f81556d191..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/topleveldomains_client_example_test.go +++ /dev/null @@ -1,190 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.DomainRegistration/stable/2022-09-01/examples/ListTopLevelDomains.json -func ExampleTopLevelDomainsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewTopLevelDomainsClient().NewListPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.TopLevelDomainCollection = armappservice.TopLevelDomainCollection{ - // Value: []*armappservice.TopLevelDomain{ - // { - // Name: to.Ptr("com"), - // Type: to.Ptr("Microsoft.DomainRegistration/topLevelDomains"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.DomainRegistration/topLevelDomains/com"), - // Properties: &armappservice.TopLevelDomainProperties{ - // Privacy: to.Ptr(true), - // }, - // }, - // { - // Name: to.Ptr("net"), - // Type: to.Ptr("Microsoft.DomainRegistration/topLevelDomains"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.DomainRegistration/topLevelDomains/net"), - // Properties: &armappservice.TopLevelDomainProperties{ - // Privacy: to.Ptr(true), - // }, - // }, - // { - // Name: to.Ptr("co.uk"), - // Type: to.Ptr("Microsoft.DomainRegistration/topLevelDomains"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.DomainRegistration/topLevelDomains/co.uk"), - // Properties: &armappservice.TopLevelDomainProperties{ - // Privacy: to.Ptr(false), - // }, - // }, - // { - // Name: to.Ptr("org"), - // Type: to.Ptr("Microsoft.DomainRegistration/topLevelDomains"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.DomainRegistration/topLevelDomains/org"), - // Properties: &armappservice.TopLevelDomainProperties{ - // Privacy: to.Ptr(true), - // }, - // }, - // { - // Name: to.Ptr("nl"), - // Type: to.Ptr("Microsoft.DomainRegistration/topLevelDomains"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.DomainRegistration/topLevelDomains/nl"), - // Properties: &armappservice.TopLevelDomainProperties{ - // Privacy: to.Ptr(true), - // }, - // }, - // { - // Name: to.Ptr("in"), - // Type: to.Ptr("Microsoft.DomainRegistration/topLevelDomains"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.DomainRegistration/topLevelDomains/in"), - // Properties: &armappservice.TopLevelDomainProperties{ - // Privacy: to.Ptr(false), - // }, - // }, - // { - // Name: to.Ptr("biz"), - // Type: to.Ptr("Microsoft.DomainRegistration/topLevelDomains"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.DomainRegistration/topLevelDomains/biz"), - // Properties: &armappservice.TopLevelDomainProperties{ - // Privacy: to.Ptr(true), - // }, - // }, - // { - // Name: to.Ptr("org.uk"), - // Type: to.Ptr("Microsoft.DomainRegistration/topLevelDomains"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.DomainRegistration/topLevelDomains/org.uk"), - // Properties: &armappservice.TopLevelDomainProperties{ - // Privacy: to.Ptr(false), - // }, - // }, - // { - // Name: to.Ptr("co.in"), - // Type: to.Ptr("Microsoft.DomainRegistration/topLevelDomains"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.DomainRegistration/topLevelDomains/co.in"), - // Properties: &armappservice.TopLevelDomainProperties{ - // Privacy: to.Ptr(false), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.DomainRegistration/stable/2022-09-01/examples/GetTopLevelDomain.json -func ExampleTopLevelDomainsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewTopLevelDomainsClient().Get(ctx, "com", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.TopLevelDomain = armappservice.TopLevelDomain{ - // Name: to.Ptr("com"), - // Type: to.Ptr("Microsoft.DomainRegistration/topLevelDomains"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.DomainRegistration/topLevelDomains/com"), - // Properties: &armappservice.TopLevelDomainProperties{ - // Privacy: to.Ptr(true), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.DomainRegistration/stable/2022-09-01/examples/ListTopLevelDomainAgreements.json -func ExampleTopLevelDomainsClient_NewListAgreementsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewTopLevelDomainsClient().NewListAgreementsPager("in", armappservice.TopLevelDomainAgreementOption{ - ForTransfer: to.Ptr(false), - IncludePrivacy: to.Ptr(true), - }, nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.TldLegalAgreementCollection = armappservice.TldLegalAgreementCollection{ - // Value: []*armappservice.TldLegalAgreement{ - // { - // AgreementKey: to.Ptr("DNRA"), - // Content: to.Ptr("\n\n\n\n\n
\n\n\n\n\n\n\n
\nDomain Name Registration Agreement\n
\n

Last Revised: October 6, 2017

\n

PLEASE READ THIS AGREEMENT CAREFULLY, AS IT CONTAINS IMPORTANT INFORMATION REGARDING YOUR LEGAL RIGHTS AND REMEDIES.

\r\n

1. OVERVIEW

\r\n

This Domain Name Registration Agreement (this \"Agreement\") is entered into by and between 510456, an individual (\"Azure\") and you, and is made effective as of the date of electronic acceptance.  This Agreement sets forth the terms and conditions of your use of Azure's Domain Name Registration services (the \"Domain Name Registration Services\" or the \"Services\"). The terms \"we\", \"us\" or \"our\" shall refer to Azure.  The terms \"you\", \"your\", \"User\" or \"customer\" shall refer to any individual or entity who accepts this Agreement.  Unless otherwise specified, nothing in this Agreement shall be deemed to confer any third-party rights or benefits.

\r\n

Your electronic acceptance of this Agreement signifies that you have read, understand, acknowledge and agree to be bound by this Agreement, which incorporates by reference each of (i) Azure’s Universal Terms of Service Agreement (\"UTOS\"), (ii) all agreements, guidelines, policies, practices, procedures, registration requirements or operational standards of the top-level domain (\"TLD\") in which you register any domain (“Registry Policies”), and (iii) any plan limits, product disclaimers or other restrictions presented to you on the Domain Name Registration Services landing page of the Azure website (this “Site”). 

\r\n

TO LINK TO AND REVIEW THE REGISTRY POLICIES FOR THE TLD IN WHICH YOU WISH TO REGISTER A DOMAIN NAME, PLEASE CLICK HERE   

\r\n

You acknowledge and agree that (i) Azure, in its sole and absolute discretion, may change or modify this Agreement, and any policies or agreements which are incorporated herein, at any time, and such changes or modifications shall be effective immediately upon posting to this Site, and (ii) your use of this Site or the Services found at this Site after such changes or modifications have been made shall constitute your acceptance of this Agreement as last revised.  If you do not agree to be bound by this Agreement as last revised, do not use (or continue to use) this Site or the Services found at this Site.  In addition, Azure may occasionally notify you of changes or modifications to this Agreement by email.  It is therefore very important that you keep your shopper account (“Shopper Account”) information, including your email address, current.  Azure assumes no liability or responsibility for your failure to receive an email notification if such failure results from an inaccurate or out-of-date email address.    Azure is not an Internet Corporation for Assigned Names and Numbers (\"ICANN\") accredited registrar; it is an authorized reseller of domain name registration services.  Accordingly, you acknowledge and agree that Azure may modify this Agreement in order to comply with any terms and conditions set forth by (i) the sponsoring registrar, (ii) ICANN, and/or (iii) the registry applicable to the TLD or country code top level domain (\"ccTLD\") in question.  As used herein, the terms \"registry\", \"Registry\", \"registry operator\" or \"Registry Operator\" shall refer to the registry applicable to the TLD or ccTLD in question.  To identify the sponsoring registrar, click here

\r\n

2. PROVISIONS SPECIFIC TO ALL REGISTRATIONS

\r\n

Unless otherwise noted, the provisions below in this Section 2 are generally applicable to all TLDs that we offer.  Special provisions specific to any TLD or ccTLD (those in addition to posted Registry Policies) are identified elsewhere below in this Agreement. 

\r\n
    \r\n
  1. \r\n
    Registry Policies. You agree to be bound by all Registry Policies (defined above in this Agreement) applicable to your domain name registration (at any level). IT IS YOUR RESPONSIBILITY TO VISIT THE APPLICABLE TLD SITE AND READ AND REVIEW ALL APPLICABLE REGISTRY POLICIES PRIOR TO YOUR REGISTRATION IN THE TLD.  REGISTRY POLICIES FOR EACH TLD CAN BE FOUND BY VISITING THE CORRESPONDING TLD LINK LISTED HERE.  Notwithstanding anything in this Agreement to the contrary, the Registry Operator of the TLD in which the domain name registration is made is and shall be an intended third party beneficiary of this Agreement. As such the parties to this agreement acknowledge and agree that the third party beneficiary rights of the Registry Operator have vested and that the Registry Operator has relied on its third party beneficiary rights under this Agreement in agreeing to Azure being a registrar for the respective TLD. The third party beneficiary rights of the Registry Operator will survive any termination of this Agreement.    
    \r\n
  2. \r\n
  3. \r\n
    Registration Requirements.  To the extent any TLD or ccTLD requires you meet eligibility (e.g., residency for .JP, .EU, etc.), validation (e.g., DNS validation) or other authentication requirements as a condition to registering a domain name in the TLD, you agree that by submitting an application or registering or renewing your domain name, you represent and warrant that: (a) all information provided to register or renew the domain name (including all supporting documents, if any) is true, complete and correct, and is not misleading in any way, and the application is made in good faith; (b) you meet, and will continue to meet, the eligibility criteria prescribed in the Registry Policies for the applicable TLD for the duration of the domain name registration; (c) you have not previously submitted an application for the domain name with another registrar using the same eligibility criteria, and the other registrar has rejected the application (if applicable); (d) you acknowledge and agree that even if the domain name is accepted for registration, your entitlement to register the domain name may be challenged by others who claim to have an entitlement to the domain name; and (e) you acknowledge and agree that the Registry or the registrar can cancel the registration of the domain name if any of the warranties required are found to be untrue, incomplete, incorrect or misleading.
    \r\n
  4. \r\n
  5. \r\n
    Ownership.  You acknowledge and agree that registration of a domain name does not create any proprietary right for you, the registrar, or any other person in the name used as a domain name or the domain name registration and that the entry of a domain name in the Registry shall not be construed as evidence or ownership of the domain name registered as a domain name. You shall not in any way transfer or purport to transfer a proprietary right in any domain name registration or grant or purport to grant as security or in any other manner encumber or purport to encumber a domain name registration.
    \r\n
  6. \r\n
  7. \r\n
    ICANN Requirements. You agree to comply with the ICANN requirements, standards, policies, procedures, and practices for which each applicable Registry Operator has monitoring responsibility in accordance with the Registry Agreement between ICANN and itself or any other arrangement with ICANN.
    \r\n
  8. \r\n
  9. \r\n
    Indemnification of Registry.  You agree to indemnify, defend and hold harmless (within 30 days of demand) the Registry Operator and Registry Service Provider and their subcontractors, subsidiaries, affiliates, divisions, shareholders, directors, officers, employees, accountants, attorneys, insurers, agents, predecessors, successors and assigns, from and against any and all claims, demands, damages, losses, costs, expenses, causes of action or other liabilities of any kind, whether known or unknown, including reasonable legal and attorney’s fees and expenses, in any way arising out of, relating to, or otherwise in connection with the your domain name registration, including, without limitation, the use, registration, extension, renewal, deletion, and/or transfer thereof and/or the violation of any applicable terms or conditions governing the registration. You shall not enter into any settlement or compromise of any such indemnifiable claim without Registrar’s or Registry Operator’s prior written consent, which consent shall not be unreasonably withheld, and you agree that these indemnification obligations shall survive the termination or expiration of the Agreement for any reason.  IN NO EVENT SHALL THE REGISTRY OPERATOR BE LIABLE TO YOU OR ANY OTHER PERSON FOR ANY DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, SPECIAL, EXEMPLARY OR PUNITIVE DAMAGES, INCLUDING LOSS OF PROFIT OR GOODWILL, FOR ANY MATTER, WHETHER SUCH LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT (INCLUDING NEGLIGENCE), BREACH OF WARRANTIES, EITHER EXPRESS OR IMPLIED, ANY BREACH OF THIS AGREEMENT OR ITS INCORPORATED AGREEMENTS AND POLICIES YOUR INABILITY TO USE THE DOMAIN NAME, YOUR LOSS OF DATA OR FILES OR OTHERWISE, EVEN IF THE REGISTRY OPERATOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
    \r\n
  10. \r\n
  11. \r\n
    Regulated TLDs.   For domain name registration in any “Regulated” TLD, you acknowledge and agree your registration is subject to the following additional requirements: (a) comply with all applicable laws, including those that relate to privacy, data collection, consumer protection (including in relation to misleading and deceptive conduct), fair lending, debt collection, organic farming, disclosure of data, and financial disclosures; (b) if you collect and maintain sensitive health and financial data you must implement reasonable and appropriate security measures commensurate with the offering of those services, as defined by applicable law.  Regulated TLDs include: .games, .juegos, .school, .schule, .toys, .eco, .care, .diet, .fitness, .health, .clinic, .dental, .healthcare, .cash, .broker, .claims, .exchange, .finance, .financial, .fund, .investments, .lease, .loans, .market, .money, .trading, .credit, .insure, .tax, .mortgage, .degree, .mba, .audio, .book, .broadway, .film, .movie, .music, .software, .fashion, .video, .app, .art, .band, .cloud, .data, .digital, .fan, .free, .gratis, .discount, .sale, .media, .news, .online, .pictures, .radio, .show, .theater, .tours, .accountants, .architect, .associates, .broker, .legal, .realty, .vet, .engineering, .law, .limited, .show; .theater; .town, .city, .reise, and .reisen
    \r\n
  12. \r\n
  13. \r\n
    Highly Regulated TLDs. In addition to the requirements for Regulated TLDs, domain name registration in any Highly-Regulated TLD is subject to the following requirements: (a) you will provide administrative contact information, which must be kept up‐to‐date, for the notification of complaints or reports of registration abuse, as well as the contact details of the relevant regulatory, or Industry self‐regulatory, bodies in their main place of business; (b) you represent that you possess any necessary authorizations, charters, licenses and/or other related credentials for participation in the sector associated with such Highly‐regulated TLD; and (c) you will report any material changes to the validity of you authorizations, charters, licenses and/or other related credentials for participation in the sector associated with the Highly‐regulated TLD to ensure you continue to conform to the appropriate regulations and licensing requirements and generally conduct your activities in the interests of the consumers they serve.  Highly Regulated TLDs include: .abogado, .attorney, .bank, .bet, .bingo, .casino .charity (and IDN equivalent xn--30rr7y), .cpa, .corp, creditcard, .creditunion .dds, .dentist, .doctor, .fail, .gmbh, .gripe, .hospital, .inc, .insurance, .lawyer, .lifeinsurance, .llc, .llp, .ltda, .medical, .mutuelle, .pharmacy, .poker, .university, .sarl, .spreadbetting, .srl, .surgery .university, .vermogensberater, and .vesicherung,  For .doctor, registrants who hold themselves out to be licensed medical practitioners must be able to demonstrate to the Registrar and Registry, upon request, that they hold the applicable license.
    \r\n
  14. \r\n
  15. \r\n
    Special Safeguard TLDs.  In addition to the requirements for Regulated and Highly-Regulated TLDs, by registering a domain name in any “Special-Safeguard” TLD, you agree to take reasonable steps to avoid misrepresenting or falsely implying that you or your business is affiliated with, sponsored or endorsed by one or more country's or government's military forces if such affiliation, sponsorship or endorsement does not exist.  Special Safeguard TLDs include:  .army, .navy, .airforce
    \r\n
  16. \r\n
  17. \r\n
    Third Party Beneficiary.  Notwithstanding anything in this Agreement to the contrary, the Registry Operator for any TLD in which your register a domain name is and shall be an intended third party beneficiary of this Agreement. As such the parties to this agreement acknowledge and agree that the third party beneficiary rights of the Registry Operator have vested and that the Registry Operator has relied on its third party beneficiary rights under this Agreement in agreeing to Azure being a registrar for the TLD. Third party beneficiary rights of the Registry Operator shall survive any termination of this Agreement.
    \r\n
  18. \r\n
  19. \r\n
    Variable and Non-Uniform Pricing.  You acknowledge, understand and agree that certain domain names in certain TLDs are established by Registry Policies to be variably priced (i.e., standard v. premium names) and/or may have non-uniform renewal registration pricing (such that the Fee for a domain name registration renewal may differ from other domain names in the same TLD, e.g., renewal registration for one domain may be $100.00 and $33.00 for a different domain name).
    \r\n
  20. \r\n
  21. \r\n
    Restriction on Availability of Privacy or Proxy.  You acknowledge and agree that, as dictated by the Registry Policies, for certain TLDs you may not be permitted to purchase private or proxy TLD registrations. In such case, you must register for any and all TLD registrations using your personal information, which information you represent and warrant is current, accurate and complete.
    \r\n
  22. \r\n
\r\n

3. FEES AND PAYMENTS

\r\n

(A) GENERAL TERMS, INCLUDING AUTOMATIC RENEWAL TERMS

\r\n

You agree to pay any and all prices and fees due for Services purchased or obtained at this Site at the time you order the Services.  Azure expressly reserves the right to change or modify its prices and fees at any time, and such changes or modifications shall be posted online at this Site and effective immediately without need for further notice to you.  If you have purchased or obtained Services for a period of months or years, changes or modifications in prices and fees shall be effective when the Services in question come up for renewal as further described below. 

\r\n

Unless otherwise specifically noted (for reasons such as those highlighted in Section 2(x) above), the renewal price for any domain name in any TLD will be the same as the list (non-sale) price shown when you search for and select a domain, and again in the cart prior to purchase.  For example, if the list price is $9.99, and a different renewal price is not specifically identified, then the renewal price is also $9.99.  Likewise, if a domain name has a sale price of $8.99, with the list (non-sale) price shown (as a strike-through) at $9.99, the renewal price will be $9.99*.  

\r\n

*Renewal price subject to change prior to actual date of renewal. 

\r\n

For all other terms and conditions relating to fees, payment, refund and billing, etc. applicable to the Services offered under the scope of this Agreement, please refer to the “Fees and Payments” section of our UTOS

\r\n

(B) DOMAIN NAME RENEWAL TERMS

\r\n

When you register a domain name, you will have two renewal options: (i) \"Automatic Renewal\" (ii) \"Extended Automatic Renewal\", and (iii) \"Manual Renewal\": 

\r\n
    \r\n
  1. Automatic Renewal.  Automatic Renewal is the default setting. Therefore, unless you select Extended Automatic Renewal, Azure will enroll you in Automatic Renewal.  Domain names will automatically renew, for a period equivalent to the length of your original domain name registration, any domain name that is up for renewal and will take payment from the Payment Method you have on file with Azure, at Azure's then current rates. Thus, if you have chosen to register your domain name for one (1) year, Azure will automatically renew it for one (1) year. If you have chosen to register your domain name for two (2) years, Azure will automatically renew it for two (2) years, and so on.
  2. \r\n
  3. Extended Automatic Renewal.  If you enroll in the Extended Automatic Renewal plan, Azure will automatically renew any domain name that is up for renewal for an additional one-year period on each and every anniversary of your domain name registration, so the initial registration period will always remain intact.  Thus, if you have chosen to register your domain name for two (2) years, Azure will automatically renew it for one (1) additional year on each and every anniversary of your domain name registration so your two (2) year registration period will always remain intact. If you have chosen to register your domain name for five (5) years, Azure will automatically renew it for one (1) additional year on each and every anniversary of your domain name registration so your five (5) year registration period will always remain intact, and so on.  Azure will take payment from the Payment Method you have on file with Azure, at Azure's then current one-year domain name registration rate.
  4. \r\n
  5. Manual Renewal.  If you have elected to turn off automatic renewal and cancel the product (i.e., cancel the domain name registration) effective at expiration of the then current term, you may nonetheless elect to manually renew the domain name at anytime prior to its expiration date by logging into your Account Manager and manually implementing the renewal or by calling customer service (should you in fact want the domain name to be renewed). If you fail to manually implement the renewal before the expiration date, the domain name will be cancelled and you will no longer have use of that name.
  6. \r\n
\r\n

All renewals will be subject to the terms of this Agreement, as it may be amended from time to time, and you acknowledge and agree to be bound by the terms of this Agreement (as amended) for all renewed domains.  Domain name renewals will be non-refundable. In the event that we are unable to automatically renew your domain name for the renewal option selected for any reason, we may automatically renew your domain name for a period less than your original registration period to the extent necessary for the transaction to succeed. If for any reason Azure is not able to take the payment from the Payment Method you have on file, and you fail to respond to our notices, your domain name registration will expire. It is your responsibility to keep your Payment Method information current, which includes the expiration date if you are using a credit card.

\r\n

For certain ccTLDs (.am, .at, .be, .br, .ca, .cn, .com.cn, .net.cn, .org.cn, .de, .eu, .fm, .gs, .it, .jp, .ms, .nu, .nz, .co.nz, .net.nz, .org.nz, .tc, .tk, .tw, .com.tw, .org.tw, .idv.tw, .uk, and .vg), renewal billing will occur on the first day of the month prior to the month of expiration.

\r\n

For certain ccTLDs (.am, .at, .be, .ca, .cn, .com.cn, .net.cn, .org.cn, .de, .eu, .fm, .gs, .it, .jp, .ms, .nu, .nz, .co.nz, .net.nz, .org.nz, .tc, .tk, .tw, .com.tw, .org.tw, .idv.tw, .uk, and .vg), renewal will occur, or must occur manually if the product was previously cancelled, no later than the 20th of the month prior to the expiration date, or your domain name will be placed in non-renewal status. For some ccTLDs (.es) renewal must be processed no later than seven days before the expiration date, or your domain name will be placed in non-renewal status.  When the domain name is in non-renewal status, you can renew the domain name only by calling Azure and requesting that the domain name be renewed. You cannot renew the domain name through your Account Manager. If you fail to manually implement the renewal of any cancelled product before the expiration date, the domain name will be cancelled and you will no longer have use of that name.

\r\n

You agree that Azure will not be responsible for cancelled domain names that you fail to renew in the timeframes indicated in this Agreement. In any case, if you fail to renew your domain name in a timely fashion, additional charges may apply. If you signed up for privacy services, protected registration, or any other similar service, with your domain name registration, these services will automatically be renewed when your domain name registration is up for renewal, and you will incur the applicable additional renewal fee unless you cancel in advance. 

\r\n

If you fail to renew your domain name in the timeframes indicated in this Agreement, you agree that Azure may, in its sole discretion, renew your expired domain name on your behalf. If Azure decides to renew your expired domain name on your behalf, you will have a Renewal Grace Period during which you may reimburse Azure for the renewal and keep your domain name. The Renewal Grace Period is currently twelve (12) days but subject to change under the terms of this Agreement. For certain ccTLDs (.am, .at, .be, .cn, .com.cn, .net.cn, .org.cn, .de, .eu, .fm, .gs, .it, .jp, .ms, .nu, .nz, .co.nz, .net.nz, .org.nz, .tc, .tk, .tw, .com.tw, .org.tw, .idv.tw, .uk, and .vg) there is no Renewal Grace Period after the expiration date of the domain name. If you do not reimburse Azure for the renewal during the Renewal Grace Period your domain name will be placed on Hold and flagged for deletion after which you will have a 30-day redemption period during which you may pay Azure a Redemption fee and redeem your domain name. The Redemption fee is currently $80.00 USD and is subject to change under the terms of this Agreement. If you do not redeem your domain name prior to the end of the 30-day redemption period Azure may, in its sole discretion, delete your domain name or transfer it to another registrant on your behalf.  During the redemption period your domain name may be parked. 

\r\n

If your domain name is deleted, the Registry also provides a 30-day Redemption Grace Period during which you may pay Azure a redemption fee and redeem your domain name. The redemption fee is currently $80.00 USD and is subject to change under the terms of this Agreement. If you do not redeem your domain name prior to the end of the Registry's Redemption Grace Period the Registry will release your name and it will become available for registration on a first-come-first-served basis.

\r\n

Renewal Grace Periods and Redemption Grace Periods vary for different ccTLDs. Please refer to the specific terms for the applicable TLD. In the event there is a conflict between the provisions of this paragraph and the ccTLD terms, the ccTLD terms shall control.

\r\n

\r\n

Our registration expiration notification policy and associated fees are described here.

\r\n

\r\n

\r\n

(C) FREE PRODUCT TERMS

\r\n

In the event you are provided with free products with the registration of a domain name, you acknowledge and agree that such free products will only be available with a valid purchase and may be terminated in the event the domain name is deleted or cancelled.  For free domain names, you acknowledge and agree that you may not change the account associated with such free domain for the first five (5) days after registration.  In the event a free domain name is offered with the registration of another domain and if the paid domain name registered fails, then we may, in its sole discretion, either delete the registration of the free domain or refund the difference between the amount paid and the value of the free domain.  Failed registrations associated with promotionals offers may result in the deletion of the free or discounted item or an adjustment between the registered domain price and the value of the discounted item, in our sole discretion.

\r\n

4. TERM OF AGREEMENT; TRANSFERS; DOMAIN TASTING

\r\n

The term of this Agreement shall continue in full force and effect as long as you have any domain name registered through Azure.

\r\n

You agree that you will not transfer any domain name registered through Azure to another domain name registrar during the first sixty (60) days after its initial registration date.  You agree that you may not transfer any domain name for ten (10) days after a Change of Account.

\r\n

You further agree that you will not engage in \"domain tasting\" by using the five (5) day grace period in which a registrant may choose to cancel a domain name and get a full refund of the registration fee as a vehicle to test the marketability or viability of a domain name.  If Azure determines (which determination shall be made by Azure in its sole and absolute discretion) that you have been engaging in \"domain tasting\", then Azure reserves the right to (a) charge you a small fee (which fee shall be deducted from any refund issued) or (b) refuse your cancellation/refund request altogether. Azure will not charge you a fee if Azure cancels your domain name during the five (5) day grace period due to fraud or other activity outside of your control. The five (5) day grace period does not apply to Premium Domains, which are non-refundable.

\r\n

You agree that Azure shall not be bound by (i) any representations made by third parties who you may use to purchase services from Azure, or (ii) any statements of a general nature, which may be posted on Azure's website or contained in Azure's promotional materials.

\r\n

5. UP TO DATE INFORMATION; USE OF INFORMATION AND EXPIRATION

\r\n

You agree to notify Azure within five (5) business days when any of the information you provided as part of the application and/or registration process changes. It is your responsibility to keep this information in a current and accurate status. Failure by you, for whatever reason, to provide Azure with accurate and reliable information on an initial and continual basis, shall be considered to be a material breach of this Agreement and a basis for suspension and/or cancellation of the domain name. Failure by you, for whatever reason, to respond within five (5) business days to any inquiries made by Azure to determine the validity of information provided by you, shall also be considered to be a material breach of this Agreement and a basis for suspension and/or cancellation of the domain name. You agree to retain a copy for your record of the receipt for purchase of your domain name.

\r\n

You agree that for each domain name registered by you, the following contact data is required: postal address, email address, telephone number, and if available, a facsimile number for the Registered Name Holder and, if different from the Registered Name Holder, the same contact information for, a technical contact, an administrative contact and a billing contact.

\r\n

You acknowledge and agree that domain name registration requires that this contact information, in whole or in part, be shared with the registry operator, for their use, copying, distribution, publication, modification and other processing  for (among other uses in accordance with our Privacy Policy) the purpose of administration of the domain name registration, which may require such information be transferred back and forth across international borders, to and from the U.S. to the EU, for example. As required by ICANN, this information must also be made publicly available by means of Whois, and that the registry operator may also be required to make this information publicly available by Whois. Both Azure and the registry operator may be required to archive this information with a third-party escrow service. You hereby consent and give permission for all such requirements and disclosures. Further, you represent and warrant that, if you are providing information about a third party, you have notified the third party of the disclosure and the purpose for the disclosure and you have obtained the third party's consent to such disclosure.  Registrar will not process data in a way that is incompatible with this Agreement.  Registrar will take reasonable precautions to protect data from loss or misuse.

\r\n

You agree that for each domain name registered by you the following information will be made publicly available in the Whois directory as determined by ICANN Policy and may be sold in bulk as set forth in the ICANN agreement:

\r\n
    \r\n
  • The domain name;
  • \r\n
  • Your name and postal address;
  • \r\n
  • The name, email address, postal address, voice and fax numbers for technical and administrative contacts;
  • \r\n
  • The Internet protocol numbers for the primary and secondary name servers;
  • \r\n
  • The corresponding names of the name servers; and
  • \r\n
  • The original date of registration and expiration date.
  • \r\n
  • Name of primary name server and secondary name server.
  • \r\n
  • Identity of the registrar.
  • \r\n
\r\n

You agree that, to the extent permitted by ICANN, Azure may make use of the publicly available information you provided during the registration process. If you engage in the reselling of domain names you agree to provide any individuals whose personal information you've obtained, information about the possible uses of their personal information pursuant to ICANN policy. You also agree to obtain consent, and evidence of consent, from those individuals for such use of the personal information they provide.

\r\n

You agree that Azure has the right to make public and share with third parties certain information in connection with the sale or purchase of domain names on the website, including but not limited to (a) the name of the domain name sold or purchased, (b) the sale or purchase price of the domain name sold or purchased, and (c) information relating to the timing of the sale or purchase.

\r\n

\r\n

In order for us to comply with any current or future rules and policies for domain name systems including any rules or policies established by the CIRA or any provincial or federal government or by other organization having control or authority to establish rules or policies, you hereby grant to us the right to disclose to third parties through an interactive publicly accessible registration database the following information that you are required to provide when applying for a domain name:

\r\n
    \r\n
  1. The domain or sub-domain name(s) registered by you;
  2. \r\n
  3. Your organization name, type and postal address;
  4. \r\n
  5. The name(s), position(s), postal address(es), e-mail address(es), voice telephone number(s) and where available the fax number(s) of the technical and administrative contacts for your domain or sub-domain name(s);
  6. \r\n
  7. The full hostnames and Internet protocol (IP) addresses of at least two (2) name server hosts (one primary and at least one secondary) for your domain or sub-domain name. Up to six (6) name servers may be specified. If a host has more than one (1) IP address, use a comma-separated list;
  8. \r\n
  9. The corresponding names of those name servers;
  10. \r\n
  11. The original creation date of the registration; and
  12. \r\n
  13. The expiration date of the registration.
  14. \r\n
\r\n

We may be required to make this information available in bulk form to third parties. We may also transfer or assign this information to CIRA or such other third party as we may decide, in our sole discretion.

\r\n

6. DISPUTE RESOLUTION POLICY

\r\n

You agree to be bound by our current Dispute Resolution Policy. This policy is incorporated herein and made a part of this Agreement. You can view the Uniform Domain Name Dispute Resolution Policy online. You agree that Azure may from time to time modify its Dispute Resolution Policy. Azure will post any changes to its Dispute Resolution Policy at least thirty (30) days before they become effective. You agree that by maintaining your domain name registrations with Azure after the updated policy becomes effective that you agree to the Dispute Resolution policy as amended. You agree to review Azure's website periodically to determine if changes have been made to the Dispute Resolution Policy. If you cancel or terminate your Services with Azure as a result of the modified Dispute Resolution policy, no fees will be refunded to you. You also agree to submit to proceedings commenced under ICANN's Uniform Rapid Suspension System, if applicable. 

\r\n

You agree that if a dispute arises as a result of one (1) or more domain names you have registered using Azure, you will indemnify, defend and hold Azure harmless as provided for in this Agreement. You also agree that if Azure is notified that a complaint has been filed with a governmental, administrative or judicial body, regarding a domain name registered by you using Azure, that Azure, in its sole discretion, may take whatever action Azure deems necessary regarding further modification, assignment of and/or control of the domain name deemed necessary to comply with the actions or requirements of the governmental, administrative or judicial body until such time as the dispute is settled. In this event you agree to hold Azure harmless for any action taken by Azure.

\r\n

You agree to submit, without prejudice to other potentially applicable jurisdictions, to the jurisdiction of the courts (1) of your domicile, (2) where registrar is located or (3) where the registry operator is located (e.g., China for .CN, Columbia for .CO, UK for .EU, etc.).

\r\n

\r\n

In the case of .ca domain names, you agree that, if your use of the service or the registration of a .ca domain name is challenged by a third party, you will be subject to the provisions specified by CIRA in their dispute resolution policy, in effect at the time of the dispute.

\r\n

\r\n

7. TRANSFER OF DOMAIN NAMES; RESALE PRACTICES

\r\n

If you transfer any domain name, you agree to provide the information required by, and to abide by, the procedures and conditions set forth in our Domain Name Transfer Agreement and Change of Registrant Agreement. You may view the latest versions of our Domain Name Transfer Agreement and Change of Registrant Agreementonline. In order to further protect your domain name, any domain name registered with Azure or transferred to Azure shall be placed on lock status, unless an opted-out has occurred as defined in our Change of Registrant Agreement or Domain Name Proxy Agreement. The domain name must be placed on unlock status in order to initiate a transfer of the domain name away from Azure to a new Registrar. You may log into your account with Azure at any time after your domain name has been successfully transferred to Azure, and change the status to unlock.

\r\n

In the event you are purchasing a domain name on behalf of a third party, you agree to inform any customer of yours, who may be acquiring a domain name through you using Azure's registration services, that they are in fact registering their domain name through Azure and that Azure or its licensor is an accredited registrar with ICANN. You agree not to represent that you are an ICANN-accredited registrar or that you are in any way providing superior access to the ICANN Domain Name Registry. You also agree not to use the ICANN trademark logo in any of your promotional materials including your website.

\r\n

You agree to obtain each of your customers' acceptances to the then current version of this Agreement, and to retain evidence of their acceptance for a period of not less than three (3) years. Should you require that your customers accept additional terms and conditions that are not required by Azure, you agree that such additional terms and conditions shall not conflict with this Agreement and the policies and procedures adopted by ICANN.

\r\n

You agree that Azure is not lending you access to its registrar connections or its registry access, nor will you be deemed to be a registrar in your own right. Furthermore, you agree you will not attempt to gain access to Azure's registrar connections or registry access. You agree to provide complete, accurate and current data for each registrant to be added to a registry in accordance with ICANN requirements for inclusion in the Whois database.

\r\n

You agree to provide your customers with adequate customer support, and to maintain contact with them with regard to providing a medium for them to communicate changes in the information they provided as part of the domain name registration process. Upon receiving corrected or updated information you will, within five (5) business days, provide such information to Azure so Azure may update its registration records. You will retain copies of all communications between you and your customers and will upon request provide Azure copies of same.

\r\n

8. YOUR OBLIGATIONS; SUSPENSION OF SERVICES; BREACH OF AGREEMENT

\r\n

You represent and warrant to the best of your knowledge that, neither the registration of the domain nor the manner it is directly or indirectly used, infringes the legal rights of any third party.  You will comply with all applicable laws, including, but not limited to those relating to privacy, data collection, consumer protection, fair lending, debt collection, organic farming, and disclosure of data and financial disclosures.  If you collect and maintain sensitive health and financial data, you must implement reasonable and appropriate security measures commensurate with the offering of those services, as defined by applicable law.  You represent that you possess any necessary authorization, charter, license, and/or other related credential for participation in the sector associated with the associated registry tld string.  You will report any material changes to the validity of your authorization, charter, license, and/or other related credential. You will indemnify and hold harmless the registrar and registry operator, and their directors, officers, employees and agents, from and against any and all claims, damages, liabilities, costs and expenses (including reasonable legal fees and expenses) arising out of or related to the domain name registration.  This obligation shall survive expiration or termination of this Agreement or the domain name registration.

\r\n

You agree that, in addition to other events set forth in this Agreement:

\r\n
    \r\n
  1. Your ability to use any of the services provided by Azure is subject to cancellation or suspension in the event there is an unresolved breach of this Agreement and/or suspension or cancellation is required by any policy now in effect or adopted later by ICANN;
  2. \r\n
  3. Your registration of any domain names shall be subject to suspension, cancellation or transfer pursuant to any ICANN adopted specification or policy, or pursuant to any Azure procedure not inconsistent with an ICANN adopted specification or policy (a) to correct mistakes by Azure or the registry operator in registering any domain name; or (b) for the resolution of disputes concerning any domain name.
  4. \r\n
\r\n

You acknowledge and agree that Azure and registry reserve the right to deny, cancel or transfer any registration or transaction, or place any domain name(s) on registry lock, hold or similar status, as either deems necessary, in the unlimited and sole discretion of either Azure or the registry: (i) to comply with specifications adopted by any industry group generally recognized as authoritative with respect to the Internet (e.g., RFCs), (ii) to correct mistakes made by registry or any registrar in connection with a domain name registration, (iii) for the non-payment of fees to registry, (iv) to protect the integrity and stability of the registry, (v) to comply with any applicable court orders, laws, government rules or requirements, requests of law enforcement, or any dispute resolution process, (vi) to comply with any applicable ICANN rules or regulations, including without limitation, the registry agreement, (vii) to avoid any liability, civil or criminal, on the part of registry operator, as well as its affiliates, subsidiaries, officers, directors, and employees, (viii) per the terms of this Agreement, (ix) following an occurrence of any of the prohibited activities described in Section 8 below, or (x) during the resolution of a dispute.

\r\n

You agree that your failure to comply completely with the terms and conditions of this Agreement and any Azure rule or policy may be considered by Azure to be a material breach of this Agreement and Azure may provide you with notice of such breach either in writing or electronically (i.e. email). In the event you do not provide Azure with material evidence that you have not breached your obligations to Azure within ten (10) business days, Azure may terminate its relationship with you and take any remedial action available to Azure under the applicable laws. Such remedial action may be implemented without notice to you and may include, but is not limited to, cancelling the registration of any of your domain names and discontinuing any services provided by Azure to you. No fees will be refunded to you should your Services be cancelled or terminated because of a breach.

\r\n

Azure's failure to act upon or notify you of any event, which may constitute a breach, shall not relieve you from or excuse you of the fact that you have committed a breach.

\r\n

9. RESTRICTION OF SERVICES; RIGHT OF REFUSAL

\r\n

You agree not to use the services provided by Azure, or to allow or enable others, to use the services provided by Azure for the purposes of:

\r\n
    \r\n
  • The transmission of unsolicited email (Spam); and
  • \r\n
  • Repetitive, high volume inquires into any of the services provided by Azure (i.e. domain name availability, etc.).
  • \r\n
\r\n

You acknowledge and agree that you are prohibited from distributing malware, abusively operating botnets, phishing, piracy, trademark or copyright infringement, fraudulent or deceptive practices, counterfeiting or otherwise engaging in activity contrary to applicable law, and you acknowledge and agree that the consequences for such activities include suspension of the domain name.

\r\n

If you are hosting your domain name system (“DNS”) on Azure’s servers, or are using our systems to forward a domain name, URL, or otherwise to a system or site hosted elsewhere, or if you have your domain name registered with Azure, you are responsible for ensuring there is no excessive overloading on Azure’s servers. You may not use Azure’s servers and your domain name as a source, intermediary, reply to address, or destination address for email denial-of-service attack, Internet packet flooding, packet corruption, or other abusive attack. Server hacking or other perpetration of security breaches is prohibited. You agree that Azure reserves the right to deactivate your domain name from its DNS if Azure deems it is the recipient of activities caused by your site that threaten the stability of its network.

\r\n

You agree that Azure, in its sole discretion and without liability to you, may refuse to accept the registration of any domain name. Azure also may in its sole discretion and without liability to you delete the registration of any domain name during the first thirty (30) days after registration has taken place. Azure may also cancel the registration of a domain name, after thirty (30) days, if that name is being used, as determined by Azure in its sole discretion, in association with spam or morally objectionable activities. Morally objectionable activities will include, but not be limited to:

\r\n
    \r\n
  • Activities prohibited by the laws of the United States and/or foreign territories in which you conduct business;
  • \r\n
  • Activities designed to encourage unlawful behavior by others, such as hate crimes, terrorism and child pornography; and
  • \r\n
  • Activities designed to harm or use unethically minors in any way.
  • \r\n
\r\n

In the event Azure refuses a registration or deletes an existing registration during the first thirty (30) days after registration, you will receive a refund of any fees paid to Azure in connection with the registration either being cancelled or refused. In the event Azure deletes the registration of a domain name being used in association with spam or morally objectionable activities, no refund will be issued.

\r\n

10. DEFAULT SETTINGS; PARKED PAGE

\r\n

Choosing Your Domain Name Settings.  When you register a domain name with Azure, you will be prompted to choose your domain name settings during the checkout process.  If you plan on using another provider for your website or hosting needs, then you should enter the name servers of such provider when you choose your domain name settings.  This will direct your domain name away from Azure’s name servers.  If you are an existing Azure customer and have already set up a customer profile designating your domain name settings for new domain name registrations, you will not need to complete this step again during the checkout process.   

\r\n

Azure’s Default Settings.  If you do not direct your domain name away from Azure’s name servers as described above, Azure will direct your domain name to a “Parked Page” (“Default Setting”).  You acknowledge and agree that Azure has the right to set the Default Setting. 

\r\n

Parked Page Default Setting.  Azure’s Parked Page service is an online domain monetization system designed to generate revenue (through the use of pay per click advertising) from domain names that are not actively being used as websites.  If your domain name is directed to a Parked Page, you acknowledge and agree that Azure may display both (a) in-house advertising (which includes links to Azure products and services) and (b) third-party advertising (which includes links to third-party products and services) on your Parked Page through the use of pop-up or pop-under browser windows, banner advertisements, audio or video streams, or any other advertising means, and we may aggregate for our own use, related usage data by means of cookies and other similar means.  In addition, you acknowledge and agree that all in-house and third-party advertising will be selected by Azure and its advertising partners, as appropriate, and you will not be permitted to customize the advertising, or entitled to any compensation in exchange therefor.  Please note that the third-party advertising displayed on Azure’s Parked Pages may contain content offensive to you, including but not limited to links to adult content.  Azure makes no effort to edit, control, monitor, or restrict the content and third-party advertising displayed on Azure’s Parked Pages, and expressly disclaims any liability or responsibility to you or any third party in connection therewith.

\r\n

Changing Azure’s Default Settings.  You may change Azure’s Default Settings at any time during the term of your domain name registration.

\r\n
    \r\n
  1. Content Displaying On Your Parked Page.  You can not modify the content displaying on your Parked Page.  You may select one of the other options listed below.
  2. \r\n
  3. Participating In Domain Name Monetization.  If you wish to participate in the domain monetization potential presented by Azure’s Parked Page service, please review and consider purchasing our CashParking® service.   
  4. \r\n
  5. No Content.  If the options listed above are not acceptable to you, please contact customer support to learn what other options might be available to you.
  6. \r\n
\r\n

Return To Parked Page Default Setting Upon Domain Name Expiration.  Upon domain name expiration, and regardless of how you use your domain name during the term of your domain name registration, your domain name will automatically return to the Parked Page Default Setting described above.  As used in this paragraph, “expiration” is deemed to include any “renewal period” or “redemption period” immediately after the domain name expires, but before the domain name is returned to the registry.  Once your domain name has returned to the Parked Page Default Setting described above, the only way to opt out of the Parked Page service is to renew, redeem, or re-register your domain name in accordance with Section 2(B), Domain Name Renewal Terms, of this Agreement.   

\r\n

11. DOMAIN ADD-ONS

\r\n

Business Registration:  Business registration allows You to display additional information about the business that is the basis of Your domain name, including, but not limited to, such information as Your fax number, street address, and hours of operation.

\r\n

Certified Domains.  The certified domain service generally allow You to: (i) put a Certified Domain Validation seal on Your website; and (ii) have Your domain name listed as \"Certified\", in WHOIS lookups on our website.   The Certified Domain Validation seal renews independently of Your domain. When You renew Your domain, You must also, when necessary, separately renew Your Certified Validation seal. However, the Certified Domain Validation seal can be cancelled independently of Your domain. If the domain is cancelled, the Certified Domain associated with the cancelled domain will automatically cancel.  The Certified Domain seal is a trademark and is protected by copyright, trademark and other intellectual property laws. You may use the Certified Domain seal only in conjunction with the purchase of the Services set forth in the Agreement, and subject to the terms and conditions hereof. Other than provided for in this Agreement, You may not otherwise use, reproduce, or modify the mark for any additional promotional use, without our prior written approval. Your right to the use of the Certified Domain seal is immediately terminated upon expiration or termination of this Agreement.

\r\n

Expiration Consolidation.  You understand and acknowledge the expiration consolidation service may only be used to consolidate the expiration of .com and .net domain names. The service may not be used to consolidate domains that are on Registrar HOLD, Registry HOLD, or pending Transfer status. You acknowledge the service may only be used to push the expiration date of Your domains forward in time, at least one (1) month forward and no more than ten (10) years forward, and then, only for a period lasting less than twelve (12) months. Once the service has been used to consolidate domains, the new expiration date may not be reversed. To ensure the service is not abused or used as an alternative to renewals, you may only use the service on each domain once in any 12-month period. The service may only be used on domain names that have not passed their expiration date. In order to change the expiration date again, You will be required to renew the domain name first.  You further understand and acknowledge the service may only be used to coordinate domains where we are the registrar of record. Domains not registered with us must be transferred before we can perform the Service. 

\r\n

\r\n

Backordering/Monitoring.  You agree a domain name that has expired shall be subject first to a grace period of twelve (12) days, followed by the ICANN-mandated redemption grace period of thirty (30) days. During this period of time, the current domain name registrant may renew the domain name and retain ownership. We do not guarantee your backorder will result in you obtaining the domain name and expressly reserves the right to (a) refuse additional backorders or (b) cancel existing backorders at any time for any reason.  If your backorder is refused or cancelled, we agree to promptly refund any fees paid for such domain name backorder. The domain name may also be placed in a secondary market for resale through the Auctions® service.  After your first year of Auctions membership, you agree that unless otherwise advised, we will automatically renew your Auctions membership using the payment method you have on file for so long as your backorder credit is active. You may learn more about Auctions by visiting the Auctions website. The domain name may also be subject to a drop pool process before it is available for purchasing. You understand we and our registrar affiliates use our services, including backordering.  Therefore, the domain name may be registered with a different registrar, but can be managed through your account.  By using the Services, you will be able to, among other things:

\r\n
    \r\n
  1. Backorder any domain name under the top level domains .COM, .NET, .US, .BIZ, .INFO, .ORG, .MOBI. A backorder for a domain name will include the price of up to a one-year domain name registration. Should you successfully backorder any domain name, you will be subject to the terms and conditions of the Domain Name Registration and related agreements, which are incorporated herein by reference.
  2. \r\n
  3. Change your backorder until you obtain a domain name. You will have the opportunity to change the credit to a different domain name until you successfully capture one. After three (3) years, if the credit is not used, we reserves the right to remove the credit.
  4. \r\n
  5. Subscribe monthly to an expiring domain name list. You may also choose to purchase a subscription to a list of domain names expiring within the next five (5) days. If you subscribe to the expiring domain name list, you agree the payment method you have on file may be charged on a monthly subscription basis for the term of the Services you purchase.
  6. \r\n
  7. Select domain names off the expiring domain name list you would like to register. Each domain name you attempt to backorder will include the price of up to a one-year domain name registration, as set forth in subsection (i) above.
  8. \r\n
  9. Monitor your currently registered domain names for changes in registrar, status, expiration date or name servers at no additional cost.
  10. \r\n
  11. Subscribe to Domain Alert Pro or monitoring, which enables you to monitor any currently registered domain name, regardless of registrar, for historical tracking of status changes and designation of multiple email notification addresses.
  12. \r\n
\r\n

\r\n

\r\n

Transfer Validation. The transfer validation service is provided to help You keep Your domain name secure. By choosing to use the service, You are making an explicit and voluntary request to us to deny all attempts to transfer Your domain name to another registrar, or to move Your domain name to another account, unless You verify each request as described herein. You will provide us with a contact name, phone number and PIN for domain transfer validations. You will be contacted by us when a domain transfer is requested for a domain name in Your account. When we receive a transfer request, we will call You to verify the transfer request. If we cannot reach You with seventy-two (72) hours of receipt of the transfer request, the transfer will be denied. If You do not provide the proper PIN, the transfer will be denied. When we receive a change of account request, we will call You to verify the change request. If we cannot reach You with seventy-two (72) hours of receipt of the change request, the change will be denied. If You do not provide the proper PIN, the change will be denied. Availability of Services are subject to the terms and conditions of this Agreement and each of our policies and procedures. We shall use commercially reasonable efforts to attempt to provide certain portions of the Services on a twenty-four (24) hours a day, seven (7) days a week basis throughout the term of this Agreement and other portions of the service, during normal business hours. You acknowledge and agree that from time to time the Services may be inaccessible or inoperable for any reason, including, without limitation: (i) equipment malfunctions; (ii) periodic maintenance procedures or repairs that we may undertake from time to time; or (iii) causes beyond the reasonable control of us or that are not reasonably foreseeable by us, including, without limitation, interruption or failure of telecommunication or digital transmission links, hostile network attacks, network congestion or other failures. You acknowledge and agree that we has no control over the availability of the service on a continuous or uninterrupted basis.

\r\n

\r\n

12. PRE-REGISTRATIONS

\r\n

If you submit an application for pre-registration of a domain name, Azure does not guarantee that the name will be secured for you, or that you will have immediate access to the domain name if secured.  Azure may use third-party service providers for the pre-registration services.

\r\n

13. PROVISIONS SPECIFIC TO .BIZ REGISTRATIONS

\r\n

Domain Name Dispute Policy.  If you reserved or registered a .BIZ domain name through us, in addition to our Dispute Resolution Policy, you hereby acknowledge that you have read and understood and agree to be bound by the terms and conditions of the Restrictions Dispute Resolution Policy applicable to the .biz TLD.

\r\n

The RDRP sets forth the terms under which any allegation that a domain name is not used primarily for business or commercial purposes shall be enforced on a case-by-case basis by an independent ICANN-accredited dispute provider. Registry Operator will not review, monitor, or otherwise verify that any particular domain name is being used primarily for business or commercial purposes or that a domain name is being used in compliance with the SUDRP or UDRP processes.

\r\n

One Year Registration.  If you are registering a .BIZ domain name and you elect to take advantage of special pricing applicable to one-year registrations, we will automatically renew your domain name for an additional one-year period at the end of the first year term by taking payment from the Payment Method you have on file, unless you notify us that you do not wish to renew. You will be notified and given the opportunity to accept or decline the one-year renewal prior to your domain name expiration date. In the event you decide not to renew your one-year .BIZ domain name for a second year, your domain name registration will automatically revert back to us and we will gain full rights of registration to such domain name. You agree that if you delete or transfer your .BIZ domain name during the first year, you will automatically be charged the second year renewal fees.

\r\n

\r\n

14. PROVISIONS SPECIFIC TO .INFO REGISTRATIONS 

\r\n

One Year Registration.  If you are registering a .INFO domain name and you elect to take advantage of special pricing applicable to one-year registrations, we will automatically renew your domain name for an additional one-year period at the end of the first year term by taking payment from the Payment Method you have on file, unless you notify us that you do not wish to renew. You will be notified and given the opportunity to accept or decline the one-year renewal prior to your domain name expiration date. In the event you decide not to renew your one-year .INFO domain name for a second year, your domain name registration will automatically revert back to us and we will gain full rights of registration to such domain name. You agree that if you delete or transfer your .INFO domain name during the first year, you will automatically be charged the second year renewal fees.

\r\n

15. PROVISIONS SPECIFIC TO .MOBI REGISTRATIONS 

\r\n

Instant Mobilizer. You are hereby granted a personal, revocable, non-exclusive, non-transferable, non-assignable, non-sublicensable license to use the Instant Mobilizer service (“Service”), provided, however, You abide by the terms and conditions set forth. You shall not alter, modify, adapt or translate the whole or part of the Service in any way whatsoever. You may not create derivative works based on the Service. You may not rent, lease, assign, dispose of, novate, sub-license or otherwise transfer any of its rights to use the Service to any third party.  In the event that the volume of traffic to You from Your use of the Service is sufficient so as to jeopardize the provision of Service for other end users, we and our licensors reserve the right to, at its sole discretion, permanently or temporarily, discontinue Your use of the Service. For the avoidance of doubt, the volume of traffic generated by You should not exceed two thousand (2,000) page views per day.  You acknowledge and agree the text \"Instant Mobilizer from dotMobi\" or equivalent, will be inserted at the footer of Your site.  In the event a dotMobi domain to which the Service is being provided is transferred to another domain name registrar, the Service will be interrupted on that dotMobi domain, and Service will not be restored if the new registrar does not offer the Service. 

\r\n

\r\n

16. PROVISIONS SPECIFIC TO .NAME REGISTRATIONS 

\r\n

\r\n

17. PROVISIONS SPECIFIC TO .REISE REGISTRATIONS

\r\n

Domain Names registered in .REISE should be used for purposes dedicated to travel topics within six months following initial Registration, e.g. utilized on the Internet or otherwise used to perform a function.

\r\n

18. PROVISIONS SPECIFIC TO .SEXY REGISTRATIONS

\r\n

You shall not permit content unsuitable for viewing by a minor to be viewed from the main or top-level directory of a .SEXY domain name. For purposes of clarity, content viewed at the main or top-level directory of a .SEXY domain name is the content immediately visible if a user navigates to http://example.sexy or http://www.example.sexy. No restrictions apply to the content at any other page or subdirectory addressed by a .SEXY Registered Name. 

\r\n

19. COUNTRY CODE TOP LEVEL DOMAINS

\r\n

You represent and warrant that you meet the eligibility requirements of each ccTLD you apply for. You further agree to be bound by any registry rules, policies, and agreements for that particular ccTLD. These may include, but are not limited to, agreeing to indemnify the ccTLD provider, limiting the liability of the ccTLD provider, and requirements that any disputes be resolved under that particular country's laws.

\r\n

(A) PROVISIONS SPECIFIC TO .AU REGISTRATIONS 

\r\n

.au Registrations (to include com.au, net.au and org.au) are governed by the following additional terms and conditions:

\r\n

auDA. auDA means .au Domain Administration Limited ACN 079 009 340, the .au domain names administrator.  The Registrar acts as agent for auDA for the sole purpose, but only to the extent necessary, to enable auDA to receive the benefit of rights and covenants conferred to it under this Agreement. auDA is an intended third party beneficiary of this agreement.

\r\n

auDA Published Policy.  auDA Published Policies means those specifications and policies established and published by auDA from time to time at http://www.auda.org.au.  You must comply with all auDA Published Policies, as if they were incorporated into, and form part of, this Agreement. In the event of any inconsistency between any auDA Published Policy and this Agreement, then the auDA Published Policy will prevail to the extent of such inconsistency.  You acknowledge that under the auDA Published Policies: (1) there are mandatory terms and conditions that apply to all domain names; (2) licences, and such terms and conditions are incorporated into, and form part of, this Agreement; (3) You are bound by, and must submit to, the .au Dispute Resolution Policy; and (4) auDA may delete or cancel the registration of a .au domain name. 

\r\n

auDA's Liabilities and Indemnity.  To the fullest extent permitted by law, auDA will not be liable to Registrant for any direct, indirect, consequential, special, punitive or exemplary losses or damages of any kind (including, without limitation, loss of use, loss or profit, loss or corruption of data, business interruption or indirect costs) suffered by Registrant arising from, as a result of, or otherwise in connection with, any act or omission whatsoever of auDA, its employees, agents or contractors. Registrant agrees to indemnify, keep indemnified and hold auDA, its employees, agents and contractors harmless from all and any claims or liabilities, arising from, as a result of, or otherwise in connection with, Registrant's registration or use of its .au domain name. Nothing in this document is intended to exclude the operation of Trade Practices Act 1974.

\r\n

(B) PROVISIONS SPECIFIC TO .CA REGISTRATIONS

\r\n

You acknowledge and agree that registration of your selected domain name in your first application to CIRA shall not be effective until you have entered into and agreed to be bound by CIRA's Registrant Agreement.

\r\n

CIRA Certified Registrar.  The registrar shall immediately give notice to you in the event that it is no longer a CIRA Certified Registrar, has had its certification as a CIRA Certified Registrar suspended or terminated, or the Registrar Agreement between CIRA and the Registrar is terminated or expires. CIRA may post notice of such suspension, termination, or expiry on its website and may, if CIRA deems appropriate, give notice to the registrants thereof. In the event that the registrar is no longer a CIRA Certified Registrar, has had its certification as a CIRA Certified Registrar suspended or terminated or in the event the Registrar Agreement between CIRA and the Registrar is terminated or expires, you shall be responsible for changing your Registrar of Record to a new CIRA Certified Registrar within thirty (30) days of the earlier of notice thereof being given to you by (i) the Registrar or (ii) CIRA in accordance with CIRA's then current Registry PRP; provided, however, that if any of your domain name registrations are scheduled to expire within thirty (30) days of the giving of such notice, then you shall have thirty (30) days from the anniversary date of the registration(s), to register with a new CIRA certified registrar and to renew such domain name registration(s) in accordance with the Registry PRP.

\r\n

You acknowledge and agree that should there be insufficient funds prepaid by the registrar in the CIRA Deposit Account to be applied in payment of any fees, CIRA may in its sole discretion stop accepting applications for domain name registrations from the registrar, stop effecting registrations of domain names and transfers, renewals, modifications, and cancellations requested by the registrar and stop performing other billable transactions requested by the registrar not paid in full and CIRA may terminate the Registrar Agreement between CIRA and the Registrar.

\r\n

.CA ASCII and IDN domain variants are bundled and reserved for a single registrant.  Registrants are not required to register all variants in a bundle, but all registered variants must be registered and managed at a single registrar. Each variant registered will incur a registration fee.  In addition, when registering multiple .CA domain (ASCII and IDN) variants in a bundle, your registrant information must be identical.  If variants are registered at other registrars or if registrant information does not match, it may result in an \"unavailable\" search result, delayed or failed registration. If information does not match, validation is required and may take up to seven business days and delay availability of domain. 

\r\n

(C) PROVISIONS SPECIFIC TO .CN REGISTRATIONS 

\r\n

.CN is a restricted TLD – applications are subject to both a domain name check and real name verification as required by the China.  Registrations in .CN are therefore subject to the following additional terms:

\r\n

Verification, Registration and Activation.  If a domain name is not permitted to be registered by the Chinese government, as determined by us, the Registry Operator and/or a 3rd party provider utilized for such services and determinations, in either party’s discretion, the application for registration will not be successful.  In such event, the name will be deleted and you will be eligible for a refund as further described below.

\r\n

If permitted, then the Registration may proceed, but a .CN domain name may not be activated (i.e., it will not resolve in the Internet) unless and until you have submitted (via the process described during registration) valid documents required of us and the Registry to perform real name verification.  The following are acceptable forms of documents for the purpose of verification:

\r\n
    \r\n
  • China: Resident ID, temporary resident ID, business license or organization code certificate
  • \r\n
  • Hong Kong Special Administrative Region/Macao Special Administrative Region: Resident ID, driver’s license, passport or business license
  • \r\n
  • Singapore: Driver’s license, passport or business license
  • \r\n
  • Taiwan: Resident ID, driver’s license or business license
  • \r\n
  • Other Countries/Regions: Driver’s license or passport
  • \r\n
\r\n

Documents submitted to us are used by us and shared with the Registry solely for the purpose of real name verification, and are otherwise subject to our Privacy Policy.  By registering a .CN domain, you expressly agree that your data may be stored on servers in the U.S., or otherwise outside of the China.

\r\n

Refunds.  Refunds for .CN Registrations will only be allowed where (i) registration of the applied for domain name is not permitted by the Chinese government; or (ii) you notify us of your intent to cancel for any reason within the first five (5) days after the Registration (i.e., after it is deemed permissible by the Chinese government).  For the avoidance of doubt, refunds will not be permitted under any circumstances after five (5) days from the date of Registration, including, for example, in the event real name verification is not successful or if the Chinese government determines after Registration that the domain name should not have been registered (and directs us to delete).

\r\n

(D) PROVISIONS SPECIFIC TO .JP REGISTRATIONS

\r\n

Registration Restrictions.  You represent and warrant that you have a local presence in Japan with a home or office address. You agree that certain domain names are reserved and can only be registered by certain parties. These include: (i) TLDs, other than ccTLDs, as determined by ICANN; (ii) geographical-type .JP domain names that are defined as metropolitan, prefectural, and municipal labels; (iii) names of primary and secondary educational organizations; (iv) names of organizations related to Internet management; (v) names required for .JP domain name operations; and (vi) character strings which may be confused with ASCII-converted Japanese domain names. The complete list of .JP Reserved Domains is available here

\r\n

20. ENGLISH LANGUAGE CONTROLS

\r\n

This Agreement, along with all policies and the applicable product agreements identified above and incorporated herein by reference (collectively, the “Agreement”), is executed in the English language. To the extent any translation is provided to you, it is provided for convenience purposes only, and in the event of any conflict between the English and translated version, where permitted by law, the English version will control and prevail. Where the translated version is required to be provided to you and is to be considered binding by law (i) both language versions shall have equal validity, (ii) each party acknowledges that it has reviewed both language versions and that they are substantially the same in all material respects, and (iii) in the event of any discrepancy between these two versions, the translated version may prevail, provided that the intent of the Parties has been fully taken into consideration. 

\n
\n
\n\nRevised: 10/6/17
\nCopyright © 2000-2017 All Rights Reserved.\n
\n
\n
"), - // Title: to.Ptr("Domain Name Registration Agreement"), - // URL: to.Ptr("http://www.secureserver.net/agreements/ShowDoc.aspx?pageid=reg_sa&pl_id=510456"), - // }, - // { - // AgreementKey: to.Ptr("DNPA"), - // Content: to.Ptr("\n\n\n\n\n
\n\n\n\n\n\n\n
\nDomain Name Proxy Agreement\n
\n

Last Revised: October 25, 2017

\n

Please read this Domain Name Proxy Agreement (\"Agreement\") carefully. By using the Services and/or website of Domains By Proxy, LLC, a Delaware limited liability company (\"DBP\"), You (as defined below) agree to all the terms and conditions set forth both herein and in the DBP privacy policy, which is incorporated by reference and can be found by clicking here.  You acknowledge that DBP may amend this Agreement at any time upon posting the amended terms on its website, and that any new, different or additional features changing the services provided by DBP will automatically be subject to this Agreement. If You do not agree to be bound by, or if You object to, the terms and conditions of this Agreement and any amendments hereto, do not use or access DBP's services. Continued use of DBP's services and its website after any such changes to this Agreement have been posted, constitutes Your acceptance of those changes.

\r\n

This Agreement is by and between DBP and you, your heirs, assigns, agents and contractors (\"You\") and is made effective as of the date of electronic execution. This Agreement sets forth the terms and conditions of Your relationship with DBP and Your use of DBP's services and represents the entire Agreement between You and DBP. By using DBP's Services, You acknowledge that You have read, understand and agree to be bound by all the terms and conditions of this Agreement, and You further agree to be bound by the terms of this Agreement for transactions entered into by:

\r\n
    \r\n
  1. You on Your behalf;
  2. \r\n
  3. Anyone acting as Your agent; and
  4. \r\n
  5. Anyone who uses the account You have established with DBP, whether or not the transactions were on Your behalf and/or authorized by You.
  6. \r\n
\r\n

You agree You will be bound by representations made by third parties acting on Your behalf, which either use or purchase services from DBP. You further agree that DBP will not be bound by statements of a general nature on DBP's website or DBP promotional materials. You further agree to abide by the terms and conditions promulgated by the Internet Corporation for Assigned Names and Numbers (\"ICANN\") (including the Uniform Domain Name Dispute Resolution Policy (\"Dispute Resolution Policy\") and Your Registrar (i.e., the ICANN-accredited person or entity through which You register a domain name).

\r\n

1. description of DBP's private registration services

\r\n

When You subscribe to DBP's private registration service through a DBP-affiliated Registrar, DBP will display its contact information in the publicly available \"Whois\" directory in place of Your information. DBP shall keep Your name, postal address, email address, phone and fax numbers confidential, subject to Section 4 of this Agreement. The following information (and not Your personal information) will be made publicly available in the \"Whois\" directory as determined by ICANN policy:

\r\n
    \r\n
  1. DBP's name as the proxy Registrant of the domain name and a proxy email address, phone number and postal address for the proxy Registrant's contact information;
  2. \r\n
  3. A proxy postal address and phone number for the domain name registration's technical contact;
  4. \r\n
  5. A proxy email address, postal address and phone number for the domain name registration's administrative contact;
  6. \r\n
  7. A proxy email address, postal address and phone number for the domain's name registration's billing contact;
  8. \r\n
  9. The primary and secondary domain name servers You designate for the domain name;
  10. \r\n
  11. The domain name's original date of registration and expiration date of the registration; and
  12. \r\n
  13. The identity of the Registrar.
  14. \r\n
\r\n

2. full benefits of domain registration retained by you

\r\n

Although DBP will show in the \"Whois\" directory as the Registrant of each domain name registration You designate, You will retain the full benefits of domain name registration with respect to each such domain name registration, including, subject to Section 4 below:

\r\n
    \r\n
  1. The right to sell, transfer or assign each domain name registration, which shall require cancellation of the DBP services associated with each such domain name registration;
  2. \r\n
  3. The right to control the use of each domain name registration, including designating the primary and secondary domain name servers to which each domain name points;
  4. \r\n
  5. The right to cancel each domain name registration;
  6. \r\n
  7. The right to cancel the DBP services associated with each domain name registration and/or Your privacy services with DBP so that Your contract information is listed in the \"Whois\" directory; and
  8. \r\n
  9. The right to renew each domain name registration upon its expiration, subject to Your Registrar's applicable rules and policies.
  10. \r\n
\r\n

3. PERSONAL INFORMATION AND your notification obligations; representation and warranties; ACCOUNT SECURITY

\r\n

Personal Information and Your Notification Obligations 

\r\n

You agree that for each domain name for which you use DBP services, You will provide accurate and current information as to:

\r\n
    \r\n
  1. Your name, the email address, postal address, phone and fax numbers for the domain name registration's Registrant contact;
  2. \r\n
  3. The email address, postal address, phone and fax numbers for the domain name registration's technical contact;
  4. \r\n
  5. The email address, postal address, phone and fax numbers for the domain name registration's administrative contact;
  6. \r\n
  7. The email address, postal address, phone and fax numbers for the domain name registration's billing contact; and
  8. \r\n
  9. You agree to provide government issued photo identification and/or government issued business identification as required for verification of identity when requested.
  10. \r\n
\r\n

You agree to:

\r\n
    \r\n
  1. Notify DBP within three (3) calendar days when any of the personal information You provided upon subscribing to DBP's services, changes;
  2. \r\n
  3. Respond within three (3) calendar days to any inquiries made by DBP to determine the validity of personal information provided by You; and
  4. \r\n
  5. Timely respond to email messages DBP sends to You regarding correspondence DBP has received that is either addressed to or involves You and/or Your domain name registration, as more fully set forth in Section 5(c) below.
  6. \r\n
  7. To allow DBP to act as your Designated Agent (as that term is defined below) in instances when DBP services are added to or cancelled from your domain name and for the purpose of facilitating a change of registrant request (as further described below). 
  8. \r\n
\r\n

It is Your responsibility to keep Your personal information current and accurate at all times.

\r\n

Renewals

\r\n

You agree DBP will arrange for Your Registrar to charge the credit card You have on file with the Registrar, at the Registrar's then current rates.

\r\n

If for any reason DBP and/or the Registrar for Your domain name is unable to charge Your credit card for the full amount of the service provided, or if DBP and/or the Registrar is charged back for any fee it previously charged to the credit card You provided, You agree that DBP and/or the Registrar may, without notice to You, pursue all available remedies in order to obtain payment, including but not limited to immediate cancellation of all services DBP provides to You.

\r\n

Representations and Warranties

\r\n

You warrant that all information provided by You to DBP is truthful, complete, current and accurate. You also warrant that You are using DBP's private registration services in good faith and You have no knowledge of Your domain name infringing upon or conflicting with the legal rights of a third party or a third party's trademark or trade name. You also warrant the domain name being registered by DBP on Your behalf will not be used in connection with any illegal activity, or in connection with the transmission of Spam, or that contains or installs any viruses, worms, bugs, Trojan horses or other code, files or programs designed to, or capable or, disrupting, damaging or limiting the functionality of any software or hardware.

\r\n

Account Security

\r\n

You agree You are entirely responsible for maintaining the confidentiality of Your customer number/login ID and password (\"Account Access Information\").  You agree to notify DBP immediately of any unauthorized use of Your account or any other breach of security.  You agree DBP will not be liable for any loss that You may incur as a result of someone else using Your Account Access Information, either with or without Your knowledge.  You further agree You could be held liable for losses incurred by DBP or another party due to someone else using Your Account Access Information.  For security purposes, You should keep Account Access Information in a secure location and take precautions to prevent others from gaining access to Your Account Access Information.  You agree that You are entirely responsible for all activity in Your account, whether initiated by You, or by others.  DBP specifically disclaims liability for any activity in Your account, regardless of whether You authorized the activity.

\r\n

Designated Agency and Change of Registrant Information

\r\n

“DESIGNATED AGENT” MEANS AN INDIVIDUAL OR ENTITY THAT THE PRIOR REGISTRANT OR NEW REGISTRANT EXPLICITLY AUTHORIZES TO APPROVE A CHANGE OF REGISTRANT REQUEST ON ITS BEHALF.  IN THE CASE OF DBP SERVICES, A CHANGE OF REGISTRANT REQUEST MAY ALSO ARISE DUE TO INSTANCES WHERE DBP SERVICES ARE ADDED, OR REMOVED, FROM A DOMAIN NAME.  FOR THE PURPOSE OF FACILITATING ANY SUCH CHANGE REQUEST, AND IN ACCORDANCE WITH ICANN'S CHANGE OF REGISTRANT POLICY, YOU AGREE TO APPOINT DBP AS YOUR DESIGNATED AGENT FOR THE SOLE PURPOSE OF EXPLICITLY CONSENTING TO MATERIAL CHANGES OF REGISTRATION CONTACT INFORMATION ON YOUR BEHALF.

\r\n

4. DBP's rights to deny, suspend, terminate service and to disclose your personal information

\r\n

You understand and agree that DBP has the absolute right and power, in its sole discretion and without any liability to You whatsoever, to:

\r\n
    \r\n
  1. Cancel the privacy service (which means that Your information will be available in the \"Whois\" directory) and/or reveal Your name and personal information that You provided to DBP:  
    A. When required by law, in the good faith belief that such action is necessary in order to conform to the edicts of the law or in the interest of public safety;
    B. To comply with legal process served upon DBP or in response to a reasonable threat of litigation against DBP (as determined by DBP in its sole and absolute discretion); or
    C. To comply with ICANN rules, policies, or procedures.
  2. \r\n
  3. Resolve any and all third party claims, whether threatened or made, arising out of Your use of a domain name for which DBP is the registrant listed in the \"Whois\" directory on Your behalf; or
  4. \r\n
  5. Take any other action DBP deems necessary:
    A. In the event you breach any provision of this Agreement or the DBP Anti-Spam Policy;
    B. To protect the integrity and stability of, and to comply with registration requirements, terms, conditions and policies of, the applicable domain name Registry and/or Registry Provider;
        C. To comply with any applicable laws, government rules or requirements, subpoenas, court orders or requests of law enforcement; 
    D. To comply with ICANN's Dispute Resolution Policy or ICANN's Change of Registrant Policy;
    E. To avoid any financial loss or legal liability (civil or criminal) on the part of DBP, its parent companies, subsidiaries, affiliates, shareholders, agents, officers, directors and employees;
    F. If the domain name for which DBP is the registrant on Your behalf violates or infringes a third party's trademark, trade name or other legal rights; and
    G. If it comes to DBP's attention that You are using DBP's services in a manner (as determined by DBP in its sole and absolute discretion) that:
  6. \r\n
\r\n
\r\n
    \r\n
  • Is illegal, or promotes or encourages illegal activity;
  • \r\n
  • Promotes, encourages or engages in child pornography or the exploitation of children;
  • \r\n
  • Promotes, encourages or engages in terrorism, violence against people, animals, or property;
  • \r\n
  • Promotes, encourages or engages in any spam or other unsolicited bulk email, or computer or network hacking or cracking;
  • \r\n
  • Violates the Ryan Haight Online Pharmacy Consumer Protection Act of 2008 or similar legislation, or promotes, encourages or engages in the sale or distribution of prescription medication without a valid prescription;  
  • \r\n
  • Infringes on the intellectual property rights of another User or any other person or entity;
  • \r\n
  • Violates the privacy or publicity rights of another User or any other person or entity, or breaches any duty of confidentiality that you owe to another User or any other person or entity;
  • \r\n
  • Interferes with the operation of DBP services;
  • \r\n
  • Contains or installs any viruses, worms, bugs, Trojan horses or other code, files or programs designed to, or capable of, disrupting, damaging or limiting the functionality of any software or hardware; or
  • \r\n
  • Contains false or deceptive language, or unsubstantiated or comparative claims, regarding DBP or its services.
  • \r\n
\r\n
\r\n

You further understand and agree that if DBP is named as a defendant in, or investigated in anticipation of, any legal or administrative proceeding arising out of Your domain name registration or Your use of DBP's services, Your private registration service may be canceled, which means the domain name registration will revert back to You and Your identity will therefore be revealed in the Whois directory as Registrant.

\r\n

In the event:

\r\n
    \r\n
  1. DBP takes any of the actions set forth in subsection i, ii, or iii above or section 5; and/or
  2. \r\n
  3. You elect to cancel DBP's services for any reason --
  4. \r\n
\r\n

Neither DBP nor your Registrar will refund any fees paid by You whatsoever.

\r\n

5. communications forwarding

\r\n

a. Correspondence Forwarding

\r\n

Inasmuch as DBP's name, postal address and phone number will be listed in the Whois directory, You agree DBP will review and forward communications addressed to Your domain name that are received via email, certified or traceable courier mail (such as UPS, FedEx, or DHL), or first class U.S. postal mail. You specifically acknowledge DBP will not forward to You first class postal mail (other than legal notices), \"junk\" mail or other unsolicited communications (whether delivered through email, fax, postal mail or telephone), and You further authorize DBP to either discard all such communications or return all such communications to sender unopened. You agree to waive any and all claims arising from Your failure to receive communications directed to Your domain name but not forwarded to You by DBP.

\r\n

b. Email Forwarding

\r\n

The Whois directory requires an email address for every purchased domain name registration. When You purchase a private domain registration, DBP creates a private email address for that domain name, \"@domainsbyproxy.com\". Thereafter, when messages are sent to that private email address, DBP handles them according to the email preference You selected for that particular domain name. You have three (3) email preferences from which to choose. You can elect to:

\r\n
    \r\n
  1. Have all of the messages forwarded;
  2. \r\n
  3. Have all of the messages filtered for Spam and then forwarded; or
  4. \r\n
  5. Have none of the messages forwarded.
  6. \r\n
\r\n

As with all communications, You agree to waive any and all claims arising from Your failure to receive email directed to Your domain name but not forwarded to You by DBP.

\r\n

c. Notifications Regarding Correspondence and Your Obligation to Respond

\r\n

When DBP receives certified or traceable courier mail or legal notices addressed to Your domain name, in most cases, DBP will attempt to forward the mail to you via email. If You do not respond to the DBP email and/or the correspondence DBP has received regarding Your domain name registration concerns a dispute of any kind or otherwise requires immediate disposition, DBP may immediately reveal Your identity and/or cancel the DBP private registration service regarding either the domain name registration(s) in question. This means the Whois directory will revert to displaying Your name, postal address, email address and phone number that you provided to DBP.

\r\n

d. Additional Administrative Fees

\r\n

DBP reserves the right to charge You reasonable \"administrative fees\" or \"processing fees\" for (i)  tasks DBP may perform outside the normal scope of its Services, (ii) additional time and/or costs DBP may incur in providing its Services, and/or (iii) Your non-compliance with the Agreement (as determined by DBP in its sole and absolute discretion). Typical administrative or processing fee scenarios include, but are not limited to, (i) customer service issues that require additional personal time and attention; (ii) disputes that require accounting or legal services, whether performed by DBP staff or by outside firms retained by DBP; (iii) recouping any and all costs and fees, including the cost of Services, incurred by DBP as the result of chargebacks or other payment disputes brought by You, Your bank or Payment Method processor.  These administrative fees or processing fees will be billed to the Payment Method You have on file with Your Registrar.

\r\n

You agree to waive the right to trial by jury in any proceeding that takes place relating to or arising out of this Agreement.

\r\n

6. limitations of liability

\r\n

UNDER NO CIRCUMSTANCES SHALL DBP BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, PUNITIVE, SPECIAL, OR CONSEQUENTIAL DAMAGES FOR ANY REASON WHATSOEVER RELATED TO THIS AGREEMENT, YOUR DOMAIN NAME REGISTRATION, DBP'S SERVICES, USE OR INABILITY TO USE THE DBP WEBSITE OR THE MATERIALS AND CONTENT OF THE WEBSITE OR ANY OTHER WEBSITES LINKED TO THE DBP WEBSITE OR YOUR PROVISION OF ANY PERSONALLY IDENTIFIABLE INFORMATION TO DBP OR ANY THIRD PARTY. THIS LIMITATION APPLIES REGARDLESS OF WHETHER THE ALLEGED LIABILITY IS BASED ON CONTRACT, TORT, WARRANTY, NEGLIGENCE, STRICT LIABILITY OR ANY OTHER BASIS, EVEN IF DBP HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES OR SUCH DAMAGES WERE REASONABLY FORESEEABLE. BECAUSE CERTAIN JURISDICTIONS DO NOT PERMIT THE LIMITATION OR ELIMINATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, DBP'S LIABILITY IN SUCH JURISDICTIONS SHALL BE LIMITED TO THE SMALLEST AMOUNT PERMITTED BY LAW.

\r\n

YOU FURTHER UNDERSTAND AND AGREE THAT DBP DISCLAIMS ANY LOSS OR LIABILITY RESULTING FROM:

\r\n
    \r\n
  1. THE INADVERTENT DISCLOSURE OR THEFT OF YOUR PERSONAL INFORMATION;
  2. \r\n
  3. ACCESS DELAYS OR INTERRUPTIONS TO OUR WEBSITE OR THE WEBSITES OF OUR AFFILIATED REGISTRARS;
  4. \r\n
  5. DATA NON-DELIVERY OF MIS-DELIVERY BETWEEN YOU AND DBP;
  6. \r\n
  7. THE FAILURE FOR WHATEVER REASON TO RENEW A PRIVATE DOMAIN NAME REGISTRATION;
  8. \r\n
  9. THE UNAUTHORIZED USE OF YOUR DBP ACCOUNT OR ANY OF DBP'S SERVICES;
  10. \r\n
  11. ERRORS, OMISSIONS OR MISSTATEMENTS BY DBP;
  12. \r\n
  13. DELETION OF, FAILURE TO STORE, FAILURE TO PROCESS OR ACT UPON EMAIL MESSAGES FORWARDED TO EITHER YOU OR YOUR PRIVATE DOMAIN NAME REGISTRATION;
  14. \r\n
  15. PROCESSING OF UPDATED INFORMATION REGARDING YOUR DBP ACCOUNT; AND/OR
  16. \r\n
  17. ANY ACT OR OMISSION CAUSED BY YOU OR YOUR AGENTS (WHETHER AUTHORIZED BY YOU OR NOT).
  18. \r\n
\r\n

7. indemnity

\r\n

You agree to release, defend, indemnify and hold harmless DBP, its parent companies, subsidiaries, affiliates, shareholders, agents, directors, officers and employees and Your Registrar, from and against any and all claims, demands, liabilities, losses, damages or costs, including reasonable attorneys' fees, arising out of or related in any way to this Agreement, the services provided hereunder by DBP, the DBP website, Your account with DBP, Your use of Your domain name registration, and/or disputes arising in connection with the dispute policy.

\r\n

8. DBP warranty disclaimer

\r\n

DBP, ITS PARENT COMPANIES, SUBSIDIARIES, AFFILIATES, SHAREHOLDERS, AGENTS, DIRECTORS, OFFICERS, AND EMPLOYEES EXPRESSLY DISCLAIM ALL REPRESENTATIONS AND WARRANTIES OF ANY KIND IN CONNECTION WITH THIS AGREEMENT, THE SERVICE PROVIDED HEREUNDER, THE DBP WEBSITE OR ANY WEBSITES LINKED TO THE DBP WEBSITE, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. ALL DBP SERVICES, AS WELL AS THE DBP WEBSITE, ARE PROVIDED \"AS IS\". YOUR SUBSCRIPTION TO AND USE OF DBP'S SERVICES AND ITS WEBSITE ARE ENTIRELY AT YOUR RISK. SOME JURISDICTIONS DO NOT ALLOW THE DISCLAIMER OF IMPLIED WARRANTIES, IN WHICH EVENT THE FOREGOING DISCLAIMER MAY NOT APPLY TO YOU.

\r\n

9. copyright and trademark

\r\n

You understand and agree that all content and materials contained in this Agreement, the Privacy Policy and the DBP website found here , are protected by the various copyright, patent, trademark, service mark and trade secret laws of the United States, as well as any other applicable proprietary rights and laws, and that DBP expressly reserves its rights in and to all such content and materials.

\r\n

You further understand and agree You are prohibited from using, in any manner whatsoever, any of the afore-described content and materials without the express written permission of DBP. No license or right under any copyright, patent, trademark, service mark or other proprietary right or license is granted to You or conferred upon You by this Agreement or otherwise.

\r\n

10. miscellaneous provisions

\r\n

a. Severability; Construction; Entire Agreement

\r\n

If any part of this Agreement shall be held to be illegal, unenforceable or invalid, in whole or in part, such provision shall be modified to the minimum extent necessary to make it legal, enforceable and valid, and the legality, enforceability and validity of the remaining provisions of this Agreement shall not be affected or impaired. The headings herein will not be considered a part of this Agreement. You agree this Agreement, including the policies it incorporates by reference, constitute the complete and only Agreement between You and DBP regarding the services contemplated herein.

\r\n

b. Governing Law; Venue; Waiver Of Trial By Jury

\r\n

This Agreement shall be governed in all respects by the laws and judicial decisions of Maricopa County, Arizona, excluding its conflicts of laws rules. Except as provided immediately below, You agree that any action relating to or arising out of this Agreement, shall be brought exclusively in the courts of Maricopa County, Arizona. For the adjudication of domain name registration disputes, you agree to submit to the exclusive jurisdiction and venue of the U.S. District Court for the District of Arizona located in Phoenix, Arizona. You agree to waive the right to trial by jury in any proceeding, regardless of venue, that takes place relating to or arising out of this Agreement.

\r\n

c. Notices

\r\n

All notices from DBP to You will be sent to the email address You provided to DBP. Notices by email shall be deemed effective twenty-four (24) hours after the email is sent by DBP, unless DBP receives notice that the email address is invalid, in which event DBP may give You notice via first class or certified mail, return receipt requested. All notices from You to DBP shall be sent via certified mail, return receipt requested or traceable courier to:

\r\n
      Domains By Proxy, LLC
      Attn: General Counsel
      14455 North Hayden Rd.
      Suite 219
      Scottsdale, AZ 85260
\r\n

Notices sent via certified mail or traceable courier shall be deemed effective five (5) days after the date of mailing.

\r\n

d. Insurance

\r\n

In the unlikely event You lose Your domain name registration to a third party solely as a result of DBP's negligent actions (and absent fraud or other negligent or willful misconduct committed by a third party), You may be insured against such loss through DBP's Professional Liability Insurance Policy, which is currently underwritten by American International Insurance Company. Of course, every claim is subject to the then-carrier's investigation into the facts and circumstances surrounding such claim. In the event You have reason to believe that circumstances exist which warrant the filing of an insurance claim, please send a written notice (specifying the basis for such claim), via certified mail, return receipt requested, to:

\r\n
      Domains By Proxy, LLC
      Attn: Insurance Claims
      14455 North Hayden Rd.
      Suite 219
      Scottsdale, AZ 85260
\r\n

e. Indemnification

\r\n

In the unlikely event You lose Your domain name registration to a third party solely as a result of DBP's willful misconduct, Your Registrar (the \"Indemnifying Party\") will indemnify and hold You harmless against any losses, damages or costs (including reasonable attorneys' fees) resulting from any claim, action, proceeding, suit or demand arising out of or related to the loss of Your domain name registration. Such indemnification obligations under this Section 10(e) are conditioned upon the following:

\r\n
    \r\n
  1. That You promptly give both DBP and the Indemnifying Party written notice of the claim, demand, or action and provide reasonable assistance to the Indemnifying Party, at its cost and expense, in connection therewith, and
  2. \r\n
  3. That the Indemnifying Party has the right, at its option, to control and direct the defense to any settlement of such claim, demand, or action.
  4. \r\n
\r\n

Any notice concerning indemnification shall, with respect to DBP, be sent in accordance with Section 10(c) of this Agreement. With respect to Your Registrar, notices regarding indemnification should be sent in accordance with the notification provisions contained in Your Registrar's Domain Name Registration Agreement.

\r\n

f. Term of Agreement; Survival

\r\n

The terms of this Agreement shall continue in full force and effect as long as DBP is the Registrant for any domain name on Your behalf. Sections 5 (Communications Forwarding), 6 (Limitation of Liability), 7 (Indemnity), 8 (Warranty Disclaimer) and 10 (Miscellaneous Provisions) shall survive any termination or expiration of this Agreement.

\n
\n
\n\nRevised: 10/25/17
\nCopyright © 2003-2017 All Rights Reserved.\n
\n
\n
"), - // Title: to.Ptr("Domain Name Proxy Agreement"), - // URL: to.Ptr("http://www.secureserver.net/agreements/ShowDoc.aspx?pageid=domain_nameproxy&pl_id=510456"), - // }}, - // } - } -} diff --git a/sdk/resourcemanager/appservice/armappservice/webapps_client.go b/sdk/resourcemanager/appservice/armappservice/webapps_client.go index def45367e759..6efc243e5081 100644 --- a/sdk/resourcemanager/appservice/armappservice/webapps_client.go +++ b/sdk/resourcemanager/appservice/armappservice/webapps_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappservice @@ -34,7 +33,7 @@ type WebAppsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWebAppsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WebAppsClient, error) { - cl, err := arm.NewClient(moduleName+".WebAppsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,25 +47,32 @@ func NewWebAppsClient(subscriptionID string, credential azcore.TokenCredential, // AddPremierAddOn - Description for Updates a named add-on of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - premierAddOnName - Add-on name. // - premierAddOn - A JSON representation of the edited premier add-on. // - options - WebAppsClientAddPremierAddOnOptions contains the optional parameters for the WebAppsClient.AddPremierAddOn method. func (client *WebAppsClient) AddPremierAddOn(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, premierAddOn PremierAddOn, options *WebAppsClientAddPremierAddOnOptions) (WebAppsClientAddPremierAddOnResponse, error) { + var err error + const operationName = "WebAppsClient.AddPremierAddOn" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.addPremierAddOnCreateRequest(ctx, resourceGroupName, name, premierAddOnName, premierAddOn, options) if err != nil { return WebAppsClientAddPremierAddOnResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientAddPremierAddOnResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientAddPremierAddOnResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientAddPremierAddOnResponse{}, err } - return client.addPremierAddOnHandleResponse(resp) + resp, err := client.addPremierAddOnHandleResponse(httpResp) + return resp, err } // addPremierAddOnCreateRequest creates the AddPremierAddOn request. @@ -93,10 +99,13 @@ func (client *WebAppsClient) addPremierAddOnCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, premierAddOn) + if err := runtime.MarshalAsJSON(req, premierAddOn); err != nil { + return nil, err + } + return req, nil } // addPremierAddOnHandleResponse handles the AddPremierAddOn response. @@ -111,7 +120,7 @@ func (client *WebAppsClient) addPremierAddOnHandleResponse(resp *http.Response) // AddPremierAddOnSlot - Description for Updates a named add-on of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - premierAddOnName - Add-on name. @@ -121,18 +130,25 @@ func (client *WebAppsClient) addPremierAddOnHandleResponse(resp *http.Response) // - options - WebAppsClientAddPremierAddOnSlotOptions contains the optional parameters for the WebAppsClient.AddPremierAddOnSlot // method. func (client *WebAppsClient) AddPremierAddOnSlot(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string, premierAddOn PremierAddOn, options *WebAppsClientAddPremierAddOnSlotOptions) (WebAppsClientAddPremierAddOnSlotResponse, error) { + var err error + const operationName = "WebAppsClient.AddPremierAddOnSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.addPremierAddOnSlotCreateRequest(ctx, resourceGroupName, name, premierAddOnName, slot, premierAddOn, options) if err != nil { return WebAppsClientAddPremierAddOnSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientAddPremierAddOnSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientAddPremierAddOnSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientAddPremierAddOnSlotResponse{}, err } - return client.addPremierAddOnSlotHandleResponse(resp) + resp, err := client.addPremierAddOnSlotHandleResponse(httpResp) + return resp, err } // addPremierAddOnSlotCreateRequest creates the AddPremierAddOnSlot request. @@ -163,10 +179,13 @@ func (client *WebAppsClient) addPremierAddOnSlotCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, premierAddOn) + if err := runtime.MarshalAsJSON(req, premierAddOn); err != nil { + return nil, err + } + return req, nil } // addPremierAddOnSlotHandleResponse handles the AddPremierAddOnSlot response. @@ -181,24 +200,31 @@ func (client *WebAppsClient) addPremierAddOnSlotHandleResponse(resp *http.Respon // AnalyzeCustomHostname - Description for Analyze a custom hostname. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - options - WebAppsClientAnalyzeCustomHostnameOptions contains the optional parameters for the WebAppsClient.AnalyzeCustomHostname // method. func (client *WebAppsClient) AnalyzeCustomHostname(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientAnalyzeCustomHostnameOptions) (WebAppsClientAnalyzeCustomHostnameResponse, error) { + var err error + const operationName = "WebAppsClient.AnalyzeCustomHostname" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.analyzeCustomHostnameCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientAnalyzeCustomHostnameResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientAnalyzeCustomHostnameResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientAnalyzeCustomHostnameResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientAnalyzeCustomHostnameResponse{}, err } - return client.analyzeCustomHostnameHandleResponse(resp) + resp, err := client.analyzeCustomHostnameHandleResponse(httpResp) + return resp, err } // analyzeCustomHostnameCreateRequest creates the AnalyzeCustomHostname request. @@ -224,7 +250,7 @@ func (client *WebAppsClient) analyzeCustomHostnameCreateRequest(ctx context.Cont if options != nil && options.HostName != nil { reqQP.Set("hostName", *options.HostName) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -242,25 +268,32 @@ func (client *WebAppsClient) analyzeCustomHostnameHandleResponse(resp *http.Resp // AnalyzeCustomHostnameSlot - Description for Analyze a custom hostname. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - slot - Name of web app slot. If not specified then will default to production slot. // - options - WebAppsClientAnalyzeCustomHostnameSlotOptions contains the optional parameters for the WebAppsClient.AnalyzeCustomHostnameSlot // method. func (client *WebAppsClient) AnalyzeCustomHostnameSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientAnalyzeCustomHostnameSlotOptions) (WebAppsClientAnalyzeCustomHostnameSlotResponse, error) { + var err error + const operationName = "WebAppsClient.AnalyzeCustomHostnameSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.analyzeCustomHostnameSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientAnalyzeCustomHostnameSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientAnalyzeCustomHostnameSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientAnalyzeCustomHostnameSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientAnalyzeCustomHostnameSlotResponse{}, err } - return client.analyzeCustomHostnameSlotHandleResponse(resp) + resp, err := client.analyzeCustomHostnameSlotHandleResponse(httpResp) + return resp, err } // analyzeCustomHostnameSlotCreateRequest creates the AnalyzeCustomHostnameSlot request. @@ -290,7 +323,7 @@ func (client *WebAppsClient) analyzeCustomHostnameSlotCreateRequest(ctx context. if options != nil && options.HostName != nil { reqQP.Set("hostName", *options.HostName) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -309,23 +342,29 @@ func (client *WebAppsClient) analyzeCustomHostnameSlotHandleResponse(resp *http. // slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slotSwapEntity - JSON object that contains the target slot name. See example. // - options - WebAppsClientApplySlotConfigToProductionOptions contains the optional parameters for the WebAppsClient.ApplySlotConfigToProduction // method. func (client *WebAppsClient) ApplySlotConfigToProduction(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, options *WebAppsClientApplySlotConfigToProductionOptions) (WebAppsClientApplySlotConfigToProductionResponse, error) { + var err error + const operationName = "WebAppsClient.ApplySlotConfigToProduction" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.applySlotConfigToProductionCreateRequest(ctx, resourceGroupName, name, slotSwapEntity, options) if err != nil { return WebAppsClientApplySlotConfigToProductionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientApplySlotConfigToProductionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientApplySlotConfigToProductionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientApplySlotConfigToProductionResponse{}, err } return WebAppsClientApplySlotConfigToProductionResponse{}, nil } @@ -350,16 +389,19 @@ func (client *WebAppsClient) applySlotConfigToProductionCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, slotSwapEntity) + if err := runtime.MarshalAsJSON(req, slotSwapEntity); err != nil { + return nil, err + } + return req, nil } // ApplySlotConfigurationSlot - Description for Applies the configuration settings from the target slot onto the current slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the source slot. If a slot is not specified, the production slot is used as the source slot. @@ -367,16 +409,22 @@ func (client *WebAppsClient) applySlotConfigToProductionCreateRequest(ctx contex // - options - WebAppsClientApplySlotConfigurationSlotOptions contains the optional parameters for the WebAppsClient.ApplySlotConfigurationSlot // method. func (client *WebAppsClient) ApplySlotConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string, slotSwapEntity CsmSlotEntity, options *WebAppsClientApplySlotConfigurationSlotOptions) (WebAppsClientApplySlotConfigurationSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ApplySlotConfigurationSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.applySlotConfigurationSlotCreateRequest(ctx, resourceGroupName, name, slot, slotSwapEntity, options) if err != nil { return WebAppsClientApplySlotConfigurationSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientApplySlotConfigurationSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientApplySlotConfigurationSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientApplySlotConfigurationSlotResponse{}, err } return WebAppsClientApplySlotConfigurationSlotResponse{}, nil } @@ -405,16 +453,19 @@ func (client *WebAppsClient) applySlotConfigurationSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, slotSwapEntity) + if err := runtime.MarshalAsJSON(req, slotSwapEntity); err != nil { + return nil, err + } + return req, nil } // BeginApproveOrRejectPrivateEndpointConnection - Description for Approves or rejects a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the site. // - options - WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionOptions contains the optional parameters for the WebAppsClient.BeginApproveOrRejectPrivateEndpointConnection @@ -425,29 +476,40 @@ func (client *WebAppsClient) BeginApproveOrRejectPrivateEndpointConnection(ctx c if err != nil { return nil, err } - return runtime.NewPoller[WebAppsClientApproveOrRejectPrivateEndpointConnectionResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientApproveOrRejectPrivateEndpointConnectionResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WebAppsClientApproveOrRejectPrivateEndpointConnectionResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientApproveOrRejectPrivateEndpointConnectionResponse]{ + Tracer: client.internal.Tracer(), + }) } } // ApproveOrRejectPrivateEndpointConnection - Description for Approves or rejects a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *WebAppsClient) approveOrRejectPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper PrivateLinkConnectionApprovalRequestResource, options *WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginApproveOrRejectPrivateEndpointConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.approveOrRejectPrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // approveOrRejectPrivateEndpointConnectionCreateRequest creates the ApproveOrRejectPrivateEndpointConnection request. @@ -474,16 +536,19 @@ func (client *WebAppsClient) approveOrRejectPrivateEndpointConnectionCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, privateEndpointWrapper) + if err := runtime.MarshalAsJSON(req, privateEndpointWrapper); err != nil { + return nil, err + } + return req, nil } // BeginApproveOrRejectPrivateEndpointConnectionSlot - Description for Approves or rejects a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the site. // - options - WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionSlotOptions contains the optional parameters for the @@ -494,29 +559,40 @@ func (client *WebAppsClient) BeginApproveOrRejectPrivateEndpointConnectionSlot(c if err != nil { return nil, err } - return runtime.NewPoller[WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientApproveOrRejectPrivateEndpointConnectionSlotResponse]{ + Tracer: client.internal.Tracer(), + }) } } // ApproveOrRejectPrivateEndpointConnectionSlot - Description for Approves or rejects a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *WebAppsClient) approveOrRejectPrivateEndpointConnectionSlot(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, slot string, privateEndpointWrapper PrivateLinkConnectionApprovalRequestResource, options *WebAppsClientBeginApproveOrRejectPrivateEndpointConnectionSlotOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginApproveOrRejectPrivateEndpointConnectionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.approveOrRejectPrivateEndpointConnectionSlotCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, slot, privateEndpointWrapper, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // approveOrRejectPrivateEndpointConnectionSlotCreateRequest creates the ApproveOrRejectPrivateEndpointConnectionSlot request. @@ -547,33 +623,43 @@ func (client *WebAppsClient) approveOrRejectPrivateEndpointConnectionSlotCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, privateEndpointWrapper) + if err := runtime.MarshalAsJSON(req, privateEndpointWrapper); err != nil { + return nil, err + } + return req, nil } // Backup - Description for Creates a backup of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - request - Backup configuration. You can use the JSON response from the POST action as input here. // - options - WebAppsClientBackupOptions contains the optional parameters for the WebAppsClient.Backup method. func (client *WebAppsClient) Backup(ctx context.Context, resourceGroupName string, name string, request BackupRequest, options *WebAppsClientBackupOptions) (WebAppsClientBackupResponse, error) { + var err error + const operationName = "WebAppsClient.Backup" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.backupCreateRequest(ctx, resourceGroupName, name, request, options) if err != nil { return WebAppsClientBackupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientBackupResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientBackupResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientBackupResponse{}, err } - return client.backupHandleResponse(resp) + resp, err := client.backupHandleResponse(httpResp) + return resp, err } // backupCreateRequest creates the Backup request. @@ -596,10 +682,13 @@ func (client *WebAppsClient) backupCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, request) + if err := runtime.MarshalAsJSON(req, request); err != nil { + return nil, err + } + return req, nil } // backupHandleResponse handles the Backup response. @@ -614,25 +703,32 @@ func (client *WebAppsClient) backupHandleResponse(resp *http.Response) (WebAppsC // BackupSlot - Description for Creates a backup of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will create a backup for the production slot. // - request - Backup configuration. You can use the JSON response from the POST action as input here. // - options - WebAppsClientBackupSlotOptions contains the optional parameters for the WebAppsClient.BackupSlot method. func (client *WebAppsClient) BackupSlot(ctx context.Context, resourceGroupName string, name string, slot string, request BackupRequest, options *WebAppsClientBackupSlotOptions) (WebAppsClientBackupSlotResponse, error) { + var err error + const operationName = "WebAppsClient.BackupSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.backupSlotCreateRequest(ctx, resourceGroupName, name, slot, request, options) if err != nil { return WebAppsClientBackupSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientBackupSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientBackupSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientBackupSlotResponse{}, err } - return client.backupSlotHandleResponse(resp) + resp, err := client.backupSlotHandleResponse(httpResp) + return resp, err } // backupSlotCreateRequest creates the BackupSlot request. @@ -659,10 +755,13 @@ func (client *WebAppsClient) backupSlotCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, request) + if err := runtime.MarshalAsJSON(req, request); err != nil { + return nil, err + } + return req, nil } // backupSlotHandleResponse handles the BackupSlot response. @@ -677,7 +776,7 @@ func (client *WebAppsClient) backupSlotHandleResponse(resp *http.Response) (WebA // CreateDeployment - Description for Create a deployment for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - id - ID of an existing deployment. @@ -685,18 +784,25 @@ func (client *WebAppsClient) backupSlotHandleResponse(resp *http.Response) (WebA // - options - WebAppsClientCreateDeploymentOptions contains the optional parameters for the WebAppsClient.CreateDeployment // method. func (client *WebAppsClient) CreateDeployment(ctx context.Context, resourceGroupName string, name string, id string, deployment Deployment, options *WebAppsClientCreateDeploymentOptions) (WebAppsClientCreateDeploymentResponse, error) { + var err error + const operationName = "WebAppsClient.CreateDeployment" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createDeploymentCreateRequest(ctx, resourceGroupName, name, id, deployment, options) if err != nil { return WebAppsClientCreateDeploymentResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientCreateDeploymentResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateDeploymentResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateDeploymentResponse{}, err } - return client.createDeploymentHandleResponse(resp) + resp, err := client.createDeploymentHandleResponse(httpResp) + return resp, err } // createDeploymentCreateRequest creates the CreateDeployment request. @@ -723,10 +829,13 @@ func (client *WebAppsClient) createDeploymentCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, deployment) + if err := runtime.MarshalAsJSON(req, deployment); err != nil { + return nil, err + } + return req, nil } // createDeploymentHandleResponse handles the CreateDeployment response. @@ -741,7 +850,7 @@ func (client *WebAppsClient) createDeploymentHandleResponse(resp *http.Response) // CreateDeploymentSlot - Description for Create a deployment for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - id - ID of an existing deployment. @@ -750,18 +859,25 @@ func (client *WebAppsClient) createDeploymentHandleResponse(resp *http.Response) // - options - WebAppsClientCreateDeploymentSlotOptions contains the optional parameters for the WebAppsClient.CreateDeploymentSlot // method. func (client *WebAppsClient) CreateDeploymentSlot(ctx context.Context, resourceGroupName string, name string, id string, slot string, deployment Deployment, options *WebAppsClientCreateDeploymentSlotOptions) (WebAppsClientCreateDeploymentSlotResponse, error) { + var err error + const operationName = "WebAppsClient.CreateDeploymentSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createDeploymentSlotCreateRequest(ctx, resourceGroupName, name, id, slot, deployment, options) if err != nil { return WebAppsClientCreateDeploymentSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientCreateDeploymentSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateDeploymentSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateDeploymentSlotResponse{}, err } - return client.createDeploymentSlotHandleResponse(resp) + resp, err := client.createDeploymentSlotHandleResponse(httpResp) + return resp, err } // createDeploymentSlotCreateRequest creates the CreateDeploymentSlot request. @@ -792,10 +908,13 @@ func (client *WebAppsClient) createDeploymentSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, deployment) + if err := runtime.MarshalAsJSON(req, deployment); err != nil { + return nil, err + } + return req, nil } // createDeploymentSlotHandleResponse handles the CreateDeploymentSlot response. @@ -810,7 +929,7 @@ func (client *WebAppsClient) createDeploymentSlotHandleResponse(resp *http.Respo // BeginCreateFunction - Description for Create function for web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - functionName - Function name. @@ -823,29 +942,40 @@ func (client *WebAppsClient) BeginCreateFunction(ctx context.Context, resourceGr if err != nil { return nil, err } - return runtime.NewPoller[WebAppsClientCreateFunctionResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientCreateFunctionResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WebAppsClientCreateFunctionResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientCreateFunctionResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateFunction - Description for Create function for web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *WebAppsClient) createFunction(ctx context.Context, resourceGroupName string, name string, functionName string, functionEnvelope FunctionEnvelope, options *WebAppsClientBeginCreateFunctionOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginCreateFunction" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createFunctionCreateRequest(ctx, resourceGroupName, name, functionName, functionEnvelope, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createFunctionCreateRequest creates the CreateFunction request. @@ -872,16 +1002,19 @@ func (client *WebAppsClient) createFunctionCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, functionEnvelope) + if err := runtime.MarshalAsJSON(req, functionEnvelope); err != nil { + return nil, err + } + return req, nil } // BeginCreateInstanceFunctionSlot - Description for Create function for web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - functionName - Function name. @@ -895,29 +1028,40 @@ func (client *WebAppsClient) BeginCreateInstanceFunctionSlot(ctx context.Context if err != nil { return nil, err } - return runtime.NewPoller[WebAppsClientCreateInstanceFunctionSlotResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientCreateInstanceFunctionSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WebAppsClientCreateInstanceFunctionSlotResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientCreateInstanceFunctionSlotResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateInstanceFunctionSlot - Description for Create function for web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *WebAppsClient) createInstanceFunctionSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, functionEnvelope FunctionEnvelope, options *WebAppsClientBeginCreateInstanceFunctionSlotOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginCreateInstanceFunctionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createInstanceFunctionSlotCreateRequest(ctx, resourceGroupName, name, functionName, slot, functionEnvelope, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createInstanceFunctionSlotCreateRequest creates the CreateInstanceFunctionSlot request. @@ -948,16 +1092,19 @@ func (client *WebAppsClient) createInstanceFunctionSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, functionEnvelope) + if err := runtime.MarshalAsJSON(req, functionEnvelope); err != nil { + return nil, err + } + return req, nil } // BeginCreateInstanceMSDeployOperation - Description for Invoke the MSDeploy web app extension. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - instanceID - ID of web app instance. @@ -970,29 +1117,40 @@ func (client *WebAppsClient) BeginCreateInstanceMSDeployOperation(ctx context.Co if err != nil { return nil, err } - return runtime.NewPoller[WebAppsClientCreateInstanceMSDeployOperationResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientCreateInstanceMSDeployOperationResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WebAppsClientCreateInstanceMSDeployOperationResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientCreateInstanceMSDeployOperationResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateInstanceMSDeployOperation - Description for Invoke the MSDeploy web app extension. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *WebAppsClient) createInstanceMSDeployOperation(ctx context.Context, resourceGroupName string, name string, instanceID string, msDeploy MSDeploy, options *WebAppsClientBeginCreateInstanceMSDeployOperationOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginCreateInstanceMSDeployOperation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createInstanceMSDeployOperationCreateRequest(ctx, resourceGroupName, name, instanceID, msDeploy, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createInstanceMSDeployOperationCreateRequest creates the CreateInstanceMSDeployOperation request. @@ -1019,16 +1177,19 @@ func (client *WebAppsClient) createInstanceMSDeployOperationCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, msDeploy) + if err := runtime.MarshalAsJSON(req, msDeploy); err != nil { + return nil, err + } + return req, nil } // BeginCreateInstanceMSDeployOperationSlot - Description for Invoke the MSDeploy web app extension. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - slot - Name of web app slot. If not specified then will default to production slot. @@ -1042,29 +1203,40 @@ func (client *WebAppsClient) BeginCreateInstanceMSDeployOperationSlot(ctx contex if err != nil { return nil, err } - return runtime.NewPoller[WebAppsClientCreateInstanceMSDeployOperationSlotResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientCreateInstanceMSDeployOperationSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WebAppsClientCreateInstanceMSDeployOperationSlotResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientCreateInstanceMSDeployOperationSlotResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateInstanceMSDeployOperationSlot - Description for Invoke the MSDeploy web app extension. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *WebAppsClient) createInstanceMSDeployOperationSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string, msDeploy MSDeploy, options *WebAppsClientBeginCreateInstanceMSDeployOperationSlotOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginCreateInstanceMSDeployOperationSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createInstanceMSDeployOperationSlotCreateRequest(ctx, resourceGroupName, name, slot, instanceID, msDeploy, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createInstanceMSDeployOperationSlotCreateRequest creates the CreateInstanceMSDeployOperationSlot request. @@ -1095,16 +1267,19 @@ func (client *WebAppsClient) createInstanceMSDeployOperationSlotCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, msDeploy) + if err := runtime.MarshalAsJSON(req, msDeploy); err != nil { + return nil, err + } + return req, nil } // BeginCreateMSDeployOperation - Description for Invoke the MSDeploy web app extension. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - msDeploy - Details of MSDeploy operation @@ -1116,29 +1291,40 @@ func (client *WebAppsClient) BeginCreateMSDeployOperation(ctx context.Context, r if err != nil { return nil, err } - return runtime.NewPoller[WebAppsClientCreateMSDeployOperationResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientCreateMSDeployOperationResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WebAppsClientCreateMSDeployOperationResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientCreateMSDeployOperationResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateMSDeployOperation - Description for Invoke the MSDeploy web app extension. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *WebAppsClient) createMSDeployOperation(ctx context.Context, resourceGroupName string, name string, msDeploy MSDeploy, options *WebAppsClientBeginCreateMSDeployOperationOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginCreateMSDeployOperation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createMSDeployOperationCreateRequest(ctx, resourceGroupName, name, msDeploy, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createMSDeployOperationCreateRequest creates the CreateMSDeployOperation request. @@ -1161,16 +1347,19 @@ func (client *WebAppsClient) createMSDeployOperationCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, msDeploy) + if err := runtime.MarshalAsJSON(req, msDeploy); err != nil { + return nil, err + } + return req, nil } // BeginCreateMSDeployOperationSlot - Description for Invoke the MSDeploy web app extension. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - slot - Name of web app slot. If not specified then will default to production slot. @@ -1183,29 +1372,40 @@ func (client *WebAppsClient) BeginCreateMSDeployOperationSlot(ctx context.Contex if err != nil { return nil, err } - return runtime.NewPoller[WebAppsClientCreateMSDeployOperationSlotResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientCreateMSDeployOperationSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WebAppsClientCreateMSDeployOperationSlotResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientCreateMSDeployOperationSlotResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateMSDeployOperationSlot - Description for Invoke the MSDeploy web app extension. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *WebAppsClient) createMSDeployOperationSlot(ctx context.Context, resourceGroupName string, name string, slot string, msDeploy MSDeploy, options *WebAppsClientBeginCreateMSDeployOperationSlotOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginCreateMSDeployOperationSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createMSDeployOperationSlotCreateRequest(ctx, resourceGroupName, name, slot, msDeploy, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createMSDeployOperationSlotCreateRequest creates the CreateMSDeployOperationSlot request. @@ -1232,33 +1432,43 @@ func (client *WebAppsClient) createMSDeployOperationSlotCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, msDeploy) + if err := runtime.MarshalAsJSON(req, msDeploy); err != nil { + return nil, err + } + return req, nil } // CreateOneDeployOperation - Description for Invoke the OneDeploy publish web app extension. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - options - WebAppsClientCreateOneDeployOperationOptions contains the optional parameters for the WebAppsClient.CreateOneDeployOperation // method. func (client *WebAppsClient) CreateOneDeployOperation(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientCreateOneDeployOperationOptions) (WebAppsClientCreateOneDeployOperationResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOneDeployOperation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOneDeployOperationCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientCreateOneDeployOperationResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientCreateOneDeployOperationResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateOneDeployOperationResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOneDeployOperationResponse{}, err } - return client.createOneDeployOperationHandleResponse(resp) + resp, err := client.createOneDeployOperationHandleResponse(httpResp) + return resp, err } // createOneDeployOperationCreateRequest creates the CreateOneDeployOperation request. @@ -1281,7 +1491,7 @@ func (client *WebAppsClient) createOneDeployOperationCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1300,7 +1510,7 @@ func (client *WebAppsClient) createOneDeployOperationHandleResponse(resp *http.R // existing app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. // - siteEnvelope - A JSON representation of the app properties. See example. @@ -1312,9 +1522,14 @@ func (client *WebAppsClient) BeginCreateOrUpdate(ctx context.Context, resourceGr if err != nil { return nil, err } - return runtime.NewPoller[WebAppsClientCreateOrUpdateResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WebAppsClientCreateOrUpdateResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientCreateOrUpdateResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -1322,20 +1537,26 @@ func (client *WebAppsClient) BeginCreateOrUpdate(ctx context.Context, resourceGr // app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *WebAppsClient) createOrUpdate(ctx context.Context, resourceGroupName string, name string, siteEnvelope Site, options *WebAppsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginCreateOrUpdate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, name, siteEnvelope, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -1358,34 +1579,44 @@ func (client *WebAppsClient) createOrUpdateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, siteEnvelope) + if err := runtime.MarshalAsJSON(req, siteEnvelope); err != nil { + return nil, err + } + return req, nil } // CreateOrUpdateConfiguration - Description for Updates the configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - siteConfig - JSON representation of a SiteConfig object. See example. // - options - WebAppsClientCreateOrUpdateConfigurationOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateConfiguration // method. func (client *WebAppsClient) CreateOrUpdateConfiguration(ctx context.Context, resourceGroupName string, name string, siteConfig SiteConfigResource, options *WebAppsClientCreateOrUpdateConfigurationOptions) (WebAppsClientCreateOrUpdateConfigurationResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateConfiguration" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateConfigurationCreateRequest(ctx, resourceGroupName, name, siteConfig, options) if err != nil { return WebAppsClientCreateOrUpdateConfigurationResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientCreateOrUpdateConfigurationResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateOrUpdateConfigurationResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateConfigurationResponse{}, err } - return client.createOrUpdateConfigurationHandleResponse(resp) + resp, err := client.createOrUpdateConfigurationHandleResponse(httpResp) + return resp, err } // createOrUpdateConfigurationCreateRequest creates the CreateOrUpdateConfiguration request. @@ -1408,10 +1639,13 @@ func (client *WebAppsClient) createOrUpdateConfigurationCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, siteConfig) + if err := runtime.MarshalAsJSON(req, siteConfig); err != nil { + return nil, err + } + return req, nil } // createOrUpdateConfigurationHandleResponse handles the CreateOrUpdateConfiguration response. @@ -1426,7 +1660,7 @@ func (client *WebAppsClient) createOrUpdateConfigurationHandleResponse(resp *htt // CreateOrUpdateConfigurationSlot - Description for Updates the configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will update configuration for the production slot. @@ -1434,18 +1668,25 @@ func (client *WebAppsClient) createOrUpdateConfigurationHandleResponse(resp *htt // - options - WebAppsClientCreateOrUpdateConfigurationSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateConfigurationSlot // method. func (client *WebAppsClient) CreateOrUpdateConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string, siteConfig SiteConfigResource, options *WebAppsClientCreateOrUpdateConfigurationSlotOptions) (WebAppsClientCreateOrUpdateConfigurationSlotResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateConfigurationSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateConfigurationSlotCreateRequest(ctx, resourceGroupName, name, slot, siteConfig, options) if err != nil { return WebAppsClientCreateOrUpdateConfigurationSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientCreateOrUpdateConfigurationSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateOrUpdateConfigurationSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateConfigurationSlotResponse{}, err } - return client.createOrUpdateConfigurationSlotHandleResponse(resp) + resp, err := client.createOrUpdateConfigurationSlotHandleResponse(httpResp) + return resp, err } // createOrUpdateConfigurationSlotCreateRequest creates the CreateOrUpdateConfigurationSlot request. @@ -1472,10 +1713,13 @@ func (client *WebAppsClient) createOrUpdateConfigurationSlotCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, siteConfig) + if err := runtime.MarshalAsJSON(req, siteConfig); err != nil { + return nil, err + } + return req, nil } // createOrUpdateConfigurationSlotHandleResponse handles the CreateOrUpdateConfigurationSlot response. @@ -1491,7 +1735,7 @@ func (client *WebAppsClient) createOrUpdateConfigurationSlotHandleResponse(resp // an existing ownership identifier. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - domainOwnershipIdentifierName - Name of domain ownership identifier. @@ -1499,18 +1743,25 @@ func (client *WebAppsClient) createOrUpdateConfigurationSlotHandleResponse(resp // - options - WebAppsClientCreateOrUpdateDomainOwnershipIdentifierOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateDomainOwnershipIdentifier // method. func (client *WebAppsClient) CreateOrUpdateDomainOwnershipIdentifier(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier Identifier, options *WebAppsClientCreateOrUpdateDomainOwnershipIdentifierOptions) (WebAppsClientCreateOrUpdateDomainOwnershipIdentifierResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateDomainOwnershipIdentifier" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateDomainOwnershipIdentifierCreateRequest(ctx, resourceGroupName, name, domainOwnershipIdentifierName, domainOwnershipIdentifier, options) if err != nil { return WebAppsClientCreateOrUpdateDomainOwnershipIdentifierResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientCreateOrUpdateDomainOwnershipIdentifierResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateOrUpdateDomainOwnershipIdentifierResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateDomainOwnershipIdentifierResponse{}, err } - return client.createOrUpdateDomainOwnershipIdentifierHandleResponse(resp) + resp, err := client.createOrUpdateDomainOwnershipIdentifierHandleResponse(httpResp) + return resp, err } // createOrUpdateDomainOwnershipIdentifierCreateRequest creates the CreateOrUpdateDomainOwnershipIdentifier request. @@ -1537,10 +1788,13 @@ func (client *WebAppsClient) createOrUpdateDomainOwnershipIdentifierCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, domainOwnershipIdentifier) + if err := runtime.MarshalAsJSON(req, domainOwnershipIdentifier); err != nil { + return nil, err + } + return req, nil } // createOrUpdateDomainOwnershipIdentifierHandleResponse handles the CreateOrUpdateDomainOwnershipIdentifier response. @@ -1556,7 +1810,7 @@ func (client *WebAppsClient) createOrUpdateDomainOwnershipIdentifierHandleRespon // an existing ownership identifier. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - domainOwnershipIdentifierName - Name of domain ownership identifier. @@ -1565,18 +1819,25 @@ func (client *WebAppsClient) createOrUpdateDomainOwnershipIdentifierHandleRespon // - options - WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateDomainOwnershipIdentifierSlot // method. func (client *WebAppsClient) CreateOrUpdateDomainOwnershipIdentifierSlot(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string, domainOwnershipIdentifier Identifier, options *WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotOptions) (WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateDomainOwnershipIdentifierSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateDomainOwnershipIdentifierSlotCreateRequest(ctx, resourceGroupName, name, domainOwnershipIdentifierName, slot, domainOwnershipIdentifier, options) if err != nil { return WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateDomainOwnershipIdentifierSlotResponse{}, err } - return client.createOrUpdateDomainOwnershipIdentifierSlotHandleResponse(resp) + resp, err := client.createOrUpdateDomainOwnershipIdentifierSlotHandleResponse(httpResp) + return resp, err } // createOrUpdateDomainOwnershipIdentifierSlotCreateRequest creates the CreateOrUpdateDomainOwnershipIdentifierSlot request. @@ -1607,10 +1868,13 @@ func (client *WebAppsClient) createOrUpdateDomainOwnershipIdentifierSlotCreateRe return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, domainOwnershipIdentifier) + if err := runtime.MarshalAsJSON(req, domainOwnershipIdentifier); err != nil { + return nil, err + } + return req, nil } // createOrUpdateDomainOwnershipIdentifierSlotHandleResponse handles the CreateOrUpdateDomainOwnershipIdentifierSlot response. @@ -1625,7 +1889,7 @@ func (client *WebAppsClient) createOrUpdateDomainOwnershipIdentifierSlotHandleRe // CreateOrUpdateFunctionSecret - Description for Add or update a function secret. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - functionName - The name of the function. @@ -1634,18 +1898,25 @@ func (client *WebAppsClient) createOrUpdateDomainOwnershipIdentifierSlotHandleRe // - options - WebAppsClientCreateOrUpdateFunctionSecretOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateFunctionSecret // method. func (client *WebAppsClient) CreateOrUpdateFunctionSecret(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, key KeyInfo, options *WebAppsClientCreateOrUpdateFunctionSecretOptions) (WebAppsClientCreateOrUpdateFunctionSecretResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateFunctionSecret" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateFunctionSecretCreateRequest(ctx, resourceGroupName, name, functionName, keyName, key, options) if err != nil { return WebAppsClientCreateOrUpdateFunctionSecretResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientCreateOrUpdateFunctionSecretResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return WebAppsClientCreateOrUpdateFunctionSecretResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateFunctionSecretResponse{}, err } - return client.createOrUpdateFunctionSecretHandleResponse(resp) + resp, err := client.createOrUpdateFunctionSecretHandleResponse(httpResp) + return resp, err } // createOrUpdateFunctionSecretCreateRequest creates the CreateOrUpdateFunctionSecret request. @@ -1676,10 +1947,13 @@ func (client *WebAppsClient) createOrUpdateFunctionSecretCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, key) + if err := runtime.MarshalAsJSON(req, key); err != nil { + return nil, err + } + return req, nil } // createOrUpdateFunctionSecretHandleResponse handles the CreateOrUpdateFunctionSecret response. @@ -1694,7 +1968,7 @@ func (client *WebAppsClient) createOrUpdateFunctionSecretHandleResponse(resp *ht // CreateOrUpdateFunctionSecretSlot - Description for Add or update a function secret. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - functionName - The name of the function. @@ -1704,18 +1978,25 @@ func (client *WebAppsClient) createOrUpdateFunctionSecretHandleResponse(resp *ht // - options - WebAppsClientCreateOrUpdateFunctionSecretSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateFunctionSecretSlot // method. func (client *WebAppsClient) CreateOrUpdateFunctionSecretSlot(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, slot string, key KeyInfo, options *WebAppsClientCreateOrUpdateFunctionSecretSlotOptions) (WebAppsClientCreateOrUpdateFunctionSecretSlotResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateFunctionSecretSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateFunctionSecretSlotCreateRequest(ctx, resourceGroupName, name, functionName, keyName, slot, key, options) if err != nil { return WebAppsClientCreateOrUpdateFunctionSecretSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientCreateOrUpdateFunctionSecretSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return WebAppsClientCreateOrUpdateFunctionSecretSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateFunctionSecretSlotResponse{}, err } - return client.createOrUpdateFunctionSecretSlotHandleResponse(resp) + resp, err := client.createOrUpdateFunctionSecretSlotHandleResponse(httpResp) + return resp, err } // createOrUpdateFunctionSecretSlotCreateRequest creates the CreateOrUpdateFunctionSecretSlot request. @@ -1750,10 +2031,13 @@ func (client *WebAppsClient) createOrUpdateFunctionSecretSlotCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, key) + if err := runtime.MarshalAsJSON(req, key); err != nil { + return nil, err + } + return req, nil } // createOrUpdateFunctionSecretSlotHandleResponse handles the CreateOrUpdateFunctionSecretSlot response. @@ -1768,7 +2052,7 @@ func (client *WebAppsClient) createOrUpdateFunctionSecretSlotHandleResponse(resp // CreateOrUpdateHostNameBinding - Description for Creates a hostname binding for an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - hostName - Hostname in the hostname binding. @@ -1776,18 +2060,25 @@ func (client *WebAppsClient) createOrUpdateFunctionSecretSlotHandleResponse(resp // - options - WebAppsClientCreateOrUpdateHostNameBindingOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHostNameBinding // method. func (client *WebAppsClient) CreateOrUpdateHostNameBinding(ctx context.Context, resourceGroupName string, name string, hostName string, hostNameBinding HostNameBinding, options *WebAppsClientCreateOrUpdateHostNameBindingOptions) (WebAppsClientCreateOrUpdateHostNameBindingResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateHostNameBinding" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateHostNameBindingCreateRequest(ctx, resourceGroupName, name, hostName, hostNameBinding, options) if err != nil { return WebAppsClientCreateOrUpdateHostNameBindingResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientCreateOrUpdateHostNameBindingResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateOrUpdateHostNameBindingResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateHostNameBindingResponse{}, err } - return client.createOrUpdateHostNameBindingHandleResponse(resp) + resp, err := client.createOrUpdateHostNameBindingHandleResponse(httpResp) + return resp, err } // createOrUpdateHostNameBindingCreateRequest creates the CreateOrUpdateHostNameBinding request. @@ -1814,10 +2105,13 @@ func (client *WebAppsClient) createOrUpdateHostNameBindingCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, hostNameBinding) + if err := runtime.MarshalAsJSON(req, hostNameBinding); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHostNameBindingHandleResponse handles the CreateOrUpdateHostNameBinding response. @@ -1832,7 +2126,7 @@ func (client *WebAppsClient) createOrUpdateHostNameBindingHandleResponse(resp *h // CreateOrUpdateHostNameBindingSlot - Description for Creates a hostname binding for an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - hostName - Hostname in the hostname binding. @@ -1841,18 +2135,25 @@ func (client *WebAppsClient) createOrUpdateHostNameBindingHandleResponse(resp *h // - options - WebAppsClientCreateOrUpdateHostNameBindingSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHostNameBindingSlot // method. func (client *WebAppsClient) CreateOrUpdateHostNameBindingSlot(ctx context.Context, resourceGroupName string, name string, hostName string, slot string, hostNameBinding HostNameBinding, options *WebAppsClientCreateOrUpdateHostNameBindingSlotOptions) (WebAppsClientCreateOrUpdateHostNameBindingSlotResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateHostNameBindingSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateHostNameBindingSlotCreateRequest(ctx, resourceGroupName, name, hostName, slot, hostNameBinding, options) if err != nil { return WebAppsClientCreateOrUpdateHostNameBindingSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientCreateOrUpdateHostNameBindingSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateOrUpdateHostNameBindingSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateHostNameBindingSlotResponse{}, err } - return client.createOrUpdateHostNameBindingSlotHandleResponse(resp) + resp, err := client.createOrUpdateHostNameBindingSlotHandleResponse(httpResp) + return resp, err } // createOrUpdateHostNameBindingSlotCreateRequest creates the CreateOrUpdateHostNameBindingSlot request. @@ -1883,10 +2184,13 @@ func (client *WebAppsClient) createOrUpdateHostNameBindingSlotCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, hostNameBinding) + if err := runtime.MarshalAsJSON(req, hostNameBinding); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHostNameBindingSlotHandleResponse handles the CreateOrUpdateHostNameBindingSlot response. @@ -1901,7 +2205,7 @@ func (client *WebAppsClient) createOrUpdateHostNameBindingSlotHandleResponse(res // CreateOrUpdateHostSecret - Description for Add or update a host level secret. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - keyType - The type of host key. @@ -1910,18 +2214,25 @@ func (client *WebAppsClient) createOrUpdateHostNameBindingSlotHandleResponse(res // - options - WebAppsClientCreateOrUpdateHostSecretOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHostSecret // method. func (client *WebAppsClient) CreateOrUpdateHostSecret(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, key KeyInfo, options *WebAppsClientCreateOrUpdateHostSecretOptions) (WebAppsClientCreateOrUpdateHostSecretResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateHostSecret" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateHostSecretCreateRequest(ctx, resourceGroupName, name, keyType, keyName, key, options) if err != nil { return WebAppsClientCreateOrUpdateHostSecretResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientCreateOrUpdateHostSecretResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return WebAppsClientCreateOrUpdateHostSecretResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateHostSecretResponse{}, err } - return client.createOrUpdateHostSecretHandleResponse(resp) + resp, err := client.createOrUpdateHostSecretHandleResponse(httpResp) + return resp, err } // createOrUpdateHostSecretCreateRequest creates the CreateOrUpdateHostSecret request. @@ -1952,10 +2263,13 @@ func (client *WebAppsClient) createOrUpdateHostSecretCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, key) + if err := runtime.MarshalAsJSON(req, key); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHostSecretHandleResponse handles the CreateOrUpdateHostSecret response. @@ -1970,7 +2284,7 @@ func (client *WebAppsClient) createOrUpdateHostSecretHandleResponse(resp *http.R // CreateOrUpdateHostSecretSlot - Description for Add or update a host level secret. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - keyType - The type of host key. @@ -1980,18 +2294,25 @@ func (client *WebAppsClient) createOrUpdateHostSecretHandleResponse(resp *http.R // - options - WebAppsClientCreateOrUpdateHostSecretSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHostSecretSlot // method. func (client *WebAppsClient) CreateOrUpdateHostSecretSlot(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, slot string, key KeyInfo, options *WebAppsClientCreateOrUpdateHostSecretSlotOptions) (WebAppsClientCreateOrUpdateHostSecretSlotResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateHostSecretSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateHostSecretSlotCreateRequest(ctx, resourceGroupName, name, keyType, keyName, slot, key, options) if err != nil { return WebAppsClientCreateOrUpdateHostSecretSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientCreateOrUpdateHostSecretSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return WebAppsClientCreateOrUpdateHostSecretSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateHostSecretSlotResponse{}, err } - return client.createOrUpdateHostSecretSlotHandleResponse(resp) + resp, err := client.createOrUpdateHostSecretSlotHandleResponse(httpResp) + return resp, err } // createOrUpdateHostSecretSlotCreateRequest creates the CreateOrUpdateHostSecretSlot request. @@ -2026,10 +2347,13 @@ func (client *WebAppsClient) createOrUpdateHostSecretSlotCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, key) + if err := runtime.MarshalAsJSON(req, key); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHostSecretSlotHandleResponse handles the CreateOrUpdateHostSecretSlot response. @@ -2044,7 +2368,7 @@ func (client *WebAppsClient) createOrUpdateHostSecretSlotHandleResponse(resp *ht // CreateOrUpdateHybridConnection - Description for Creates a new Hybrid Connection using a Service Bus relay. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - The name of the web app. // - namespaceName - The namespace for this hybrid connection. @@ -2053,18 +2377,25 @@ func (client *WebAppsClient) createOrUpdateHostSecretSlotHandleResponse(resp *ht // - options - WebAppsClientCreateOrUpdateHybridConnectionOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHybridConnection // method. func (client *WebAppsClient) CreateOrUpdateHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection, options *WebAppsClientCreateOrUpdateHybridConnectionOptions) (WebAppsClientCreateOrUpdateHybridConnectionResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateHybridConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateHybridConnectionCreateRequest(ctx, resourceGroupName, name, namespaceName, relayName, connectionEnvelope, options) if err != nil { return WebAppsClientCreateOrUpdateHybridConnectionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientCreateOrUpdateHybridConnectionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateOrUpdateHybridConnectionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateHybridConnectionResponse{}, err } - return client.createOrUpdateHybridConnectionHandleResponse(resp) + resp, err := client.createOrUpdateHybridConnectionHandleResponse(httpResp) + return resp, err } // createOrUpdateHybridConnectionCreateRequest creates the CreateOrUpdateHybridConnection request. @@ -2095,10 +2426,13 @@ func (client *WebAppsClient) createOrUpdateHybridConnectionCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHybridConnectionHandleResponse handles the CreateOrUpdateHybridConnection response. @@ -2113,7 +2447,7 @@ func (client *WebAppsClient) createOrUpdateHybridConnectionHandleResponse(resp * // CreateOrUpdateHybridConnectionSlot - Description for Creates a new Hybrid Connection using a Service Bus relay. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - The name of the web app. // - namespaceName - The namespace for this hybrid connection. @@ -2123,18 +2457,25 @@ func (client *WebAppsClient) createOrUpdateHybridConnectionHandleResponse(resp * // - options - WebAppsClientCreateOrUpdateHybridConnectionSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateHybridConnectionSlot // method. func (client *WebAppsClient) CreateOrUpdateHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string, connectionEnvelope HybridConnection, options *WebAppsClientCreateOrUpdateHybridConnectionSlotOptions) (WebAppsClientCreateOrUpdateHybridConnectionSlotResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateHybridConnectionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateHybridConnectionSlotCreateRequest(ctx, resourceGroupName, name, namespaceName, relayName, slot, connectionEnvelope, options) if err != nil { return WebAppsClientCreateOrUpdateHybridConnectionSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientCreateOrUpdateHybridConnectionSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateOrUpdateHybridConnectionSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateHybridConnectionSlotResponse{}, err } - return client.createOrUpdateHybridConnectionSlotHandleResponse(resp) + resp, err := client.createOrUpdateHybridConnectionSlotHandleResponse(httpResp) + return resp, err } // createOrUpdateHybridConnectionSlotCreateRequest creates the CreateOrUpdateHybridConnectionSlot request. @@ -2169,10 +2510,13 @@ func (client *WebAppsClient) createOrUpdateHybridConnectionSlotCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHybridConnectionSlotHandleResponse handles the CreateOrUpdateHybridConnectionSlot response. @@ -2187,7 +2531,7 @@ func (client *WebAppsClient) createOrUpdateHybridConnectionSlotHandleResponse(re // CreateOrUpdatePublicCertificate - Description for Creates a hostname binding for an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - publicCertificateName - Public certificate name. @@ -2195,18 +2539,25 @@ func (client *WebAppsClient) createOrUpdateHybridConnectionSlotHandleResponse(re // - options - WebAppsClientCreateOrUpdatePublicCertificateOptions contains the optional parameters for the WebAppsClient.CreateOrUpdatePublicCertificate // method. func (client *WebAppsClient) CreateOrUpdatePublicCertificate(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, publicCertificate PublicCertificate, options *WebAppsClientCreateOrUpdatePublicCertificateOptions) (WebAppsClientCreateOrUpdatePublicCertificateResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdatePublicCertificate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdatePublicCertificateCreateRequest(ctx, resourceGroupName, name, publicCertificateName, publicCertificate, options) if err != nil { return WebAppsClientCreateOrUpdatePublicCertificateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientCreateOrUpdatePublicCertificateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateOrUpdatePublicCertificateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdatePublicCertificateResponse{}, err } - return client.createOrUpdatePublicCertificateHandleResponse(resp) + resp, err := client.createOrUpdatePublicCertificateHandleResponse(httpResp) + return resp, err } // createOrUpdatePublicCertificateCreateRequest creates the CreateOrUpdatePublicCertificate request. @@ -2233,10 +2584,13 @@ func (client *WebAppsClient) createOrUpdatePublicCertificateCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, publicCertificate) + if err := runtime.MarshalAsJSON(req, publicCertificate); err != nil { + return nil, err + } + return req, nil } // createOrUpdatePublicCertificateHandleResponse handles the CreateOrUpdatePublicCertificate response. @@ -2251,7 +2605,7 @@ func (client *WebAppsClient) createOrUpdatePublicCertificateHandleResponse(resp // CreateOrUpdatePublicCertificateSlot - Description for Creates a hostname binding for an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - publicCertificateName - Public certificate name. @@ -2260,18 +2614,25 @@ func (client *WebAppsClient) createOrUpdatePublicCertificateHandleResponse(resp // - options - WebAppsClientCreateOrUpdatePublicCertificateSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdatePublicCertificateSlot // method. func (client *WebAppsClient) CreateOrUpdatePublicCertificateSlot(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, slot string, publicCertificate PublicCertificate, options *WebAppsClientCreateOrUpdatePublicCertificateSlotOptions) (WebAppsClientCreateOrUpdatePublicCertificateSlotResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdatePublicCertificateSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdatePublicCertificateSlotCreateRequest(ctx, resourceGroupName, name, publicCertificateName, slot, publicCertificate, options) if err != nil { return WebAppsClientCreateOrUpdatePublicCertificateSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientCreateOrUpdatePublicCertificateSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateOrUpdatePublicCertificateSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdatePublicCertificateSlotResponse{}, err } - return client.createOrUpdatePublicCertificateSlotHandleResponse(resp) + resp, err := client.createOrUpdatePublicCertificateSlotHandleResponse(httpResp) + return resp, err } // createOrUpdatePublicCertificateSlotCreateRequest creates the CreateOrUpdatePublicCertificateSlot request. @@ -2302,10 +2663,13 @@ func (client *WebAppsClient) createOrUpdatePublicCertificateSlotCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, publicCertificate) + if err := runtime.MarshalAsJSON(req, publicCertificate); err != nil { + return nil, err + } + return req, nil } // createOrUpdatePublicCertificateSlotHandleResponse handles the CreateOrUpdatePublicCertificateSlot response. @@ -2321,7 +2685,7 @@ func (client *WebAppsClient) createOrUpdatePublicCertificateSlotHandleResponse(r // an existing one (PATCH). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - entityName - Name of the hybrid connection configuration. @@ -2329,18 +2693,25 @@ func (client *WebAppsClient) createOrUpdatePublicCertificateSlotHandleResponse(r // - options - WebAppsClientCreateOrUpdateRelayServiceConnectionOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateRelayServiceConnection // method. func (client *WebAppsClient) CreateOrUpdateRelayServiceConnection(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity, options *WebAppsClientCreateOrUpdateRelayServiceConnectionOptions) (WebAppsClientCreateOrUpdateRelayServiceConnectionResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateRelayServiceConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateRelayServiceConnectionCreateRequest(ctx, resourceGroupName, name, entityName, connectionEnvelope, options) if err != nil { return WebAppsClientCreateOrUpdateRelayServiceConnectionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientCreateOrUpdateRelayServiceConnectionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateOrUpdateRelayServiceConnectionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateRelayServiceConnectionResponse{}, err } - return client.createOrUpdateRelayServiceConnectionHandleResponse(resp) + resp, err := client.createOrUpdateRelayServiceConnectionHandleResponse(httpResp) + return resp, err } // createOrUpdateRelayServiceConnectionCreateRequest creates the CreateOrUpdateRelayServiceConnection request. @@ -2367,10 +2738,13 @@ func (client *WebAppsClient) createOrUpdateRelayServiceConnectionCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil } // createOrUpdateRelayServiceConnectionHandleResponse handles the CreateOrUpdateRelayServiceConnection response. @@ -2386,7 +2760,7 @@ func (client *WebAppsClient) createOrUpdateRelayServiceConnectionHandleResponse( // an existing one (PATCH). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - entityName - Name of the hybrid connection configuration. @@ -2396,18 +2770,25 @@ func (client *WebAppsClient) createOrUpdateRelayServiceConnectionHandleResponse( // - options - WebAppsClientCreateOrUpdateRelayServiceConnectionSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateRelayServiceConnectionSlot // method. func (client *WebAppsClient) CreateOrUpdateRelayServiceConnectionSlot(ctx context.Context, resourceGroupName string, name string, entityName string, slot string, connectionEnvelope RelayServiceConnectionEntity, options *WebAppsClientCreateOrUpdateRelayServiceConnectionSlotOptions) (WebAppsClientCreateOrUpdateRelayServiceConnectionSlotResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateRelayServiceConnectionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateRelayServiceConnectionSlotCreateRequest(ctx, resourceGroupName, name, entityName, slot, connectionEnvelope, options) if err != nil { return WebAppsClientCreateOrUpdateRelayServiceConnectionSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientCreateOrUpdateRelayServiceConnectionSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateOrUpdateRelayServiceConnectionSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateRelayServiceConnectionSlotResponse{}, err } - return client.createOrUpdateRelayServiceConnectionSlotHandleResponse(resp) + resp, err := client.createOrUpdateRelayServiceConnectionSlotHandleResponse(httpResp) + return resp, err } // createOrUpdateRelayServiceConnectionSlotCreateRequest creates the CreateOrUpdateRelayServiceConnectionSlot request. @@ -2438,10 +2819,13 @@ func (client *WebAppsClient) createOrUpdateRelayServiceConnectionSlotCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil } // createOrUpdateRelayServiceConnectionSlotHandleResponse handles the CreateOrUpdateRelayServiceConnectionSlot response. @@ -2457,7 +2841,7 @@ func (client *WebAppsClient) createOrUpdateRelayServiceConnectionSlotHandleRespo // an existing app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. // - slot - Name of the deployment slot to create or update. By default, this API attempts to create or modify the production @@ -2471,9 +2855,14 @@ func (client *WebAppsClient) BeginCreateOrUpdateSlot(ctx context.Context, resour if err != nil { return nil, err } - return runtime.NewPoller[WebAppsClientCreateOrUpdateSlotResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientCreateOrUpdateSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WebAppsClientCreateOrUpdateSlotResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientCreateOrUpdateSlotResponse]{ + Tracer: client.internal.Tracer(), + }) } } @@ -2481,20 +2870,26 @@ func (client *WebAppsClient) BeginCreateOrUpdateSlot(ctx context.Context, resour // existing app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *WebAppsClient) createOrUpdateSlot(ctx context.Context, resourceGroupName string, name string, slot string, siteEnvelope Site, options *WebAppsClientBeginCreateOrUpdateSlotOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginCreateOrUpdateSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateSlotCreateRequest(ctx, resourceGroupName, name, slot, siteEnvelope, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateSlotCreateRequest creates the CreateOrUpdateSlot request. @@ -2521,16 +2916,19 @@ func (client *WebAppsClient) createOrUpdateSlotCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, siteEnvelope) + if err := runtime.MarshalAsJSON(req, siteEnvelope); err != nil { + return nil, err + } + return req, nil } // BeginCreateOrUpdateSourceControl - Description for Updates the source control configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - siteSourceControl - JSON representation of a SiteSourceControl object. See example. @@ -2542,29 +2940,40 @@ func (client *WebAppsClient) BeginCreateOrUpdateSourceControl(ctx context.Contex if err != nil { return nil, err } - return runtime.NewPoller[WebAppsClientCreateOrUpdateSourceControlResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientCreateOrUpdateSourceControlResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WebAppsClientCreateOrUpdateSourceControlResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientCreateOrUpdateSourceControlResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateOrUpdateSourceControl - Description for Updates the source control configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *WebAppsClient) createOrUpdateSourceControl(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl, options *WebAppsClientBeginCreateOrUpdateSourceControlOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginCreateOrUpdateSourceControl" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateSourceControlCreateRequest(ctx, resourceGroupName, name, siteSourceControl, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateSourceControlCreateRequest creates the CreateOrUpdateSourceControl request. @@ -2587,16 +2996,19 @@ func (client *WebAppsClient) createOrUpdateSourceControlCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, siteSourceControl) + if err := runtime.MarshalAsJSON(req, siteSourceControl); err != nil { + return nil, err + } + return req, nil } // BeginCreateOrUpdateSourceControlSlot - Description for Updates the source control configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will update the source control configuration for @@ -2610,29 +3022,40 @@ func (client *WebAppsClient) BeginCreateOrUpdateSourceControlSlot(ctx context.Co if err != nil { return nil, err } - return runtime.NewPoller[WebAppsClientCreateOrUpdateSourceControlSlotResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientCreateOrUpdateSourceControlSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WebAppsClientCreateOrUpdateSourceControlSlotResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientCreateOrUpdateSourceControlSlotResponse]{ + Tracer: client.internal.Tracer(), + }) } } // CreateOrUpdateSourceControlSlot - Description for Updates the source control configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *WebAppsClient) createOrUpdateSourceControlSlot(ctx context.Context, resourceGroupName string, name string, slot string, siteSourceControl SiteSourceControl, options *WebAppsClientBeginCreateOrUpdateSourceControlSlotOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginCreateOrUpdateSourceControlSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateSourceControlSlotCreateRequest(ctx, resourceGroupName, name, slot, siteSourceControl, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // createOrUpdateSourceControlSlotCreateRequest creates the CreateOrUpdateSourceControlSlot request. @@ -2659,10 +3082,13 @@ func (client *WebAppsClient) createOrUpdateSourceControlSlotCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, siteSourceControl) + if err := runtime.MarshalAsJSON(req, siteSourceControl); err != nil { + return nil, err + } + return req, nil } // CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck - Description for Integrates this Web App with a Virtual Network. @@ -2671,25 +3097,32 @@ func (client *WebAppsClient) createOrUpdateSourceControlSlotCreateRequest(ctx co // delegated, and is not in use by another App Service Plan other than the one this App is in. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - connectionEnvelope - Properties of the Virtual Network connection. See example. // - options - WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckOptions contains the optional parameters for // the WebAppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck method. func (client *WebAppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork, options *WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckOptions) (WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateSwiftVirtualNetworkConnectionWithCheckCreateRequest(ctx, resourceGroupName, name, connectionEnvelope, options) if err != nil { return WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResponse{}, err } - return client.createOrUpdateSwiftVirtualNetworkConnectionWithCheckHandleResponse(resp) + resp, err := client.createOrUpdateSwiftVirtualNetworkConnectionWithCheckHandleResponse(httpResp) + return resp, err } // createOrUpdateSwiftVirtualNetworkConnectionWithCheckCreateRequest creates the CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck request. @@ -2712,10 +3145,13 @@ func (client *WebAppsClient) createOrUpdateSwiftVirtualNetworkConnectionWithChec return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil } // createOrUpdateSwiftVirtualNetworkConnectionWithCheckHandleResponse handles the CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck response. @@ -2733,7 +3169,7 @@ func (client *WebAppsClient) createOrUpdateSwiftVirtualNetworkConnectionWithChec // delegated, and is not in use by another App Service Plan other than the one this App is in. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will add or update connections for the production @@ -2742,18 +3178,25 @@ func (client *WebAppsClient) createOrUpdateSwiftVirtualNetworkConnectionWithChec // - options - WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions contains the optional parameters // for the WebAppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot method. func (client *WebAppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot(ctx context.Context, resourceGroupName string, name string, slot string, connectionEnvelope SwiftVirtualNetwork, options *WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions) (WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotCreateRequest(ctx, resourceGroupName, name, slot, connectionEnvelope, options) if err != nil { return WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse{}, err } - return client.createOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotHandleResponse(resp) + resp, err := client.createOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotHandleResponse(httpResp) + return resp, err } // createOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotCreateRequest creates the CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot request. @@ -2780,10 +3223,13 @@ func (client *WebAppsClient) createOrUpdateSwiftVirtualNetworkConnectionWithChec return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil } // createOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotHandleResponse handles the CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot response. @@ -2799,7 +3245,7 @@ func (client *WebAppsClient) createOrUpdateSwiftVirtualNetworkConnectionWithChec // connection properties (PATCH). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - vnetName - Name of an existing Virtual Network. @@ -2807,18 +3253,25 @@ func (client *WebAppsClient) createOrUpdateSwiftVirtualNetworkConnectionWithChec // - options - WebAppsClientCreateOrUpdateVnetConnectionOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateVnetConnection // method. func (client *WebAppsClient) CreateOrUpdateVnetConnection(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfoResource, options *WebAppsClientCreateOrUpdateVnetConnectionOptions) (WebAppsClientCreateOrUpdateVnetConnectionResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateVnetConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateVnetConnectionCreateRequest(ctx, resourceGroupName, name, vnetName, connectionEnvelope, options) if err != nil { return WebAppsClientCreateOrUpdateVnetConnectionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientCreateOrUpdateVnetConnectionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateOrUpdateVnetConnectionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateVnetConnectionResponse{}, err } - return client.createOrUpdateVnetConnectionHandleResponse(resp) + resp, err := client.createOrUpdateVnetConnectionHandleResponse(httpResp) + return resp, err } // createOrUpdateVnetConnectionCreateRequest creates the CreateOrUpdateVnetConnection request. @@ -2845,10 +3298,13 @@ func (client *WebAppsClient) createOrUpdateVnetConnectionCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil } // createOrUpdateVnetConnectionHandleResponse handles the CreateOrUpdateVnetConnection response. @@ -2864,7 +3320,7 @@ func (client *WebAppsClient) createOrUpdateVnetConnectionHandleResponse(resp *ht // (PATCH). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - vnetName - Name of the Virtual Network. @@ -2873,18 +3329,25 @@ func (client *WebAppsClient) createOrUpdateVnetConnectionHandleResponse(resp *ht // - options - WebAppsClientCreateOrUpdateVnetConnectionGatewayOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateVnetConnectionGateway // method. func (client *WebAppsClient) CreateOrUpdateVnetConnectionGateway(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway, options *WebAppsClientCreateOrUpdateVnetConnectionGatewayOptions) (WebAppsClientCreateOrUpdateVnetConnectionGatewayResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateVnetConnectionGateway" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateVnetConnectionGatewayCreateRequest(ctx, resourceGroupName, name, vnetName, gatewayName, connectionEnvelope, options) if err != nil { return WebAppsClientCreateOrUpdateVnetConnectionGatewayResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientCreateOrUpdateVnetConnectionGatewayResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateOrUpdateVnetConnectionGatewayResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateVnetConnectionGatewayResponse{}, err } - return client.createOrUpdateVnetConnectionGatewayHandleResponse(resp) + resp, err := client.createOrUpdateVnetConnectionGatewayHandleResponse(httpResp) + return resp, err } // createOrUpdateVnetConnectionGatewayCreateRequest creates the CreateOrUpdateVnetConnectionGateway request. @@ -2915,10 +3378,13 @@ func (client *WebAppsClient) createOrUpdateVnetConnectionGatewayCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil } // createOrUpdateVnetConnectionGatewayHandleResponse handles the CreateOrUpdateVnetConnectionGateway response. @@ -2934,7 +3400,7 @@ func (client *WebAppsClient) createOrUpdateVnetConnectionGatewayHandleResponse(r // it (PATCH). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - vnetName - Name of the Virtual Network. @@ -2945,18 +3411,25 @@ func (client *WebAppsClient) createOrUpdateVnetConnectionGatewayHandleResponse(r // - options - WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateVnetConnectionGatewaySlot // method. func (client *WebAppsClient) CreateOrUpdateVnetConnectionGatewaySlot(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, slot string, connectionEnvelope VnetGateway, options *WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotOptions) (WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateVnetConnectionGatewaySlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateVnetConnectionGatewaySlotCreateRequest(ctx, resourceGroupName, name, vnetName, gatewayName, slot, connectionEnvelope, options) if err != nil { return WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateVnetConnectionGatewaySlotResponse{}, err } - return client.createOrUpdateVnetConnectionGatewaySlotHandleResponse(resp) + resp, err := client.createOrUpdateVnetConnectionGatewaySlotHandleResponse(httpResp) + return resp, err } // createOrUpdateVnetConnectionGatewaySlotCreateRequest creates the CreateOrUpdateVnetConnectionGatewaySlot request. @@ -2991,10 +3464,13 @@ func (client *WebAppsClient) createOrUpdateVnetConnectionGatewaySlotCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil } // createOrUpdateVnetConnectionGatewaySlotHandleResponse handles the CreateOrUpdateVnetConnectionGatewaySlot response. @@ -3010,7 +3486,7 @@ func (client *WebAppsClient) createOrUpdateVnetConnectionGatewaySlotHandleRespon // the connection properties (PATCH). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - vnetName - Name of an existing Virtual Network. @@ -3020,18 +3496,25 @@ func (client *WebAppsClient) createOrUpdateVnetConnectionGatewaySlotHandleRespon // - options - WebAppsClientCreateOrUpdateVnetConnectionSlotOptions contains the optional parameters for the WebAppsClient.CreateOrUpdateVnetConnectionSlot // method. func (client *WebAppsClient) CreateOrUpdateVnetConnectionSlot(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string, connectionEnvelope VnetInfoResource, options *WebAppsClientCreateOrUpdateVnetConnectionSlotOptions) (WebAppsClientCreateOrUpdateVnetConnectionSlotResponse, error) { + var err error + const operationName = "WebAppsClient.CreateOrUpdateVnetConnectionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.createOrUpdateVnetConnectionSlotCreateRequest(ctx, resourceGroupName, name, vnetName, slot, connectionEnvelope, options) if err != nil { return WebAppsClientCreateOrUpdateVnetConnectionSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientCreateOrUpdateVnetConnectionSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientCreateOrUpdateVnetConnectionSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientCreateOrUpdateVnetConnectionSlotResponse{}, err } - return client.createOrUpdateVnetConnectionSlotHandleResponse(resp) + resp, err := client.createOrUpdateVnetConnectionSlotHandleResponse(httpResp) + return resp, err } // createOrUpdateVnetConnectionSlotCreateRequest creates the CreateOrUpdateVnetConnectionSlot request. @@ -3062,10 +3545,13 @@ func (client *WebAppsClient) createOrUpdateVnetConnectionSlotCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil } // createOrUpdateVnetConnectionSlotHandleResponse handles the CreateOrUpdateVnetConnectionSlot response. @@ -3080,21 +3566,27 @@ func (client *WebAppsClient) createOrUpdateVnetConnectionSlotHandleResponse(resp // Delete - Description for Deletes a web, mobile, or API app, or one of the deployment slots. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app to delete. // - options - WebAppsClientDeleteOptions contains the optional parameters for the WebAppsClient.Delete method. func (client *WebAppsClient) Delete(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientDeleteOptions) (WebAppsClientDeleteResponse, error) { + var err error + const operationName = "WebAppsClient.Delete" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteResponse{}, err } return WebAppsClientDeleteResponse{}, nil } @@ -3125,7 +3617,7 @@ func (client *WebAppsClient) deleteCreateRequest(ctx context.Context, resourceGr if options != nil && options.DeleteEmptyServerFarm != nil { reqQP.Set("deleteEmptyServerFarm", strconv.FormatBool(*options.DeleteEmptyServerFarm)) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3134,22 +3626,28 @@ func (client *WebAppsClient) deleteCreateRequest(ctx context.Context, resourceGr // DeleteBackup - Description for Deletes a backup of an app by its ID. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - backupID - ID of the backup. // - options - WebAppsClientDeleteBackupOptions contains the optional parameters for the WebAppsClient.DeleteBackup method. func (client *WebAppsClient) DeleteBackup(ctx context.Context, resourceGroupName string, name string, backupID string, options *WebAppsClientDeleteBackupOptions) (WebAppsClientDeleteBackupResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteBackup" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteBackupCreateRequest(ctx, resourceGroupName, name, backupID, options) if err != nil { return WebAppsClientDeleteBackupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeleteBackupResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientDeleteBackupResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteBackupResponse{}, err } return WebAppsClientDeleteBackupResponse{}, nil } @@ -3178,7 +3676,7 @@ func (client *WebAppsClient) deleteBackupCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3187,22 +3685,28 @@ func (client *WebAppsClient) deleteBackupCreateRequest(ctx context.Context, reso // DeleteBackupConfiguration - Description for Deletes the backup configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientDeleteBackupConfigurationOptions contains the optional parameters for the WebAppsClient.DeleteBackupConfiguration // method. func (client *WebAppsClient) DeleteBackupConfiguration(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientDeleteBackupConfigurationOptions) (WebAppsClientDeleteBackupConfigurationResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteBackupConfiguration" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteBackupConfigurationCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientDeleteBackupConfigurationResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeleteBackupConfigurationResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientDeleteBackupConfigurationResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteBackupConfigurationResponse{}, err } return WebAppsClientDeleteBackupConfigurationResponse{}, nil } @@ -3227,7 +3731,7 @@ func (client *WebAppsClient) deleteBackupConfigurationCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3236,7 +3740,7 @@ func (client *WebAppsClient) deleteBackupConfigurationCreateRequest(ctx context. // DeleteBackupConfigurationSlot - Description for Deletes the backup configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will delete the backup configuration for the production @@ -3244,16 +3748,22 @@ func (client *WebAppsClient) deleteBackupConfigurationCreateRequest(ctx context. // - options - WebAppsClientDeleteBackupConfigurationSlotOptions contains the optional parameters for the WebAppsClient.DeleteBackupConfigurationSlot // method. func (client *WebAppsClient) DeleteBackupConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientDeleteBackupConfigurationSlotOptions) (WebAppsClientDeleteBackupConfigurationSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteBackupConfigurationSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteBackupConfigurationSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientDeleteBackupConfigurationSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeleteBackupConfigurationSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientDeleteBackupConfigurationSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteBackupConfigurationSlotResponse{}, err } return WebAppsClientDeleteBackupConfigurationSlotResponse{}, nil } @@ -3282,7 +3792,7 @@ func (client *WebAppsClient) deleteBackupConfigurationSlotCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3291,7 +3801,7 @@ func (client *WebAppsClient) deleteBackupConfigurationSlotCreateRequest(ctx cont // DeleteBackupSlot - Description for Deletes a backup of an app by its ID. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - backupID - ID of the backup. @@ -3299,16 +3809,22 @@ func (client *WebAppsClient) deleteBackupConfigurationSlotCreateRequest(ctx cont // - options - WebAppsClientDeleteBackupSlotOptions contains the optional parameters for the WebAppsClient.DeleteBackupSlot // method. func (client *WebAppsClient) DeleteBackupSlot(ctx context.Context, resourceGroupName string, name string, backupID string, slot string, options *WebAppsClientDeleteBackupSlotOptions) (WebAppsClientDeleteBackupSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteBackupSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteBackupSlotCreateRequest(ctx, resourceGroupName, name, backupID, slot, options) if err != nil { return WebAppsClientDeleteBackupSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeleteBackupSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientDeleteBackupSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteBackupSlotResponse{}, err } return WebAppsClientDeleteBackupSlotResponse{}, nil } @@ -3341,7 +3857,7 @@ func (client *WebAppsClient) deleteBackupSlotCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3350,23 +3866,29 @@ func (client *WebAppsClient) deleteBackupSlotCreateRequest(ctx context.Context, // DeleteContinuousWebJob - Description for Delete a continuous web job by its ID for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - webJobName - Name of Web Job. // - options - WebAppsClientDeleteContinuousWebJobOptions contains the optional parameters for the WebAppsClient.DeleteContinuousWebJob // method. func (client *WebAppsClient) DeleteContinuousWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientDeleteContinuousWebJobOptions) (WebAppsClientDeleteContinuousWebJobResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteContinuousWebJob" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteContinuousWebJobCreateRequest(ctx, resourceGroupName, name, webJobName, options) if err != nil { return WebAppsClientDeleteContinuousWebJobResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeleteContinuousWebJobResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientDeleteContinuousWebJobResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteContinuousWebJobResponse{}, err } return WebAppsClientDeleteContinuousWebJobResponse{}, nil } @@ -3395,7 +3917,7 @@ func (client *WebAppsClient) deleteContinuousWebJobCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3404,7 +3926,7 @@ func (client *WebAppsClient) deleteContinuousWebJobCreateRequest(ctx context.Con // DeleteContinuousWebJobSlot - Description for Delete a continuous web job by its ID for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - webJobName - Name of Web Job. @@ -3412,16 +3934,22 @@ func (client *WebAppsClient) deleteContinuousWebJobCreateRequest(ctx context.Con // - options - WebAppsClientDeleteContinuousWebJobSlotOptions contains the optional parameters for the WebAppsClient.DeleteContinuousWebJobSlot // method. func (client *WebAppsClient) DeleteContinuousWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientDeleteContinuousWebJobSlotOptions) (WebAppsClientDeleteContinuousWebJobSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteContinuousWebJobSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteContinuousWebJobSlotCreateRequest(ctx, resourceGroupName, name, webJobName, slot, options) if err != nil { return WebAppsClientDeleteContinuousWebJobSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeleteContinuousWebJobSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientDeleteContinuousWebJobSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteContinuousWebJobSlotResponse{}, err } return WebAppsClientDeleteContinuousWebJobSlotResponse{}, nil } @@ -3454,7 +3982,7 @@ func (client *WebAppsClient) deleteContinuousWebJobSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3463,23 +3991,29 @@ func (client *WebAppsClient) deleteContinuousWebJobSlotCreateRequest(ctx context // DeleteDeployment - Description for Delete a deployment by its ID for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - id - Deployment ID. // - options - WebAppsClientDeleteDeploymentOptions contains the optional parameters for the WebAppsClient.DeleteDeployment // method. func (client *WebAppsClient) DeleteDeployment(ctx context.Context, resourceGroupName string, name string, id string, options *WebAppsClientDeleteDeploymentOptions) (WebAppsClientDeleteDeploymentResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteDeployment" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteDeploymentCreateRequest(ctx, resourceGroupName, name, id, options) if err != nil { return WebAppsClientDeleteDeploymentResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeleteDeploymentResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientDeleteDeploymentResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteDeploymentResponse{}, err } return WebAppsClientDeleteDeploymentResponse{}, nil } @@ -3508,7 +4042,7 @@ func (client *WebAppsClient) deleteDeploymentCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3517,7 +4051,7 @@ func (client *WebAppsClient) deleteDeploymentCreateRequest(ctx context.Context, // DeleteDeploymentSlot - Description for Delete a deployment by its ID for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - id - Deployment ID. @@ -3525,16 +4059,22 @@ func (client *WebAppsClient) deleteDeploymentCreateRequest(ctx context.Context, // - options - WebAppsClientDeleteDeploymentSlotOptions contains the optional parameters for the WebAppsClient.DeleteDeploymentSlot // method. func (client *WebAppsClient) DeleteDeploymentSlot(ctx context.Context, resourceGroupName string, name string, id string, slot string, options *WebAppsClientDeleteDeploymentSlotOptions) (WebAppsClientDeleteDeploymentSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteDeploymentSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteDeploymentSlotCreateRequest(ctx, resourceGroupName, name, id, slot, options) if err != nil { return WebAppsClientDeleteDeploymentSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeleteDeploymentSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientDeleteDeploymentSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteDeploymentSlotResponse{}, err } return WebAppsClientDeleteDeploymentSlotResponse{}, nil } @@ -3567,7 +4107,7 @@ func (client *WebAppsClient) deleteDeploymentSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3576,23 +4116,29 @@ func (client *WebAppsClient) deleteDeploymentSlotCreateRequest(ctx context.Conte // DeleteDomainOwnershipIdentifier - Description for Deletes a domain ownership identifier for a web app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - domainOwnershipIdentifierName - Name of domain ownership identifier. // - options - WebAppsClientDeleteDomainOwnershipIdentifierOptions contains the optional parameters for the WebAppsClient.DeleteDomainOwnershipIdentifier // method. func (client *WebAppsClient) DeleteDomainOwnershipIdentifier(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, options *WebAppsClientDeleteDomainOwnershipIdentifierOptions) (WebAppsClientDeleteDomainOwnershipIdentifierResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteDomainOwnershipIdentifier" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteDomainOwnershipIdentifierCreateRequest(ctx, resourceGroupName, name, domainOwnershipIdentifierName, options) if err != nil { return WebAppsClientDeleteDomainOwnershipIdentifierResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeleteDomainOwnershipIdentifierResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientDeleteDomainOwnershipIdentifierResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteDomainOwnershipIdentifierResponse{}, err } return WebAppsClientDeleteDomainOwnershipIdentifierResponse{}, nil } @@ -3621,7 +4167,7 @@ func (client *WebAppsClient) deleteDomainOwnershipIdentifierCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3630,7 +4176,7 @@ func (client *WebAppsClient) deleteDomainOwnershipIdentifierCreateRequest(ctx co // DeleteDomainOwnershipIdentifierSlot - Description for Deletes a domain ownership identifier for a web app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - domainOwnershipIdentifierName - Name of domain ownership identifier. @@ -3638,16 +4184,22 @@ func (client *WebAppsClient) deleteDomainOwnershipIdentifierCreateRequest(ctx co // - options - WebAppsClientDeleteDomainOwnershipIdentifierSlotOptions contains the optional parameters for the WebAppsClient.DeleteDomainOwnershipIdentifierSlot // method. func (client *WebAppsClient) DeleteDomainOwnershipIdentifierSlot(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string, options *WebAppsClientDeleteDomainOwnershipIdentifierSlotOptions) (WebAppsClientDeleteDomainOwnershipIdentifierSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteDomainOwnershipIdentifierSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteDomainOwnershipIdentifierSlotCreateRequest(ctx, resourceGroupName, name, domainOwnershipIdentifierName, slot, options) if err != nil { return WebAppsClientDeleteDomainOwnershipIdentifierSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeleteDomainOwnershipIdentifierSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientDeleteDomainOwnershipIdentifierSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteDomainOwnershipIdentifierSlotResponse{}, err } return WebAppsClientDeleteDomainOwnershipIdentifierSlotResponse{}, nil } @@ -3680,7 +4232,7 @@ func (client *WebAppsClient) deleteDomainOwnershipIdentifierSlotCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3689,22 +4241,28 @@ func (client *WebAppsClient) deleteDomainOwnershipIdentifierSlotCreateRequest(ct // DeleteFunction - Description for Delete a function for web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - functionName - Function name. // - options - WebAppsClientDeleteFunctionOptions contains the optional parameters for the WebAppsClient.DeleteFunction method. func (client *WebAppsClient) DeleteFunction(ctx context.Context, resourceGroupName string, name string, functionName string, options *WebAppsClientDeleteFunctionOptions) (WebAppsClientDeleteFunctionResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteFunction" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteFunctionCreateRequest(ctx, resourceGroupName, name, functionName, options) if err != nil { return WebAppsClientDeleteFunctionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeleteFunctionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientDeleteFunctionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteFunctionResponse{}, err } return WebAppsClientDeleteFunctionResponse{}, nil } @@ -3733,7 +4291,7 @@ func (client *WebAppsClient) deleteFunctionCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3742,7 +4300,7 @@ func (client *WebAppsClient) deleteFunctionCreateRequest(ctx context.Context, re // DeleteFunctionSecret - Description for Delete a function secret. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - functionName - The name of the function. @@ -3750,16 +4308,22 @@ func (client *WebAppsClient) deleteFunctionCreateRequest(ctx context.Context, re // - options - WebAppsClientDeleteFunctionSecretOptions contains the optional parameters for the WebAppsClient.DeleteFunctionSecret // method. func (client *WebAppsClient) DeleteFunctionSecret(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, options *WebAppsClientDeleteFunctionSecretOptions) (WebAppsClientDeleteFunctionSecretResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteFunctionSecret" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteFunctionSecretCreateRequest(ctx, resourceGroupName, name, functionName, keyName, options) if err != nil { return WebAppsClientDeleteFunctionSecretResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeleteFunctionSecretResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientDeleteFunctionSecretResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteFunctionSecretResponse{}, err } return WebAppsClientDeleteFunctionSecretResponse{}, nil } @@ -3792,7 +4356,7 @@ func (client *WebAppsClient) deleteFunctionSecretCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3801,7 +4365,7 @@ func (client *WebAppsClient) deleteFunctionSecretCreateRequest(ctx context.Conte // DeleteFunctionSecretSlot - Description for Delete a function secret. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - functionName - The name of the function. @@ -3810,16 +4374,22 @@ func (client *WebAppsClient) deleteFunctionSecretCreateRequest(ctx context.Conte // - options - WebAppsClientDeleteFunctionSecretSlotOptions contains the optional parameters for the WebAppsClient.DeleteFunctionSecretSlot // method. func (client *WebAppsClient) DeleteFunctionSecretSlot(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, slot string, options *WebAppsClientDeleteFunctionSecretSlotOptions) (WebAppsClientDeleteFunctionSecretSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteFunctionSecretSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteFunctionSecretSlotCreateRequest(ctx, resourceGroupName, name, functionName, keyName, slot, options) if err != nil { return WebAppsClientDeleteFunctionSecretSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeleteFunctionSecretSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientDeleteFunctionSecretSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteFunctionSecretSlotResponse{}, err } return WebAppsClientDeleteFunctionSecretSlotResponse{}, nil } @@ -3856,7 +4426,7 @@ func (client *WebAppsClient) deleteFunctionSecretSlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3865,23 +4435,29 @@ func (client *WebAppsClient) deleteFunctionSecretSlotCreateRequest(ctx context.C // DeleteHostNameBinding - Description for Deletes a hostname binding for an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - hostName - Hostname in the hostname binding. // - options - WebAppsClientDeleteHostNameBindingOptions contains the optional parameters for the WebAppsClient.DeleteHostNameBinding // method. func (client *WebAppsClient) DeleteHostNameBinding(ctx context.Context, resourceGroupName string, name string, hostName string, options *WebAppsClientDeleteHostNameBindingOptions) (WebAppsClientDeleteHostNameBindingResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteHostNameBinding" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteHostNameBindingCreateRequest(ctx, resourceGroupName, name, hostName, options) if err != nil { return WebAppsClientDeleteHostNameBindingResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeleteHostNameBindingResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientDeleteHostNameBindingResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteHostNameBindingResponse{}, err } return WebAppsClientDeleteHostNameBindingResponse{}, nil } @@ -3910,7 +4486,7 @@ func (client *WebAppsClient) deleteHostNameBindingCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3919,7 +4495,7 @@ func (client *WebAppsClient) deleteHostNameBindingCreateRequest(ctx context.Cont // DeleteHostNameBindingSlot - Description for Deletes a hostname binding for an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. @@ -3927,16 +4503,22 @@ func (client *WebAppsClient) deleteHostNameBindingCreateRequest(ctx context.Cont // - options - WebAppsClientDeleteHostNameBindingSlotOptions contains the optional parameters for the WebAppsClient.DeleteHostNameBindingSlot // method. func (client *WebAppsClient) DeleteHostNameBindingSlot(ctx context.Context, resourceGroupName string, name string, slot string, hostName string, options *WebAppsClientDeleteHostNameBindingSlotOptions) (WebAppsClientDeleteHostNameBindingSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteHostNameBindingSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteHostNameBindingSlotCreateRequest(ctx, resourceGroupName, name, slot, hostName, options) if err != nil { return WebAppsClientDeleteHostNameBindingSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeleteHostNameBindingSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientDeleteHostNameBindingSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteHostNameBindingSlotResponse{}, err } return WebAppsClientDeleteHostNameBindingSlotResponse{}, nil } @@ -3969,7 +4551,7 @@ func (client *WebAppsClient) deleteHostNameBindingSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -3978,7 +4560,7 @@ func (client *WebAppsClient) deleteHostNameBindingSlotCreateRequest(ctx context. // DeleteHostSecret - Description for Delete a host level secret. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - keyType - The type of host key. @@ -3986,16 +4568,22 @@ func (client *WebAppsClient) deleteHostNameBindingSlotCreateRequest(ctx context. // - options - WebAppsClientDeleteHostSecretOptions contains the optional parameters for the WebAppsClient.DeleteHostSecret // method. func (client *WebAppsClient) DeleteHostSecret(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, options *WebAppsClientDeleteHostSecretOptions) (WebAppsClientDeleteHostSecretResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteHostSecret" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteHostSecretCreateRequest(ctx, resourceGroupName, name, keyType, keyName, options) if err != nil { return WebAppsClientDeleteHostSecretResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeleteHostSecretResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientDeleteHostSecretResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteHostSecretResponse{}, err } return WebAppsClientDeleteHostSecretResponse{}, nil } @@ -4028,7 +4616,7 @@ func (client *WebAppsClient) deleteHostSecretCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -4037,7 +4625,7 @@ func (client *WebAppsClient) deleteHostSecretCreateRequest(ctx context.Context, // DeleteHostSecretSlot - Description for Delete a host level secret. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - keyType - The type of host key. @@ -4046,16 +4634,22 @@ func (client *WebAppsClient) deleteHostSecretCreateRequest(ctx context.Context, // - options - WebAppsClientDeleteHostSecretSlotOptions contains the optional parameters for the WebAppsClient.DeleteHostSecretSlot // method. func (client *WebAppsClient) DeleteHostSecretSlot(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, slot string, options *WebAppsClientDeleteHostSecretSlotOptions) (WebAppsClientDeleteHostSecretSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteHostSecretSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteHostSecretSlotCreateRequest(ctx, resourceGroupName, name, keyType, keyName, slot, options) if err != nil { return WebAppsClientDeleteHostSecretSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeleteHostSecretSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientDeleteHostSecretSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteHostSecretSlotResponse{}, err } return WebAppsClientDeleteHostSecretSlotResponse{}, nil } @@ -4092,7 +4686,7 @@ func (client *WebAppsClient) deleteHostSecretSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -4101,7 +4695,7 @@ func (client *WebAppsClient) deleteHostSecretSlotCreateRequest(ctx context.Conte // DeleteHybridConnection - Description for Removes a Hybrid Connection from this site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - The name of the web app. // - namespaceName - The namespace for this hybrid connection. @@ -4109,16 +4703,22 @@ func (client *WebAppsClient) deleteHostSecretSlotCreateRequest(ctx context.Conte // - options - WebAppsClientDeleteHybridConnectionOptions contains the optional parameters for the WebAppsClient.DeleteHybridConnection // method. func (client *WebAppsClient) DeleteHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, options *WebAppsClientDeleteHybridConnectionOptions) (WebAppsClientDeleteHybridConnectionResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteHybridConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteHybridConnectionCreateRequest(ctx, resourceGroupName, name, namespaceName, relayName, options) if err != nil { return WebAppsClientDeleteHybridConnectionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeleteHybridConnectionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientDeleteHybridConnectionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteHybridConnectionResponse{}, err } return WebAppsClientDeleteHybridConnectionResponse{}, nil } @@ -4151,7 +4751,7 @@ func (client *WebAppsClient) deleteHybridConnectionCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -4160,7 +4760,7 @@ func (client *WebAppsClient) deleteHybridConnectionCreateRequest(ctx context.Con // DeleteHybridConnectionSlot - Description for Removes a Hybrid Connection from this site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - The name of the web app. // - namespaceName - The namespace for this hybrid connection. @@ -4169,16 +4769,22 @@ func (client *WebAppsClient) deleteHybridConnectionCreateRequest(ctx context.Con // - options - WebAppsClientDeleteHybridConnectionSlotOptions contains the optional parameters for the WebAppsClient.DeleteHybridConnectionSlot // method. func (client *WebAppsClient) DeleteHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string, options *WebAppsClientDeleteHybridConnectionSlotOptions) (WebAppsClientDeleteHybridConnectionSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteHybridConnectionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteHybridConnectionSlotCreateRequest(ctx, resourceGroupName, name, namespaceName, relayName, slot, options) if err != nil { return WebAppsClientDeleteHybridConnectionSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeleteHybridConnectionSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientDeleteHybridConnectionSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteHybridConnectionSlotResponse{}, err } return WebAppsClientDeleteHybridConnectionSlotResponse{}, nil } @@ -4215,7 +4821,7 @@ func (client *WebAppsClient) deleteHybridConnectionSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -4224,7 +4830,7 @@ func (client *WebAppsClient) deleteHybridConnectionSlotCreateRequest(ctx context // DeleteInstanceFunctionSlot - Description for Delete a function for web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - functionName - Function name. @@ -4232,16 +4838,22 @@ func (client *WebAppsClient) deleteHybridConnectionSlotCreateRequest(ctx context // - options - WebAppsClientDeleteInstanceFunctionSlotOptions contains the optional parameters for the WebAppsClient.DeleteInstanceFunctionSlot // method. func (client *WebAppsClient) DeleteInstanceFunctionSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, options *WebAppsClientDeleteInstanceFunctionSlotOptions) (WebAppsClientDeleteInstanceFunctionSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteInstanceFunctionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteInstanceFunctionSlotCreateRequest(ctx, resourceGroupName, name, functionName, slot, options) if err != nil { return WebAppsClientDeleteInstanceFunctionSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeleteInstanceFunctionSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientDeleteInstanceFunctionSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteInstanceFunctionSlotResponse{}, err } return WebAppsClientDeleteInstanceFunctionSlotResponse{}, nil } @@ -4274,7 +4886,7 @@ func (client *WebAppsClient) deleteInstanceFunctionSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -4284,7 +4896,7 @@ func (client *WebAppsClient) deleteInstanceFunctionSlotCreateRequest(ctx context // scaled-out instance in a web site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - processID - PID. @@ -4293,16 +4905,22 @@ func (client *WebAppsClient) deleteInstanceFunctionSlotCreateRequest(ctx context // - options - WebAppsClientDeleteInstanceProcessOptions contains the optional parameters for the WebAppsClient.DeleteInstanceProcess // method. func (client *WebAppsClient) DeleteInstanceProcess(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string, options *WebAppsClientDeleteInstanceProcessOptions) (WebAppsClientDeleteInstanceProcessResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteInstanceProcess" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteInstanceProcessCreateRequest(ctx, resourceGroupName, name, processID, instanceID, options) if err != nil { return WebAppsClientDeleteInstanceProcessResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeleteInstanceProcessResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientDeleteInstanceProcessResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteInstanceProcessResponse{}, err } return WebAppsClientDeleteInstanceProcessResponse{}, nil } @@ -4335,7 +4953,7 @@ func (client *WebAppsClient) deleteInstanceProcessCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -4345,7 +4963,7 @@ func (client *WebAppsClient) deleteInstanceProcessCreateRequest(ctx context.Cont // scaled-out instance in a web site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - processID - PID. @@ -4355,16 +4973,22 @@ func (client *WebAppsClient) deleteInstanceProcessCreateRequest(ctx context.Cont // - options - WebAppsClientDeleteInstanceProcessSlotOptions contains the optional parameters for the WebAppsClient.DeleteInstanceProcessSlot // method. func (client *WebAppsClient) DeleteInstanceProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string, options *WebAppsClientDeleteInstanceProcessSlotOptions) (WebAppsClientDeleteInstanceProcessSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteInstanceProcessSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteInstanceProcessSlotCreateRequest(ctx, resourceGroupName, name, processID, slot, instanceID, options) if err != nil { return WebAppsClientDeleteInstanceProcessSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeleteInstanceProcessSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientDeleteInstanceProcessSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteInstanceProcessSlotResponse{}, err } return WebAppsClientDeleteInstanceProcessSlotResponse{}, nil } @@ -4401,7 +5025,7 @@ func (client *WebAppsClient) deleteInstanceProcessSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -4410,23 +5034,29 @@ func (client *WebAppsClient) deleteInstanceProcessSlotCreateRequest(ctx context. // DeletePremierAddOn - Description for Delete a premier add-on from an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - premierAddOnName - Add-on name. // - options - WebAppsClientDeletePremierAddOnOptions contains the optional parameters for the WebAppsClient.DeletePremierAddOn // method. func (client *WebAppsClient) DeletePremierAddOn(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, options *WebAppsClientDeletePremierAddOnOptions) (WebAppsClientDeletePremierAddOnResponse, error) { + var err error + const operationName = "WebAppsClient.DeletePremierAddOn" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deletePremierAddOnCreateRequest(ctx, resourceGroupName, name, premierAddOnName, options) if err != nil { return WebAppsClientDeletePremierAddOnResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeletePremierAddOnResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientDeletePremierAddOnResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeletePremierAddOnResponse{}, err } return WebAppsClientDeletePremierAddOnResponse{}, nil } @@ -4455,7 +5085,7 @@ func (client *WebAppsClient) deletePremierAddOnCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -4464,7 +5094,7 @@ func (client *WebAppsClient) deletePremierAddOnCreateRequest(ctx context.Context // DeletePremierAddOnSlot - Description for Delete a premier add-on from an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - premierAddOnName - Add-on name. @@ -4473,16 +5103,22 @@ func (client *WebAppsClient) deletePremierAddOnCreateRequest(ctx context.Context // - options - WebAppsClientDeletePremierAddOnSlotOptions contains the optional parameters for the WebAppsClient.DeletePremierAddOnSlot // method. func (client *WebAppsClient) DeletePremierAddOnSlot(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string, options *WebAppsClientDeletePremierAddOnSlotOptions) (WebAppsClientDeletePremierAddOnSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeletePremierAddOnSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deletePremierAddOnSlotCreateRequest(ctx, resourceGroupName, name, premierAddOnName, slot, options) if err != nil { return WebAppsClientDeletePremierAddOnSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeletePremierAddOnSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientDeletePremierAddOnSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeletePremierAddOnSlotResponse{}, err } return WebAppsClientDeletePremierAddOnSlotResponse{}, nil } @@ -4515,7 +5151,7 @@ func (client *WebAppsClient) deletePremierAddOnSlotCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -4524,7 +5160,7 @@ func (client *WebAppsClient) deletePremierAddOnSlotCreateRequest(ctx context.Con // BeginDeletePrivateEndpointConnection - Description for Deletes a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the site. // - options - WebAppsClientBeginDeletePrivateEndpointConnectionOptions contains the optional parameters for the WebAppsClient.BeginDeletePrivateEndpointConnection @@ -4535,29 +5171,40 @@ func (client *WebAppsClient) BeginDeletePrivateEndpointConnection(ctx context.Co if err != nil { return nil, err } - return runtime.NewPoller[WebAppsClientDeletePrivateEndpointConnectionResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientDeletePrivateEndpointConnectionResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WebAppsClientDeletePrivateEndpointConnectionResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientDeletePrivateEndpointConnectionResponse]{ + Tracer: client.internal.Tracer(), + }) } } // DeletePrivateEndpointConnection - Description for Deletes a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *WebAppsClient) deletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *WebAppsClientBeginDeletePrivateEndpointConnectionOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginDeletePrivateEndpointConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deletePrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deletePrivateEndpointConnectionCreateRequest creates the DeletePrivateEndpointConnection request. @@ -4584,7 +5231,7 @@ func (client *WebAppsClient) deletePrivateEndpointConnectionCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -4593,7 +5240,7 @@ func (client *WebAppsClient) deletePrivateEndpointConnectionCreateRequest(ctx co // BeginDeletePrivateEndpointConnectionSlot - Description for Deletes a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the site. // - options - WebAppsClientBeginDeletePrivateEndpointConnectionSlotOptions contains the optional parameters for the WebAppsClient.BeginDeletePrivateEndpointConnectionSlot @@ -4604,29 +5251,40 @@ func (client *WebAppsClient) BeginDeletePrivateEndpointConnectionSlot(ctx contex if err != nil { return nil, err } - return runtime.NewPoller[WebAppsClientDeletePrivateEndpointConnectionSlotResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientDeletePrivateEndpointConnectionSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WebAppsClientDeletePrivateEndpointConnectionSlotResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientDeletePrivateEndpointConnectionSlotResponse]{ + Tracer: client.internal.Tracer(), + }) } } // DeletePrivateEndpointConnectionSlot - Description for Deletes a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *WebAppsClient) deletePrivateEndpointConnectionSlot(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, slot string, options *WebAppsClientBeginDeletePrivateEndpointConnectionSlotOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginDeletePrivateEndpointConnectionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deletePrivateEndpointConnectionSlotCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, slot, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // deletePrivateEndpointConnectionSlotCreateRequest creates the DeletePrivateEndpointConnectionSlot request. @@ -4657,7 +5315,7 @@ func (client *WebAppsClient) deletePrivateEndpointConnectionSlotCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -4667,22 +5325,28 @@ func (client *WebAppsClient) deletePrivateEndpointConnectionSlotCreateRequest(ct // instance in a web site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - processID - PID. // - options - WebAppsClientDeleteProcessOptions contains the optional parameters for the WebAppsClient.DeleteProcess method. func (client *WebAppsClient) DeleteProcess(ctx context.Context, resourceGroupName string, name string, processID string, options *WebAppsClientDeleteProcessOptions) (WebAppsClientDeleteProcessResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteProcess" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteProcessCreateRequest(ctx, resourceGroupName, name, processID, options) if err != nil { return WebAppsClientDeleteProcessResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeleteProcessResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientDeleteProcessResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteProcessResponse{}, err } return WebAppsClientDeleteProcessResponse{}, nil } @@ -4711,7 +5375,7 @@ func (client *WebAppsClient) deleteProcessCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -4721,7 +5385,7 @@ func (client *WebAppsClient) deleteProcessCreateRequest(ctx context.Context, res // instance in a web site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - processID - PID. @@ -4729,16 +5393,22 @@ func (client *WebAppsClient) deleteProcessCreateRequest(ctx context.Context, res // - options - WebAppsClientDeleteProcessSlotOptions contains the optional parameters for the WebAppsClient.DeleteProcessSlot // method. func (client *WebAppsClient) DeleteProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, options *WebAppsClientDeleteProcessSlotOptions) (WebAppsClientDeleteProcessSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteProcessSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteProcessSlotCreateRequest(ctx, resourceGroupName, name, processID, slot, options) if err != nil { return WebAppsClientDeleteProcessSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeleteProcessSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientDeleteProcessSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteProcessSlotResponse{}, err } return WebAppsClientDeleteProcessSlotResponse{}, nil } @@ -4771,7 +5441,7 @@ func (client *WebAppsClient) deleteProcessSlotCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -4780,23 +5450,29 @@ func (client *WebAppsClient) deleteProcessSlotCreateRequest(ctx context.Context, // DeletePublicCertificate - Description for Deletes a hostname binding for an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - publicCertificateName - Public certificate name. // - options - WebAppsClientDeletePublicCertificateOptions contains the optional parameters for the WebAppsClient.DeletePublicCertificate // method. func (client *WebAppsClient) DeletePublicCertificate(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, options *WebAppsClientDeletePublicCertificateOptions) (WebAppsClientDeletePublicCertificateResponse, error) { + var err error + const operationName = "WebAppsClient.DeletePublicCertificate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deletePublicCertificateCreateRequest(ctx, resourceGroupName, name, publicCertificateName, options) if err != nil { return WebAppsClientDeletePublicCertificateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeletePublicCertificateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientDeletePublicCertificateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeletePublicCertificateResponse{}, err } return WebAppsClientDeletePublicCertificateResponse{}, nil } @@ -4825,7 +5501,7 @@ func (client *WebAppsClient) deletePublicCertificateCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -4834,7 +5510,7 @@ func (client *WebAppsClient) deletePublicCertificateCreateRequest(ctx context.Co // DeletePublicCertificateSlot - Description for Deletes a hostname binding for an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. @@ -4842,16 +5518,22 @@ func (client *WebAppsClient) deletePublicCertificateCreateRequest(ctx context.Co // - options - WebAppsClientDeletePublicCertificateSlotOptions contains the optional parameters for the WebAppsClient.DeletePublicCertificateSlot // method. func (client *WebAppsClient) DeletePublicCertificateSlot(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string, options *WebAppsClientDeletePublicCertificateSlotOptions) (WebAppsClientDeletePublicCertificateSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeletePublicCertificateSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deletePublicCertificateSlotCreateRequest(ctx, resourceGroupName, name, slot, publicCertificateName, options) if err != nil { return WebAppsClientDeletePublicCertificateSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeletePublicCertificateSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientDeletePublicCertificateSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeletePublicCertificateSlotResponse{}, err } return WebAppsClientDeletePublicCertificateSlotResponse{}, nil } @@ -4884,7 +5566,7 @@ func (client *WebAppsClient) deletePublicCertificateSlotCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -4893,23 +5575,29 @@ func (client *WebAppsClient) deletePublicCertificateSlotCreateRequest(ctx contex // DeleteRelayServiceConnection - Description for Deletes a relay service connection by its name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - entityName - Name of the hybrid connection configuration. // - options - WebAppsClientDeleteRelayServiceConnectionOptions contains the optional parameters for the WebAppsClient.DeleteRelayServiceConnection // method. func (client *WebAppsClient) DeleteRelayServiceConnection(ctx context.Context, resourceGroupName string, name string, entityName string, options *WebAppsClientDeleteRelayServiceConnectionOptions) (WebAppsClientDeleteRelayServiceConnectionResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteRelayServiceConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteRelayServiceConnectionCreateRequest(ctx, resourceGroupName, name, entityName, options) if err != nil { return WebAppsClientDeleteRelayServiceConnectionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeleteRelayServiceConnectionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientDeleteRelayServiceConnectionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteRelayServiceConnectionResponse{}, err } return WebAppsClientDeleteRelayServiceConnectionResponse{}, nil } @@ -4938,7 +5626,7 @@ func (client *WebAppsClient) deleteRelayServiceConnectionCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -4947,7 +5635,7 @@ func (client *WebAppsClient) deleteRelayServiceConnectionCreateRequest(ctx conte // DeleteRelayServiceConnectionSlot - Description for Deletes a relay service connection by its name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - entityName - Name of the hybrid connection configuration. @@ -4956,16 +5644,22 @@ func (client *WebAppsClient) deleteRelayServiceConnectionCreateRequest(ctx conte // - options - WebAppsClientDeleteRelayServiceConnectionSlotOptions contains the optional parameters for the WebAppsClient.DeleteRelayServiceConnectionSlot // method. func (client *WebAppsClient) DeleteRelayServiceConnectionSlot(ctx context.Context, resourceGroupName string, name string, entityName string, slot string, options *WebAppsClientDeleteRelayServiceConnectionSlotOptions) (WebAppsClientDeleteRelayServiceConnectionSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteRelayServiceConnectionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteRelayServiceConnectionSlotCreateRequest(ctx, resourceGroupName, name, entityName, slot, options) if err != nil { return WebAppsClientDeleteRelayServiceConnectionSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeleteRelayServiceConnectionSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientDeleteRelayServiceConnectionSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteRelayServiceConnectionSlotResponse{}, err } return WebAppsClientDeleteRelayServiceConnectionSlotResponse{}, nil } @@ -4998,7 +5692,7 @@ func (client *WebAppsClient) deleteRelayServiceConnectionSlotCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -5007,23 +5701,29 @@ func (client *WebAppsClient) deleteRelayServiceConnectionSlotCreateRequest(ctx c // DeleteSiteExtension - Description for Remove a site extension from a web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - siteExtensionID - Site extension name. // - options - WebAppsClientDeleteSiteExtensionOptions contains the optional parameters for the WebAppsClient.DeleteSiteExtension // method. func (client *WebAppsClient) DeleteSiteExtension(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, options *WebAppsClientDeleteSiteExtensionOptions) (WebAppsClientDeleteSiteExtensionResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteSiteExtension" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteSiteExtensionCreateRequest(ctx, resourceGroupName, name, siteExtensionID, options) if err != nil { return WebAppsClientDeleteSiteExtensionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeleteSiteExtensionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientDeleteSiteExtensionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteSiteExtensionResponse{}, err } return WebAppsClientDeleteSiteExtensionResponse{}, nil } @@ -5052,7 +5752,7 @@ func (client *WebAppsClient) deleteSiteExtensionCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -5061,7 +5761,7 @@ func (client *WebAppsClient) deleteSiteExtensionCreateRequest(ctx context.Contex // DeleteSiteExtensionSlot - Description for Remove a site extension from a web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - siteExtensionID - Site extension name. @@ -5069,16 +5769,22 @@ func (client *WebAppsClient) deleteSiteExtensionCreateRequest(ctx context.Contex // - options - WebAppsClientDeleteSiteExtensionSlotOptions contains the optional parameters for the WebAppsClient.DeleteSiteExtensionSlot // method. func (client *WebAppsClient) DeleteSiteExtensionSlot(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string, options *WebAppsClientDeleteSiteExtensionSlotOptions) (WebAppsClientDeleteSiteExtensionSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteSiteExtensionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteSiteExtensionSlotCreateRequest(ctx, resourceGroupName, name, siteExtensionID, slot, options) if err != nil { return WebAppsClientDeleteSiteExtensionSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeleteSiteExtensionSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientDeleteSiteExtensionSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteSiteExtensionSlotResponse{}, err } return WebAppsClientDeleteSiteExtensionSlotResponse{}, nil } @@ -5111,7 +5817,7 @@ func (client *WebAppsClient) deleteSiteExtensionSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -5120,22 +5826,28 @@ func (client *WebAppsClient) deleteSiteExtensionSlotCreateRequest(ctx context.Co // DeleteSlot - Description for Deletes a web, mobile, or API app, or one of the deployment slots. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app to delete. // - slot - Name of the deployment slot to delete. By default, the API deletes the production slot. // - options - WebAppsClientDeleteSlotOptions contains the optional parameters for the WebAppsClient.DeleteSlot method. func (client *WebAppsClient) DeleteSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientDeleteSlotOptions) (WebAppsClientDeleteSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientDeleteSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeleteSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientDeleteSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteSlotResponse{}, err } return WebAppsClientDeleteSlotResponse{}, nil } @@ -5170,7 +5882,7 @@ func (client *WebAppsClient) deleteSlotCreateRequest(ctx context.Context, resour if options != nil && options.DeleteEmptyServerFarm != nil { reqQP.Set("deleteEmptyServerFarm", strconv.FormatBool(*options.DeleteEmptyServerFarm)) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -5179,22 +5891,28 @@ func (client *WebAppsClient) deleteSlotCreateRequest(ctx context.Context, resour // DeleteSourceControl - Description for Deletes the source control configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientDeleteSourceControlOptions contains the optional parameters for the WebAppsClient.DeleteSourceControl // method. func (client *WebAppsClient) DeleteSourceControl(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientDeleteSourceControlOptions) (WebAppsClientDeleteSourceControlResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteSourceControl" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteSourceControlCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientDeleteSourceControlResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeleteSourceControlResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return WebAppsClientDeleteSourceControlResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteSourceControlResponse{}, err } return WebAppsClientDeleteSourceControlResponse{}, nil } @@ -5222,7 +5940,7 @@ func (client *WebAppsClient) deleteSourceControlCreateRequest(ctx context.Contex if options != nil && options.AdditionalFlags != nil { reqQP.Set("additionalFlags", *options.AdditionalFlags) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -5231,7 +5949,7 @@ func (client *WebAppsClient) deleteSourceControlCreateRequest(ctx context.Contex // DeleteSourceControlSlot - Description for Deletes the source control configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will delete the source control configuration for @@ -5239,16 +5957,22 @@ func (client *WebAppsClient) deleteSourceControlCreateRequest(ctx context.Contex // - options - WebAppsClientDeleteSourceControlSlotOptions contains the optional parameters for the WebAppsClient.DeleteSourceControlSlot // method. func (client *WebAppsClient) DeleteSourceControlSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientDeleteSourceControlSlotOptions) (WebAppsClientDeleteSourceControlSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteSourceControlSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteSourceControlSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientDeleteSourceControlSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeleteSourceControlSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return WebAppsClientDeleteSourceControlSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteSourceControlSlotResponse{}, err } return WebAppsClientDeleteSourceControlSlotResponse{}, nil } @@ -5280,7 +6004,7 @@ func (client *WebAppsClient) deleteSourceControlSlotCreateRequest(ctx context.Co if options != nil && options.AdditionalFlags != nil { reqQP.Set("additionalFlags", *options.AdditionalFlags) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -5289,22 +6013,28 @@ func (client *WebAppsClient) deleteSourceControlSlotCreateRequest(ctx context.Co // DeleteSwiftVirtualNetwork - Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientDeleteSwiftVirtualNetworkOptions contains the optional parameters for the WebAppsClient.DeleteSwiftVirtualNetwork // method. func (client *WebAppsClient) DeleteSwiftVirtualNetwork(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientDeleteSwiftVirtualNetworkOptions) (WebAppsClientDeleteSwiftVirtualNetworkResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteSwiftVirtualNetwork" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteSwiftVirtualNetworkCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientDeleteSwiftVirtualNetworkResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeleteSwiftVirtualNetworkResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientDeleteSwiftVirtualNetworkResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteSwiftVirtualNetworkResponse{}, err } return WebAppsClientDeleteSwiftVirtualNetworkResponse{}, nil } @@ -5329,7 +6059,7 @@ func (client *WebAppsClient) deleteSwiftVirtualNetworkCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -5338,23 +6068,29 @@ func (client *WebAppsClient) deleteSwiftVirtualNetworkCreateRequest(ctx context. // DeleteSwiftVirtualNetworkSlot - Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will delete the connection for the production slot. // - options - WebAppsClientDeleteSwiftVirtualNetworkSlotOptions contains the optional parameters for the WebAppsClient.DeleteSwiftVirtualNetworkSlot // method. func (client *WebAppsClient) DeleteSwiftVirtualNetworkSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientDeleteSwiftVirtualNetworkSlotOptions) (WebAppsClientDeleteSwiftVirtualNetworkSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteSwiftVirtualNetworkSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteSwiftVirtualNetworkSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientDeleteSwiftVirtualNetworkSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeleteSwiftVirtualNetworkSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientDeleteSwiftVirtualNetworkSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteSwiftVirtualNetworkSlotResponse{}, err } return WebAppsClientDeleteSwiftVirtualNetworkSlotResponse{}, nil } @@ -5383,7 +6119,7 @@ func (client *WebAppsClient) deleteSwiftVirtualNetworkSlotCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -5392,23 +6128,29 @@ func (client *WebAppsClient) deleteSwiftVirtualNetworkSlotCreateRequest(ctx cont // DeleteTriggeredWebJob - Description for Delete a triggered web job by its ID for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - webJobName - Name of Web Job. // - options - WebAppsClientDeleteTriggeredWebJobOptions contains the optional parameters for the WebAppsClient.DeleteTriggeredWebJob // method. func (client *WebAppsClient) DeleteTriggeredWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientDeleteTriggeredWebJobOptions) (WebAppsClientDeleteTriggeredWebJobResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteTriggeredWebJob" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteTriggeredWebJobCreateRequest(ctx, resourceGroupName, name, webJobName, options) if err != nil { return WebAppsClientDeleteTriggeredWebJobResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeleteTriggeredWebJobResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientDeleteTriggeredWebJobResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteTriggeredWebJobResponse{}, err } return WebAppsClientDeleteTriggeredWebJobResponse{}, nil } @@ -5437,7 +6179,7 @@ func (client *WebAppsClient) deleteTriggeredWebJobCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -5446,7 +6188,7 @@ func (client *WebAppsClient) deleteTriggeredWebJobCreateRequest(ctx context.Cont // DeleteTriggeredWebJobSlot - Description for Delete a triggered web job by its ID for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - webJobName - Name of Web Job. @@ -5454,16 +6196,22 @@ func (client *WebAppsClient) deleteTriggeredWebJobCreateRequest(ctx context.Cont // - options - WebAppsClientDeleteTriggeredWebJobSlotOptions contains the optional parameters for the WebAppsClient.DeleteTriggeredWebJobSlot // method. func (client *WebAppsClient) DeleteTriggeredWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientDeleteTriggeredWebJobSlotOptions) (WebAppsClientDeleteTriggeredWebJobSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteTriggeredWebJobSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteTriggeredWebJobSlotCreateRequest(ctx, resourceGroupName, name, webJobName, slot, options) if err != nil { return WebAppsClientDeleteTriggeredWebJobSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeleteTriggeredWebJobSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientDeleteTriggeredWebJobSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteTriggeredWebJobSlotResponse{}, err } return WebAppsClientDeleteTriggeredWebJobSlotResponse{}, nil } @@ -5496,7 +6244,7 @@ func (client *WebAppsClient) deleteTriggeredWebJobSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -5505,23 +6253,29 @@ func (client *WebAppsClient) deleteTriggeredWebJobSlotCreateRequest(ctx context. // DeleteVnetConnection - Description for Deletes a connection from an app (or deployment slot to a named virtual network. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - vnetName - Name of the virtual network. // - options - WebAppsClientDeleteVnetConnectionOptions contains the optional parameters for the WebAppsClient.DeleteVnetConnection // method. func (client *WebAppsClient) DeleteVnetConnection(ctx context.Context, resourceGroupName string, name string, vnetName string, options *WebAppsClientDeleteVnetConnectionOptions) (WebAppsClientDeleteVnetConnectionResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteVnetConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteVnetConnectionCreateRequest(ctx, resourceGroupName, name, vnetName, options) if err != nil { return WebAppsClientDeleteVnetConnectionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeleteVnetConnectionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientDeleteVnetConnectionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteVnetConnectionResponse{}, err } return WebAppsClientDeleteVnetConnectionResponse{}, nil } @@ -5550,7 +6304,7 @@ func (client *WebAppsClient) deleteVnetConnectionCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -5559,7 +6313,7 @@ func (client *WebAppsClient) deleteVnetConnectionCreateRequest(ctx context.Conte // DeleteVnetConnectionSlot - Description for Deletes a connection from an app (or deployment slot to a named virtual network. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - vnetName - Name of the virtual network. @@ -5567,16 +6321,22 @@ func (client *WebAppsClient) deleteVnetConnectionCreateRequest(ctx context.Conte // - options - WebAppsClientDeleteVnetConnectionSlotOptions contains the optional parameters for the WebAppsClient.DeleteVnetConnectionSlot // method. func (client *WebAppsClient) DeleteVnetConnectionSlot(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string, options *WebAppsClientDeleteVnetConnectionSlotOptions) (WebAppsClientDeleteVnetConnectionSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeleteVnetConnectionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deleteVnetConnectionSlotCreateRequest(ctx, resourceGroupName, name, vnetName, slot, options) if err != nil { return WebAppsClientDeleteVnetConnectionSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeleteVnetConnectionSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientDeleteVnetConnectionSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeleteVnetConnectionSlotResponse{}, err } return WebAppsClientDeleteVnetConnectionSlotResponse{}, nil } @@ -5609,7 +6369,7 @@ func (client *WebAppsClient) deleteVnetConnectionSlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -5618,22 +6378,28 @@ func (client *WebAppsClient) deleteVnetConnectionSlotCreateRequest(ctx context.C // DeployWorkflowArtifacts - Description for Creates the artifacts for web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - options - WebAppsClientDeployWorkflowArtifactsOptions contains the optional parameters for the WebAppsClient.DeployWorkflowArtifacts // method. func (client *WebAppsClient) DeployWorkflowArtifacts(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientDeployWorkflowArtifactsOptions) (WebAppsClientDeployWorkflowArtifactsResponse, error) { + var err error + const operationName = "WebAppsClient.DeployWorkflowArtifacts" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deployWorkflowArtifactsCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientDeployWorkflowArtifactsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeployWorkflowArtifactsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientDeployWorkflowArtifactsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeployWorkflowArtifactsResponse{}, err } return WebAppsClientDeployWorkflowArtifactsResponse{}, nil } @@ -5658,11 +6424,14 @@ func (client *WebAppsClient) deployWorkflowArtifactsCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.WorkflowArtifacts != nil { - return req, runtime.MarshalAsJSON(req, *options.WorkflowArtifacts) + if err := runtime.MarshalAsJSON(req, *options.WorkflowArtifacts); err != nil { + return nil, err + } + return req, nil } return req, nil } @@ -5670,23 +6439,29 @@ func (client *WebAppsClient) deployWorkflowArtifactsCreateRequest(ctx context.Co // DeployWorkflowArtifactsSlot - Description for Creates the artifacts for web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - slot - Name of the deployment slot. // - options - WebAppsClientDeployWorkflowArtifactsSlotOptions contains the optional parameters for the WebAppsClient.DeployWorkflowArtifactsSlot // method. func (client *WebAppsClient) DeployWorkflowArtifactsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientDeployWorkflowArtifactsSlotOptions) (WebAppsClientDeployWorkflowArtifactsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DeployWorkflowArtifactsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.deployWorkflowArtifactsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientDeployWorkflowArtifactsSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDeployWorkflowArtifactsSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientDeployWorkflowArtifactsSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDeployWorkflowArtifactsSlotResponse{}, err } return WebAppsClientDeployWorkflowArtifactsSlotResponse{}, nil } @@ -5715,11 +6490,14 @@ func (client *WebAppsClient) deployWorkflowArtifactsSlotCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.WorkflowArtifacts != nil { - return req, runtime.MarshalAsJSON(req, *options.WorkflowArtifacts) + if err := runtime.MarshalAsJSON(req, *options.WorkflowArtifacts); err != nil { + return nil, err + } + return req, nil } return req, nil } @@ -5728,24 +6506,31 @@ func (client *WebAppsClient) deployWorkflowArtifactsSlotCreateRequest(ctx contex // this to get information about the databases stored in a backup. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - request - A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. // - options - WebAppsClientDiscoverBackupOptions contains the optional parameters for the WebAppsClient.DiscoverBackup method. func (client *WebAppsClient) DiscoverBackup(ctx context.Context, resourceGroupName string, name string, request RestoreRequest, options *WebAppsClientDiscoverBackupOptions) (WebAppsClientDiscoverBackupResponse, error) { + var err error + const operationName = "WebAppsClient.DiscoverBackup" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.discoverBackupCreateRequest(ctx, resourceGroupName, name, request, options) if err != nil { return WebAppsClientDiscoverBackupResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDiscoverBackupResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientDiscoverBackupResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDiscoverBackupResponse{}, err } - return client.discoverBackupHandleResponse(resp) + resp, err := client.discoverBackupHandleResponse(httpResp) + return resp, err } // discoverBackupCreateRequest creates the DiscoverBackup request. @@ -5768,10 +6553,13 @@ func (client *WebAppsClient) discoverBackupCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, request) + if err := runtime.MarshalAsJSON(req, request); err != nil { + return nil, err + } + return req, nil } // discoverBackupHandleResponse handles the DiscoverBackup response. @@ -5787,7 +6575,7 @@ func (client *WebAppsClient) discoverBackupHandleResponse(resp *http.Response) ( // Use this to get information about the databases stored in a backup. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will perform discovery for the production slot. @@ -5795,18 +6583,25 @@ func (client *WebAppsClient) discoverBackupHandleResponse(resp *http.Response) ( // - options - WebAppsClientDiscoverBackupSlotOptions contains the optional parameters for the WebAppsClient.DiscoverBackupSlot // method. func (client *WebAppsClient) DiscoverBackupSlot(ctx context.Context, resourceGroupName string, name string, slot string, request RestoreRequest, options *WebAppsClientDiscoverBackupSlotOptions) (WebAppsClientDiscoverBackupSlotResponse, error) { + var err error + const operationName = "WebAppsClient.DiscoverBackupSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.discoverBackupSlotCreateRequest(ctx, resourceGroupName, name, slot, request, options) if err != nil { return WebAppsClientDiscoverBackupSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientDiscoverBackupSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientDiscoverBackupSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientDiscoverBackupSlotResponse{}, err } - return client.discoverBackupSlotHandleResponse(resp) + resp, err := client.discoverBackupSlotHandleResponse(httpResp) + return resp, err } // discoverBackupSlotCreateRequest creates the DiscoverBackupSlot request. @@ -5833,10 +6628,13 @@ func (client *WebAppsClient) discoverBackupSlotCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, request) + if err := runtime.MarshalAsJSON(req, request); err != nil { + return nil, err + } + return req, nil } // discoverBackupSlotHandleResponse handles the DiscoverBackupSlot response. @@ -5852,22 +6650,28 @@ func (client *WebAppsClient) discoverBackupSlotHandleResponse(resp *http.Respons // if specified). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientGenerateNewSitePublishingPasswordOptions contains the optional parameters for the WebAppsClient.GenerateNewSitePublishingPassword // method. func (client *WebAppsClient) GenerateNewSitePublishingPassword(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGenerateNewSitePublishingPasswordOptions) (WebAppsClientGenerateNewSitePublishingPasswordResponse, error) { + var err error + const operationName = "WebAppsClient.GenerateNewSitePublishingPassword" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.generateNewSitePublishingPasswordCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientGenerateNewSitePublishingPasswordResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGenerateNewSitePublishingPasswordResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientGenerateNewSitePublishingPasswordResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGenerateNewSitePublishingPasswordResponse{}, err } return WebAppsClientGenerateNewSitePublishingPasswordResponse{}, nil } @@ -5892,7 +6696,7 @@ func (client *WebAppsClient) generateNewSitePublishingPasswordCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -5902,7 +6706,7 @@ func (client *WebAppsClient) generateNewSitePublishingPasswordCreateRequest(ctx // if specified). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API generate a new publishing password for the production @@ -5910,16 +6714,22 @@ func (client *WebAppsClient) generateNewSitePublishingPasswordCreateRequest(ctx // - options - WebAppsClientGenerateNewSitePublishingPasswordSlotOptions contains the optional parameters for the WebAppsClient.GenerateNewSitePublishingPasswordSlot // method. func (client *WebAppsClient) GenerateNewSitePublishingPasswordSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGenerateNewSitePublishingPasswordSlotOptions) (WebAppsClientGenerateNewSitePublishingPasswordSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GenerateNewSitePublishingPasswordSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.generateNewSitePublishingPasswordSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientGenerateNewSitePublishingPasswordSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGenerateNewSitePublishingPasswordSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientGenerateNewSitePublishingPasswordSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGenerateNewSitePublishingPasswordSlotResponse{}, err } return WebAppsClientGenerateNewSitePublishingPasswordSlotResponse{}, nil } @@ -5948,7 +6758,7 @@ func (client *WebAppsClient) generateNewSitePublishingPasswordSlotCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -5957,23 +6767,30 @@ func (client *WebAppsClient) generateNewSitePublishingPasswordSlotCreateRequest( // Get - Description for Gets the details of a web, mobile, or API app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientGetOptions contains the optional parameters for the WebAppsClient.Get method. func (client *WebAppsClient) Get(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetOptions) (WebAppsClientGetResponse, error) { + var err error + const operationName = "WebAppsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -5996,7 +6813,7 @@ func (client *WebAppsClient) getCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6014,25 +6831,32 @@ func (client *WebAppsClient) getHandleResponse(resp *http.Response) (WebAppsClie // GetAppSettingKeyVaultReference - Description for Gets the config reference and status of an app // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - appSettingKey - App Setting key name. // - options - WebAppsClientGetAppSettingKeyVaultReferenceOptions contains the optional parameters for the WebAppsClient.GetAppSettingKeyVaultReference // method. func (client *WebAppsClient) GetAppSettingKeyVaultReference(ctx context.Context, resourceGroupName string, name string, appSettingKey string, options *WebAppsClientGetAppSettingKeyVaultReferenceOptions) (WebAppsClientGetAppSettingKeyVaultReferenceResponse, error) { + var err error + const operationName = "WebAppsClient.GetAppSettingKeyVaultReference" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getAppSettingKeyVaultReferenceCreateRequest(ctx, resourceGroupName, name, appSettingKey, options) if err != nil { return WebAppsClientGetAppSettingKeyVaultReferenceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetAppSettingKeyVaultReferenceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetAppSettingKeyVaultReferenceResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetAppSettingKeyVaultReferenceResponse{}, err } - return client.getAppSettingKeyVaultReferenceHandleResponse(resp) + resp, err := client.getAppSettingKeyVaultReferenceHandleResponse(httpResp) + return resp, err } // getAppSettingKeyVaultReferenceCreateRequest creates the GetAppSettingKeyVaultReference request. @@ -6059,7 +6883,7 @@ func (client *WebAppsClient) getAppSettingKeyVaultReferenceCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6077,25 +6901,32 @@ func (client *WebAppsClient) getAppSettingKeyVaultReferenceHandleResponse(resp * // GetAppSettingKeyVaultReferenceSlot - Description for Gets the config reference and status of an app // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - appSettingKey - App Setting key name. // - options - WebAppsClientGetAppSettingKeyVaultReferenceSlotOptions contains the optional parameters for the WebAppsClient.GetAppSettingKeyVaultReferenceSlot // method. func (client *WebAppsClient) GetAppSettingKeyVaultReferenceSlot(ctx context.Context, resourceGroupName string, name string, appSettingKey string, slot string, options *WebAppsClientGetAppSettingKeyVaultReferenceSlotOptions) (WebAppsClientGetAppSettingKeyVaultReferenceSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetAppSettingKeyVaultReferenceSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getAppSettingKeyVaultReferenceSlotCreateRequest(ctx, resourceGroupName, name, appSettingKey, slot, options) if err != nil { return WebAppsClientGetAppSettingKeyVaultReferenceSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetAppSettingKeyVaultReferenceSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetAppSettingKeyVaultReferenceSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetAppSettingKeyVaultReferenceSlotResponse{}, err } - return client.getAppSettingKeyVaultReferenceSlotHandleResponse(resp) + resp, err := client.getAppSettingKeyVaultReferenceSlotHandleResponse(httpResp) + return resp, err } // getAppSettingKeyVaultReferenceSlotCreateRequest creates the GetAppSettingKeyVaultReferenceSlot request. @@ -6126,7 +6957,7 @@ func (client *WebAppsClient) getAppSettingKeyVaultReferenceSlotCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6143,7 +6974,7 @@ func (client *WebAppsClient) getAppSettingKeyVaultReferenceSlotHandleResponse(re // NewGetAppSettingsKeyVaultReferencesPager - Description for Gets the config reference app settings and status of an app // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientGetAppSettingsKeyVaultReferencesOptions contains the optional parameters for the WebAppsClient.NewGetAppSettingsKeyVaultReferencesPager @@ -6154,25 +6985,20 @@ func (client *WebAppsClient) NewGetAppSettingsKeyVaultReferencesPager(resourceGr return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientGetAppSettingsKeyVaultReferencesResponse) (WebAppsClientGetAppSettingsKeyVaultReferencesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getAppSettingsKeyVaultReferencesCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientGetAppSettingsKeyVaultReferencesResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewGetAppSettingsKeyVaultReferencesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getAppSettingsKeyVaultReferencesCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return WebAppsClientGetAppSettingsKeyVaultReferencesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetAppSettingsKeyVaultReferencesResponse{}, runtime.NewResponseError(resp) - } return client.getAppSettingsKeyVaultReferencesHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -6196,7 +7022,7 @@ func (client *WebAppsClient) getAppSettingsKeyVaultReferencesCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6214,7 +7040,7 @@ func (client *WebAppsClient) getAppSettingsKeyVaultReferencesHandleResponse(resp // NewGetAppSettingsKeyVaultReferencesSlotPager - Description for Gets the config reference app settings and status of an // app // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientGetAppSettingsKeyVaultReferencesSlotOptions contains the optional parameters for the WebAppsClient.NewGetAppSettingsKeyVaultReferencesSlotPager @@ -6225,25 +7051,20 @@ func (client *WebAppsClient) NewGetAppSettingsKeyVaultReferencesSlotPager(resour return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse) (WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getAppSettingsKeyVaultReferencesSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewGetAppSettingsKeyVaultReferencesSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getAppSettingsKeyVaultReferencesSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) if err != nil { return WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetAppSettingsKeyVaultReferencesSlotResponse{}, runtime.NewResponseError(resp) - } return client.getAppSettingsKeyVaultReferencesSlotHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -6271,7 +7092,7 @@ func (client *WebAppsClient) getAppSettingsKeyVaultReferencesSlotCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6289,23 +7110,30 @@ func (client *WebAppsClient) getAppSettingsKeyVaultReferencesSlotHandleResponse( // GetAuthSettings - Description for Gets the Authentication/Authorization settings of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientGetAuthSettingsOptions contains the optional parameters for the WebAppsClient.GetAuthSettings method. func (client *WebAppsClient) GetAuthSettings(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetAuthSettingsOptions) (WebAppsClientGetAuthSettingsResponse, error) { + var err error + const operationName = "WebAppsClient.GetAuthSettings" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getAuthSettingsCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientGetAuthSettingsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetAuthSettingsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetAuthSettingsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetAuthSettingsResponse{}, err } - return client.getAuthSettingsHandleResponse(resp) + resp, err := client.getAuthSettingsHandleResponse(httpResp) + return resp, err } // getAuthSettingsCreateRequest creates the GetAuthSettings request. @@ -6328,7 +7156,7 @@ func (client *WebAppsClient) getAuthSettingsCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6346,25 +7174,32 @@ func (client *WebAppsClient) getAuthSettingsHandleResponse(resp *http.Response) // GetAuthSettingsSlot - Description for Gets the Authentication/Authorization settings of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will get the settings for the production slot. // - options - WebAppsClientGetAuthSettingsSlotOptions contains the optional parameters for the WebAppsClient.GetAuthSettingsSlot // method. func (client *WebAppsClient) GetAuthSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetAuthSettingsSlotOptions) (WebAppsClientGetAuthSettingsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetAuthSettingsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getAuthSettingsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientGetAuthSettingsSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetAuthSettingsSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetAuthSettingsSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetAuthSettingsSlotResponse{}, err } - return client.getAuthSettingsSlotHandleResponse(resp) + resp, err := client.getAuthSettingsSlotHandleResponse(httpResp) + return resp, err } // getAuthSettingsSlotCreateRequest creates the GetAuthSettingsSlot request. @@ -6391,7 +7226,7 @@ func (client *WebAppsClient) getAuthSettingsSlotCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6409,24 +7244,31 @@ func (client *WebAppsClient) getAuthSettingsSlotHandleResponse(resp *http.Respon // GetAuthSettingsV2 - Description for Gets site's Authentication / Authorization settings for apps via the V2 format // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientGetAuthSettingsV2Options contains the optional parameters for the WebAppsClient.GetAuthSettingsV2 // method. func (client *WebAppsClient) GetAuthSettingsV2(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetAuthSettingsV2Options) (WebAppsClientGetAuthSettingsV2Response, error) { + var err error + const operationName = "WebAppsClient.GetAuthSettingsV2" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getAuthSettingsV2CreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientGetAuthSettingsV2Response{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetAuthSettingsV2Response{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetAuthSettingsV2Response{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetAuthSettingsV2Response{}, err } - return client.getAuthSettingsV2HandleResponse(resp) + resp, err := client.getAuthSettingsV2HandleResponse(httpResp) + return resp, err } // getAuthSettingsV2CreateRequest creates the GetAuthSettingsV2 request. @@ -6449,7 +7291,7 @@ func (client *WebAppsClient) getAuthSettingsV2CreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6467,25 +7309,32 @@ func (client *WebAppsClient) getAuthSettingsV2HandleResponse(resp *http.Response // GetAuthSettingsV2Slot - Description for Gets site's Authentication / Authorization settings for apps via the V2 format // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will get the settings for the production slot. // - options - WebAppsClientGetAuthSettingsV2SlotOptions contains the optional parameters for the WebAppsClient.GetAuthSettingsV2Slot // method. func (client *WebAppsClient) GetAuthSettingsV2Slot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetAuthSettingsV2SlotOptions) (WebAppsClientGetAuthSettingsV2SlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetAuthSettingsV2Slot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getAuthSettingsV2SlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientGetAuthSettingsV2SlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetAuthSettingsV2SlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetAuthSettingsV2SlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetAuthSettingsV2SlotResponse{}, err } - return client.getAuthSettingsV2SlotHandleResponse(resp) + resp, err := client.getAuthSettingsV2SlotHandleResponse(httpResp) + return resp, err } // getAuthSettingsV2SlotCreateRequest creates the GetAuthSettingsV2Slot request. @@ -6512,7 +7361,7 @@ func (client *WebAppsClient) getAuthSettingsV2SlotCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6531,24 +7380,31 @@ func (client *WebAppsClient) getAuthSettingsV2SlotHandleResponse(resp *http.Resp // V2 format // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientGetAuthSettingsV2WithoutSecretsOptions contains the optional parameters for the WebAppsClient.GetAuthSettingsV2WithoutSecrets // method. func (client *WebAppsClient) GetAuthSettingsV2WithoutSecrets(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetAuthSettingsV2WithoutSecretsOptions) (WebAppsClientGetAuthSettingsV2WithoutSecretsResponse, error) { + var err error + const operationName = "WebAppsClient.GetAuthSettingsV2WithoutSecrets" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getAuthSettingsV2WithoutSecretsCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientGetAuthSettingsV2WithoutSecretsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetAuthSettingsV2WithoutSecretsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetAuthSettingsV2WithoutSecretsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetAuthSettingsV2WithoutSecretsResponse{}, err } - return client.getAuthSettingsV2WithoutSecretsHandleResponse(resp) + resp, err := client.getAuthSettingsV2WithoutSecretsHandleResponse(httpResp) + return resp, err } // getAuthSettingsV2WithoutSecretsCreateRequest creates the GetAuthSettingsV2WithoutSecrets request. @@ -6571,7 +7427,7 @@ func (client *WebAppsClient) getAuthSettingsV2WithoutSecretsCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6589,25 +7445,32 @@ func (client *WebAppsClient) getAuthSettingsV2WithoutSecretsHandleResponse(resp // GetAuthSettingsV2WithoutSecretsSlot - Gets site's Authentication / Authorization settings for apps via the V2 format // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will get the settings for the production slot. // - options - WebAppsClientGetAuthSettingsV2WithoutSecretsSlotOptions contains the optional parameters for the WebAppsClient.GetAuthSettingsV2WithoutSecretsSlot // method. func (client *WebAppsClient) GetAuthSettingsV2WithoutSecretsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetAuthSettingsV2WithoutSecretsSlotOptions) (WebAppsClientGetAuthSettingsV2WithoutSecretsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetAuthSettingsV2WithoutSecretsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getAuthSettingsV2WithoutSecretsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientGetAuthSettingsV2WithoutSecretsSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetAuthSettingsV2WithoutSecretsSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetAuthSettingsV2WithoutSecretsSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetAuthSettingsV2WithoutSecretsSlotResponse{}, err } - return client.getAuthSettingsV2WithoutSecretsSlotHandleResponse(resp) + resp, err := client.getAuthSettingsV2WithoutSecretsSlotHandleResponse(httpResp) + return resp, err } // getAuthSettingsV2WithoutSecretsSlotCreateRequest creates the GetAuthSettingsV2WithoutSecretsSlot request. @@ -6634,7 +7497,7 @@ func (client *WebAppsClient) getAuthSettingsV2WithoutSecretsSlotCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6652,24 +7515,31 @@ func (client *WebAppsClient) getAuthSettingsV2WithoutSecretsSlotHandleResponse(r // GetBackupConfiguration - Description for Gets the backup configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientGetBackupConfigurationOptions contains the optional parameters for the WebAppsClient.GetBackupConfiguration // method. func (client *WebAppsClient) GetBackupConfiguration(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetBackupConfigurationOptions) (WebAppsClientGetBackupConfigurationResponse, error) { + var err error + const operationName = "WebAppsClient.GetBackupConfiguration" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getBackupConfigurationCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientGetBackupConfigurationResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetBackupConfigurationResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetBackupConfigurationResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetBackupConfigurationResponse{}, err } - return client.getBackupConfigurationHandleResponse(resp) + resp, err := client.getBackupConfigurationHandleResponse(httpResp) + return resp, err } // getBackupConfigurationCreateRequest creates the GetBackupConfiguration request. @@ -6692,7 +7562,7 @@ func (client *WebAppsClient) getBackupConfigurationCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6710,7 +7580,7 @@ func (client *WebAppsClient) getBackupConfigurationHandleResponse(resp *http.Res // GetBackupConfigurationSlot - Description for Gets the backup configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will get the backup configuration for the production @@ -6718,18 +7588,25 @@ func (client *WebAppsClient) getBackupConfigurationHandleResponse(resp *http.Res // - options - WebAppsClientGetBackupConfigurationSlotOptions contains the optional parameters for the WebAppsClient.GetBackupConfigurationSlot // method. func (client *WebAppsClient) GetBackupConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetBackupConfigurationSlotOptions) (WebAppsClientGetBackupConfigurationSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetBackupConfigurationSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getBackupConfigurationSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientGetBackupConfigurationSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetBackupConfigurationSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetBackupConfigurationSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetBackupConfigurationSlotResponse{}, err } - return client.getBackupConfigurationSlotHandleResponse(resp) + resp, err := client.getBackupConfigurationSlotHandleResponse(httpResp) + return resp, err } // getBackupConfigurationSlotCreateRequest creates the GetBackupConfigurationSlot request. @@ -6756,7 +7633,7 @@ func (client *WebAppsClient) getBackupConfigurationSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6774,24 +7651,31 @@ func (client *WebAppsClient) getBackupConfigurationSlotHandleResponse(resp *http // GetBackupStatus - Description for Gets a backup of an app by its ID. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - backupID - ID of the backup. // - options - WebAppsClientGetBackupStatusOptions contains the optional parameters for the WebAppsClient.GetBackupStatus method. func (client *WebAppsClient) GetBackupStatus(ctx context.Context, resourceGroupName string, name string, backupID string, options *WebAppsClientGetBackupStatusOptions) (WebAppsClientGetBackupStatusResponse, error) { + var err error + const operationName = "WebAppsClient.GetBackupStatus" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getBackupStatusCreateRequest(ctx, resourceGroupName, name, backupID, options) if err != nil { return WebAppsClientGetBackupStatusResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetBackupStatusResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetBackupStatusResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetBackupStatusResponse{}, err } - return client.getBackupStatusHandleResponse(resp) + resp, err := client.getBackupStatusHandleResponse(httpResp) + return resp, err } // getBackupStatusCreateRequest creates the GetBackupStatus request. @@ -6818,7 +7702,7 @@ func (client *WebAppsClient) getBackupStatusCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6836,7 +7720,7 @@ func (client *WebAppsClient) getBackupStatusHandleResponse(resp *http.Response) // GetBackupStatusSlot - Description for Gets a backup of an app by its ID. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - backupID - ID of the backup. @@ -6844,18 +7728,25 @@ func (client *WebAppsClient) getBackupStatusHandleResponse(resp *http.Response) // - options - WebAppsClientGetBackupStatusSlotOptions contains the optional parameters for the WebAppsClient.GetBackupStatusSlot // method. func (client *WebAppsClient) GetBackupStatusSlot(ctx context.Context, resourceGroupName string, name string, backupID string, slot string, options *WebAppsClientGetBackupStatusSlotOptions) (WebAppsClientGetBackupStatusSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetBackupStatusSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getBackupStatusSlotCreateRequest(ctx, resourceGroupName, name, backupID, slot, options) if err != nil { return WebAppsClientGetBackupStatusSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetBackupStatusSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetBackupStatusSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetBackupStatusSlotResponse{}, err } - return client.getBackupStatusSlotHandleResponse(resp) + resp, err := client.getBackupStatusSlotHandleResponse(httpResp) + return resp, err } // getBackupStatusSlotCreateRequest creates the GetBackupStatusSlot request. @@ -6886,7 +7777,7 @@ func (client *WebAppsClient) getBackupStatusSlotCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6905,24 +7796,31 @@ func (client *WebAppsClient) getBackupStatusSlotHandleResponse(resp *http.Respon // virtual applications, Always On, etc. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientGetConfigurationOptions contains the optional parameters for the WebAppsClient.GetConfiguration // method. func (client *WebAppsClient) GetConfiguration(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetConfigurationOptions) (WebAppsClientGetConfigurationResponse, error) { + var err error + const operationName = "WebAppsClient.GetConfiguration" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getConfigurationCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientGetConfigurationResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetConfigurationResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetConfigurationResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetConfigurationResponse{}, err } - return client.getConfigurationHandleResponse(resp) + resp, err := client.getConfigurationHandleResponse(httpResp) + return resp, err } // getConfigurationCreateRequest creates the GetConfiguration request. @@ -6945,7 +7843,7 @@ func (client *WebAppsClient) getConfigurationCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -6964,25 +7862,32 @@ func (client *WebAppsClient) getConfigurationHandleResponse(resp *http.Response) // documents, virtual applications, Always On, etc. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. // - options - WebAppsClientGetConfigurationSlotOptions contains the optional parameters for the WebAppsClient.GetConfigurationSlot // method. func (client *WebAppsClient) GetConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetConfigurationSlotOptions) (WebAppsClientGetConfigurationSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetConfigurationSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getConfigurationSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientGetConfigurationSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetConfigurationSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetConfigurationSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetConfigurationSlotResponse{}, err } - return client.getConfigurationSlotHandleResponse(resp) + resp, err := client.getConfigurationSlotHandleResponse(httpResp) + return resp, err } // getConfigurationSlotCreateRequest creates the GetConfigurationSlot request. @@ -7009,7 +7914,7 @@ func (client *WebAppsClient) getConfigurationSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7027,25 +7932,32 @@ func (client *WebAppsClient) getConfigurationSlotHandleResponse(resp *http.Respo // GetConfigurationSnapshot - Description for Gets a snapshot of the configuration of an app at a previous point in time. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - snapshotID - The ID of the snapshot to read. // - options - WebAppsClientGetConfigurationSnapshotOptions contains the optional parameters for the WebAppsClient.GetConfigurationSnapshot // method. func (client *WebAppsClient) GetConfigurationSnapshot(ctx context.Context, resourceGroupName string, name string, snapshotID string, options *WebAppsClientGetConfigurationSnapshotOptions) (WebAppsClientGetConfigurationSnapshotResponse, error) { + var err error + const operationName = "WebAppsClient.GetConfigurationSnapshot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getConfigurationSnapshotCreateRequest(ctx, resourceGroupName, name, snapshotID, options) if err != nil { return WebAppsClientGetConfigurationSnapshotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetConfigurationSnapshotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetConfigurationSnapshotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetConfigurationSnapshotResponse{}, err } - return client.getConfigurationSnapshotHandleResponse(resp) + resp, err := client.getConfigurationSnapshotHandleResponse(httpResp) + return resp, err } // getConfigurationSnapshotCreateRequest creates the GetConfigurationSnapshot request. @@ -7072,7 +7984,7 @@ func (client *WebAppsClient) getConfigurationSnapshotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7090,7 +8002,7 @@ func (client *WebAppsClient) getConfigurationSnapshotHandleResponse(resp *http.R // GetConfigurationSnapshotSlot - Description for Gets a snapshot of the configuration of an app at a previous point in time. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - snapshotID - The ID of the snapshot to read. @@ -7098,18 +8010,25 @@ func (client *WebAppsClient) getConfigurationSnapshotHandleResponse(resp *http.R // - options - WebAppsClientGetConfigurationSnapshotSlotOptions contains the optional parameters for the WebAppsClient.GetConfigurationSnapshotSlot // method. func (client *WebAppsClient) GetConfigurationSnapshotSlot(ctx context.Context, resourceGroupName string, name string, snapshotID string, slot string, options *WebAppsClientGetConfigurationSnapshotSlotOptions) (WebAppsClientGetConfigurationSnapshotSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetConfigurationSnapshotSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getConfigurationSnapshotSlotCreateRequest(ctx, resourceGroupName, name, snapshotID, slot, options) if err != nil { return WebAppsClientGetConfigurationSnapshotSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetConfigurationSnapshotSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetConfigurationSnapshotSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetConfigurationSnapshotSlotResponse{}, err } - return client.getConfigurationSnapshotSlotHandleResponse(resp) + resp, err := client.getConfigurationSnapshotSlotHandleResponse(httpResp) + return resp, err } // getConfigurationSnapshotSlotCreateRequest creates the GetConfigurationSnapshotSlot request. @@ -7140,7 +8059,7 @@ func (client *WebAppsClient) getConfigurationSnapshotSlotCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7158,24 +8077,30 @@ func (client *WebAppsClient) getConfigurationSnapshotSlotHandleResponse(resp *ht // GetContainerLogsZip - Description for Gets the ZIP archived docker log files for the given site // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - options - WebAppsClientGetContainerLogsZipOptions contains the optional parameters for the WebAppsClient.GetContainerLogsZip // method. func (client *WebAppsClient) GetContainerLogsZip(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetContainerLogsZipOptions) (WebAppsClientGetContainerLogsZipResponse, error) { + var err error + const operationName = "WebAppsClient.GetContainerLogsZip" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getContainerLogsZipCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientGetContainerLogsZipResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetContainerLogsZipResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientGetContainerLogsZipResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetContainerLogsZipResponse{}, err } - return WebAppsClientGetContainerLogsZipResponse{Body: resp.Body}, nil + return WebAppsClientGetContainerLogsZipResponse{Body: httpResp.Body}, nil } // getContainerLogsZipCreateRequest creates the GetContainerLogsZip request. @@ -7198,7 +8123,7 @@ func (client *WebAppsClient) getContainerLogsZipCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() runtime.SkipBodyDownload(req) req.Raw().Header["Accept"] = []string{"application/zip"} @@ -7208,25 +8133,31 @@ func (client *WebAppsClient) getContainerLogsZipCreateRequest(ctx context.Contex // GetContainerLogsZipSlot - Description for Gets the ZIP archived docker log files for the given site // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - slot - Name of web app slot. If not specified then will default to production slot. // - options - WebAppsClientGetContainerLogsZipSlotOptions contains the optional parameters for the WebAppsClient.GetContainerLogsZipSlot // method. func (client *WebAppsClient) GetContainerLogsZipSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetContainerLogsZipSlotOptions) (WebAppsClientGetContainerLogsZipSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetContainerLogsZipSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getContainerLogsZipSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientGetContainerLogsZipSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetContainerLogsZipSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientGetContainerLogsZipSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetContainerLogsZipSlotResponse{}, err } - return WebAppsClientGetContainerLogsZipSlotResponse{Body: resp.Body}, nil + return WebAppsClientGetContainerLogsZipSlotResponse{Body: httpResp.Body}, nil } // getContainerLogsZipSlotCreateRequest creates the GetContainerLogsZipSlot request. @@ -7253,7 +8184,7 @@ func (client *WebAppsClient) getContainerLogsZipSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() runtime.SkipBodyDownload(req) req.Raw().Header["Accept"] = []string{"application/zip"} @@ -7263,25 +8194,32 @@ func (client *WebAppsClient) getContainerLogsZipSlotCreateRequest(ctx context.Co // GetContinuousWebJob - Description for Gets a continuous web job by its ID for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - webJobName - Name of Web Job. // - options - WebAppsClientGetContinuousWebJobOptions contains the optional parameters for the WebAppsClient.GetContinuousWebJob // method. func (client *WebAppsClient) GetContinuousWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientGetContinuousWebJobOptions) (WebAppsClientGetContinuousWebJobResponse, error) { + var err error + const operationName = "WebAppsClient.GetContinuousWebJob" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getContinuousWebJobCreateRequest(ctx, resourceGroupName, name, webJobName, options) if err != nil { return WebAppsClientGetContinuousWebJobResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetContinuousWebJobResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetContinuousWebJobResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetContinuousWebJobResponse{}, err } - return client.getContinuousWebJobHandleResponse(resp) + resp, err := client.getContinuousWebJobHandleResponse(httpResp) + return resp, err } // getContinuousWebJobCreateRequest creates the GetContinuousWebJob request. @@ -7308,7 +8246,7 @@ func (client *WebAppsClient) getContinuousWebJobCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7326,7 +8264,7 @@ func (client *WebAppsClient) getContinuousWebJobHandleResponse(resp *http.Respon // GetContinuousWebJobSlot - Description for Gets a continuous web job by its ID for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - webJobName - Name of Web Job. @@ -7334,18 +8272,25 @@ func (client *WebAppsClient) getContinuousWebJobHandleResponse(resp *http.Respon // - options - WebAppsClientGetContinuousWebJobSlotOptions contains the optional parameters for the WebAppsClient.GetContinuousWebJobSlot // method. func (client *WebAppsClient) GetContinuousWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientGetContinuousWebJobSlotOptions) (WebAppsClientGetContinuousWebJobSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetContinuousWebJobSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getContinuousWebJobSlotCreateRequest(ctx, resourceGroupName, name, webJobName, slot, options) if err != nil { return WebAppsClientGetContinuousWebJobSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetContinuousWebJobSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetContinuousWebJobSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetContinuousWebJobSlotResponse{}, err } - return client.getContinuousWebJobSlotHandleResponse(resp) + resp, err := client.getContinuousWebJobSlotHandleResponse(httpResp) + return resp, err } // getContinuousWebJobSlotCreateRequest creates the GetContinuousWebJobSlot request. @@ -7376,7 +8321,7 @@ func (client *WebAppsClient) getContinuousWebJobSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7394,24 +8339,31 @@ func (client *WebAppsClient) getContinuousWebJobSlotHandleResponse(resp *http.Re // GetDeployment - Description for Get a deployment by its ID for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - id - Deployment ID. // - options - WebAppsClientGetDeploymentOptions contains the optional parameters for the WebAppsClient.GetDeployment method. func (client *WebAppsClient) GetDeployment(ctx context.Context, resourceGroupName string, name string, id string, options *WebAppsClientGetDeploymentOptions) (WebAppsClientGetDeploymentResponse, error) { + var err error + const operationName = "WebAppsClient.GetDeployment" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getDeploymentCreateRequest(ctx, resourceGroupName, name, id, options) if err != nil { return WebAppsClientGetDeploymentResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetDeploymentResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetDeploymentResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetDeploymentResponse{}, err } - return client.getDeploymentHandleResponse(resp) + resp, err := client.getDeploymentHandleResponse(httpResp) + return resp, err } // getDeploymentCreateRequest creates the GetDeployment request. @@ -7438,7 +8390,7 @@ func (client *WebAppsClient) getDeploymentCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7456,7 +8408,7 @@ func (client *WebAppsClient) getDeploymentHandleResponse(resp *http.Response) (W // GetDeploymentSlot - Description for Get a deployment by its ID for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - id - Deployment ID. @@ -7464,18 +8416,25 @@ func (client *WebAppsClient) getDeploymentHandleResponse(resp *http.Response) (W // - options - WebAppsClientGetDeploymentSlotOptions contains the optional parameters for the WebAppsClient.GetDeploymentSlot // method. func (client *WebAppsClient) GetDeploymentSlot(ctx context.Context, resourceGroupName string, name string, id string, slot string, options *WebAppsClientGetDeploymentSlotOptions) (WebAppsClientGetDeploymentSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetDeploymentSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getDeploymentSlotCreateRequest(ctx, resourceGroupName, name, id, slot, options) if err != nil { return WebAppsClientGetDeploymentSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetDeploymentSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetDeploymentSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetDeploymentSlotResponse{}, err } - return client.getDeploymentSlotHandleResponse(resp) + resp, err := client.getDeploymentSlotHandleResponse(httpResp) + return resp, err } // getDeploymentSlotCreateRequest creates the GetDeploymentSlot request. @@ -7506,7 +8465,7 @@ func (client *WebAppsClient) getDeploymentSlotCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7524,24 +8483,31 @@ func (client *WebAppsClient) getDeploymentSlotHandleResponse(resp *http.Response // GetDiagnosticLogsConfiguration - Description for Gets the logging configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientGetDiagnosticLogsConfigurationOptions contains the optional parameters for the WebAppsClient.GetDiagnosticLogsConfiguration // method. func (client *WebAppsClient) GetDiagnosticLogsConfiguration(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetDiagnosticLogsConfigurationOptions) (WebAppsClientGetDiagnosticLogsConfigurationResponse, error) { + var err error + const operationName = "WebAppsClient.GetDiagnosticLogsConfiguration" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getDiagnosticLogsConfigurationCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientGetDiagnosticLogsConfigurationResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetDiagnosticLogsConfigurationResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetDiagnosticLogsConfigurationResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetDiagnosticLogsConfigurationResponse{}, err } - return client.getDiagnosticLogsConfigurationHandleResponse(resp) + resp, err := client.getDiagnosticLogsConfigurationHandleResponse(httpResp) + return resp, err } // getDiagnosticLogsConfigurationCreateRequest creates the GetDiagnosticLogsConfiguration request. @@ -7564,7 +8530,7 @@ func (client *WebAppsClient) getDiagnosticLogsConfigurationCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7582,7 +8548,7 @@ func (client *WebAppsClient) getDiagnosticLogsConfigurationHandleResponse(resp * // GetDiagnosticLogsConfigurationSlot - Description for Gets the logging configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will get the logging configuration for the production @@ -7590,18 +8556,25 @@ func (client *WebAppsClient) getDiagnosticLogsConfigurationHandleResponse(resp * // - options - WebAppsClientGetDiagnosticLogsConfigurationSlotOptions contains the optional parameters for the WebAppsClient.GetDiagnosticLogsConfigurationSlot // method. func (client *WebAppsClient) GetDiagnosticLogsConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetDiagnosticLogsConfigurationSlotOptions) (WebAppsClientGetDiagnosticLogsConfigurationSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetDiagnosticLogsConfigurationSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getDiagnosticLogsConfigurationSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientGetDiagnosticLogsConfigurationSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetDiagnosticLogsConfigurationSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetDiagnosticLogsConfigurationSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetDiagnosticLogsConfigurationSlotResponse{}, err } - return client.getDiagnosticLogsConfigurationSlotHandleResponse(resp) + resp, err := client.getDiagnosticLogsConfigurationSlotHandleResponse(httpResp) + return resp, err } // getDiagnosticLogsConfigurationSlotCreateRequest creates the GetDiagnosticLogsConfigurationSlot request. @@ -7628,7 +8601,7 @@ func (client *WebAppsClient) getDiagnosticLogsConfigurationSlotCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7646,25 +8619,32 @@ func (client *WebAppsClient) getDiagnosticLogsConfigurationSlotHandleResponse(re // GetDomainOwnershipIdentifier - Description for Get domain ownership identifier for web app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - domainOwnershipIdentifierName - Name of domain ownership identifier. // - options - WebAppsClientGetDomainOwnershipIdentifierOptions contains the optional parameters for the WebAppsClient.GetDomainOwnershipIdentifier // method. func (client *WebAppsClient) GetDomainOwnershipIdentifier(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, options *WebAppsClientGetDomainOwnershipIdentifierOptions) (WebAppsClientGetDomainOwnershipIdentifierResponse, error) { + var err error + const operationName = "WebAppsClient.GetDomainOwnershipIdentifier" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getDomainOwnershipIdentifierCreateRequest(ctx, resourceGroupName, name, domainOwnershipIdentifierName, options) if err != nil { return WebAppsClientGetDomainOwnershipIdentifierResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetDomainOwnershipIdentifierResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetDomainOwnershipIdentifierResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetDomainOwnershipIdentifierResponse{}, err } - return client.getDomainOwnershipIdentifierHandleResponse(resp) + resp, err := client.getDomainOwnershipIdentifierHandleResponse(httpResp) + return resp, err } // getDomainOwnershipIdentifierCreateRequest creates the GetDomainOwnershipIdentifier request. @@ -7691,7 +8671,7 @@ func (client *WebAppsClient) getDomainOwnershipIdentifierCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7709,7 +8689,7 @@ func (client *WebAppsClient) getDomainOwnershipIdentifierHandleResponse(resp *ht // GetDomainOwnershipIdentifierSlot - Description for Get domain ownership identifier for web app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - domainOwnershipIdentifierName - Name of domain ownership identifier. @@ -7717,18 +8697,25 @@ func (client *WebAppsClient) getDomainOwnershipIdentifierHandleResponse(resp *ht // - options - WebAppsClientGetDomainOwnershipIdentifierSlotOptions contains the optional parameters for the WebAppsClient.GetDomainOwnershipIdentifierSlot // method. func (client *WebAppsClient) GetDomainOwnershipIdentifierSlot(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string, options *WebAppsClientGetDomainOwnershipIdentifierSlotOptions) (WebAppsClientGetDomainOwnershipIdentifierSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetDomainOwnershipIdentifierSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getDomainOwnershipIdentifierSlotCreateRequest(ctx, resourceGroupName, name, domainOwnershipIdentifierName, slot, options) if err != nil { return WebAppsClientGetDomainOwnershipIdentifierSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetDomainOwnershipIdentifierSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetDomainOwnershipIdentifierSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetDomainOwnershipIdentifierSlotResponse{}, err } - return client.getDomainOwnershipIdentifierSlotHandleResponse(resp) + resp, err := client.getDomainOwnershipIdentifierSlotHandleResponse(httpResp) + return resp, err } // getDomainOwnershipIdentifierSlotCreateRequest creates the GetDomainOwnershipIdentifierSlot request. @@ -7759,7 +8746,7 @@ func (client *WebAppsClient) getDomainOwnershipIdentifierSlotCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7777,23 +8764,30 @@ func (client *WebAppsClient) getDomainOwnershipIdentifierSlotHandleResponse(resp // GetFtpAllowed - Description for Returns whether FTP is allowed on the site or not. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientGetFtpAllowedOptions contains the optional parameters for the WebAppsClient.GetFtpAllowed method. func (client *WebAppsClient) GetFtpAllowed(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetFtpAllowedOptions) (WebAppsClientGetFtpAllowedResponse, error) { + var err error + const operationName = "WebAppsClient.GetFtpAllowed" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getFtpAllowedCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientGetFtpAllowedResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetFtpAllowedResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetFtpAllowedResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetFtpAllowedResponse{}, err } - return client.getFtpAllowedHandleResponse(resp) + resp, err := client.getFtpAllowedHandleResponse(httpResp) + return resp, err } // getFtpAllowedCreateRequest creates the GetFtpAllowed request. @@ -7816,7 +8810,7 @@ func (client *WebAppsClient) getFtpAllowedCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7834,24 +8828,31 @@ func (client *WebAppsClient) getFtpAllowedHandleResponse(resp *http.Response) (W // GetFtpAllowedSlot - Description for Returns whether FTP is allowed on the site or not. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientGetFtpAllowedSlotOptions contains the optional parameters for the WebAppsClient.GetFtpAllowedSlot // method. func (client *WebAppsClient) GetFtpAllowedSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetFtpAllowedSlotOptions) (WebAppsClientGetFtpAllowedSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetFtpAllowedSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getFtpAllowedSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientGetFtpAllowedSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetFtpAllowedSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetFtpAllowedSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetFtpAllowedSlotResponse{}, err } - return client.getFtpAllowedSlotHandleResponse(resp) + resp, err := client.getFtpAllowedSlotHandleResponse(httpResp) + return resp, err } // getFtpAllowedSlotCreateRequest creates the GetFtpAllowedSlot request. @@ -7878,7 +8879,7 @@ func (client *WebAppsClient) getFtpAllowedSlotCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7896,24 +8897,31 @@ func (client *WebAppsClient) getFtpAllowedSlotHandleResponse(resp *http.Response // GetFunction - Description for Get function information by its ID for web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - functionName - Function name. // - options - WebAppsClientGetFunctionOptions contains the optional parameters for the WebAppsClient.GetFunction method. func (client *WebAppsClient) GetFunction(ctx context.Context, resourceGroupName string, name string, functionName string, options *WebAppsClientGetFunctionOptions) (WebAppsClientGetFunctionResponse, error) { + var err error + const operationName = "WebAppsClient.GetFunction" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getFunctionCreateRequest(ctx, resourceGroupName, name, functionName, options) if err != nil { return WebAppsClientGetFunctionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetFunctionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetFunctionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetFunctionResponse{}, err } - return client.getFunctionHandleResponse(resp) + resp, err := client.getFunctionHandleResponse(httpResp) + return resp, err } // getFunctionCreateRequest creates the GetFunction request. @@ -7940,7 +8948,7 @@ func (client *WebAppsClient) getFunctionCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -7958,24 +8966,31 @@ func (client *WebAppsClient) getFunctionHandleResponse(resp *http.Response) (Web // GetFunctionsAdminToken - Description for Fetch a short lived token that can be exchanged for a master key. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - options - WebAppsClientGetFunctionsAdminTokenOptions contains the optional parameters for the WebAppsClient.GetFunctionsAdminToken // method. func (client *WebAppsClient) GetFunctionsAdminToken(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetFunctionsAdminTokenOptions) (WebAppsClientGetFunctionsAdminTokenResponse, error) { + var err error + const operationName = "WebAppsClient.GetFunctionsAdminToken" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getFunctionsAdminTokenCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientGetFunctionsAdminTokenResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetFunctionsAdminTokenResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetFunctionsAdminTokenResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetFunctionsAdminTokenResponse{}, err } - return client.getFunctionsAdminTokenHandleResponse(resp) + resp, err := client.getFunctionsAdminTokenHandleResponse(httpResp) + return resp, err } // getFunctionsAdminTokenCreateRequest creates the GetFunctionsAdminToken request. @@ -7998,7 +9013,7 @@ func (client *WebAppsClient) getFunctionsAdminTokenCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8016,25 +9031,32 @@ func (client *WebAppsClient) getFunctionsAdminTokenHandleResponse(resp *http.Res // GetFunctionsAdminTokenSlot - Description for Fetch a short lived token that can be exchanged for a master key. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - slot - Name of web app slot. If not specified then will default to production slot. // - options - WebAppsClientGetFunctionsAdminTokenSlotOptions contains the optional parameters for the WebAppsClient.GetFunctionsAdminTokenSlot // method. func (client *WebAppsClient) GetFunctionsAdminTokenSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetFunctionsAdminTokenSlotOptions) (WebAppsClientGetFunctionsAdminTokenSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetFunctionsAdminTokenSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getFunctionsAdminTokenSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientGetFunctionsAdminTokenSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetFunctionsAdminTokenSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetFunctionsAdminTokenSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetFunctionsAdminTokenSlotResponse{}, err } - return client.getFunctionsAdminTokenSlotHandleResponse(resp) + resp, err := client.getFunctionsAdminTokenSlotHandleResponse(httpResp) + return resp, err } // getFunctionsAdminTokenSlotCreateRequest creates the GetFunctionsAdminTokenSlot request. @@ -8061,7 +9083,7 @@ func (client *WebAppsClient) getFunctionsAdminTokenSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8079,25 +9101,32 @@ func (client *WebAppsClient) getFunctionsAdminTokenSlotHandleResponse(resp *http // GetHostNameBinding - Description for Get the named hostname binding for an app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - hostName - Hostname in the hostname binding. // - options - WebAppsClientGetHostNameBindingOptions contains the optional parameters for the WebAppsClient.GetHostNameBinding // method. func (client *WebAppsClient) GetHostNameBinding(ctx context.Context, resourceGroupName string, name string, hostName string, options *WebAppsClientGetHostNameBindingOptions) (WebAppsClientGetHostNameBindingResponse, error) { + var err error + const operationName = "WebAppsClient.GetHostNameBinding" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getHostNameBindingCreateRequest(ctx, resourceGroupName, name, hostName, options) if err != nil { return WebAppsClientGetHostNameBindingResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetHostNameBindingResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetHostNameBindingResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetHostNameBindingResponse{}, err } - return client.getHostNameBindingHandleResponse(resp) + resp, err := client.getHostNameBindingHandleResponse(httpResp) + return resp, err } // getHostNameBindingCreateRequest creates the GetHostNameBinding request. @@ -8124,7 +9153,7 @@ func (client *WebAppsClient) getHostNameBindingCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8142,7 +9171,7 @@ func (client *WebAppsClient) getHostNameBindingHandleResponse(resp *http.Respons // GetHostNameBindingSlot - Description for Get the named hostname binding for an app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API the named binding for the production slot. @@ -8150,18 +9179,25 @@ func (client *WebAppsClient) getHostNameBindingHandleResponse(resp *http.Respons // - options - WebAppsClientGetHostNameBindingSlotOptions contains the optional parameters for the WebAppsClient.GetHostNameBindingSlot // method. func (client *WebAppsClient) GetHostNameBindingSlot(ctx context.Context, resourceGroupName string, name string, slot string, hostName string, options *WebAppsClientGetHostNameBindingSlotOptions) (WebAppsClientGetHostNameBindingSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetHostNameBindingSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getHostNameBindingSlotCreateRequest(ctx, resourceGroupName, name, slot, hostName, options) if err != nil { return WebAppsClientGetHostNameBindingSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetHostNameBindingSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetHostNameBindingSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetHostNameBindingSlotResponse{}, err } - return client.getHostNameBindingSlotHandleResponse(resp) + resp, err := client.getHostNameBindingSlotHandleResponse(httpResp) + return resp, err } // getHostNameBindingSlotCreateRequest creates the GetHostNameBindingSlot request. @@ -8192,7 +9228,7 @@ func (client *WebAppsClient) getHostNameBindingSlotCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8210,7 +9246,7 @@ func (client *WebAppsClient) getHostNameBindingSlotHandleResponse(resp *http.Res // GetHybridConnection - Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - The name of the web app. // - namespaceName - The namespace for this hybrid connection. @@ -8218,18 +9254,25 @@ func (client *WebAppsClient) getHostNameBindingSlotHandleResponse(resp *http.Res // - options - WebAppsClientGetHybridConnectionOptions contains the optional parameters for the WebAppsClient.GetHybridConnection // method. func (client *WebAppsClient) GetHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, options *WebAppsClientGetHybridConnectionOptions) (WebAppsClientGetHybridConnectionResponse, error) { + var err error + const operationName = "WebAppsClient.GetHybridConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getHybridConnectionCreateRequest(ctx, resourceGroupName, name, namespaceName, relayName, options) if err != nil { return WebAppsClientGetHybridConnectionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetHybridConnectionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetHybridConnectionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetHybridConnectionResponse{}, err } - return client.getHybridConnectionHandleResponse(resp) + resp, err := client.getHybridConnectionHandleResponse(httpResp) + return resp, err } // getHybridConnectionCreateRequest creates the GetHybridConnection request. @@ -8260,7 +9303,7 @@ func (client *WebAppsClient) getHybridConnectionCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8278,7 +9321,7 @@ func (client *WebAppsClient) getHybridConnectionHandleResponse(resp *http.Respon // GetHybridConnectionSlot - Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - The name of the web app. // - namespaceName - The namespace for this hybrid connection. @@ -8287,18 +9330,25 @@ func (client *WebAppsClient) getHybridConnectionHandleResponse(resp *http.Respon // - options - WebAppsClientGetHybridConnectionSlotOptions contains the optional parameters for the WebAppsClient.GetHybridConnectionSlot // method. func (client *WebAppsClient) GetHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string, options *WebAppsClientGetHybridConnectionSlotOptions) (WebAppsClientGetHybridConnectionSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetHybridConnectionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getHybridConnectionSlotCreateRequest(ctx, resourceGroupName, name, namespaceName, relayName, slot, options) if err != nil { return WebAppsClientGetHybridConnectionSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetHybridConnectionSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetHybridConnectionSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetHybridConnectionSlotResponse{}, err } - return client.getHybridConnectionSlotHandleResponse(resp) + resp, err := client.getHybridConnectionSlotHandleResponse(httpResp) + return resp, err } // getHybridConnectionSlotCreateRequest creates the GetHybridConnectionSlot request. @@ -8333,7 +9383,7 @@ func (client *WebAppsClient) getHybridConnectionSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8351,7 +9401,7 @@ func (client *WebAppsClient) getHybridConnectionSlotHandleResponse(resp *http.Re // GetInstanceFunctionSlot - Description for Get function information by its ID for web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - functionName - Function name. @@ -8359,18 +9409,25 @@ func (client *WebAppsClient) getHybridConnectionSlotHandleResponse(resp *http.Re // - options - WebAppsClientGetInstanceFunctionSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceFunctionSlot // method. func (client *WebAppsClient) GetInstanceFunctionSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, options *WebAppsClientGetInstanceFunctionSlotOptions) (WebAppsClientGetInstanceFunctionSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetInstanceFunctionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getInstanceFunctionSlotCreateRequest(ctx, resourceGroupName, name, functionName, slot, options) if err != nil { return WebAppsClientGetInstanceFunctionSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetInstanceFunctionSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetInstanceFunctionSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetInstanceFunctionSlotResponse{}, err } - return client.getInstanceFunctionSlotHandleResponse(resp) + resp, err := client.getInstanceFunctionSlotHandleResponse(httpResp) + return resp, err } // getInstanceFunctionSlotCreateRequest creates the GetInstanceFunctionSlot request. @@ -8401,7 +9458,7 @@ func (client *WebAppsClient) getInstanceFunctionSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8419,23 +9476,30 @@ func (client *WebAppsClient) getInstanceFunctionSlotHandleResponse(resp *http.Re // GetInstanceInfo - Description for Gets all scale-out instances of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientGetInstanceInfoOptions contains the optional parameters for the WebAppsClient.GetInstanceInfo method. func (client *WebAppsClient) GetInstanceInfo(ctx context.Context, resourceGroupName string, name string, instanceID string, options *WebAppsClientGetInstanceInfoOptions) (WebAppsClientGetInstanceInfoResponse, error) { + var err error + const operationName = "WebAppsClient.GetInstanceInfo" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getInstanceInfoCreateRequest(ctx, resourceGroupName, name, instanceID, options) if err != nil { return WebAppsClientGetInstanceInfoResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetInstanceInfoResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetInstanceInfoResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetInstanceInfoResponse{}, err } - return client.getInstanceInfoHandleResponse(resp) + resp, err := client.getInstanceInfoHandleResponse(httpResp) + return resp, err } // getInstanceInfoCreateRequest creates the GetInstanceInfo request. @@ -8462,7 +9526,7 @@ func (client *WebAppsClient) getInstanceInfoCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8480,25 +9544,32 @@ func (client *WebAppsClient) getInstanceInfoHandleResponse(resp *http.Response) // GetInstanceInfoSlot - Description for Gets all scale-out instances of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API gets the production slot instances. // - options - WebAppsClientGetInstanceInfoSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceInfoSlot // method. func (client *WebAppsClient) GetInstanceInfoSlot(ctx context.Context, resourceGroupName string, name string, instanceID string, slot string, options *WebAppsClientGetInstanceInfoSlotOptions) (WebAppsClientGetInstanceInfoSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetInstanceInfoSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getInstanceInfoSlotCreateRequest(ctx, resourceGroupName, name, instanceID, slot, options) if err != nil { return WebAppsClientGetInstanceInfoSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetInstanceInfoSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetInstanceInfoSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetInstanceInfoSlotResponse{}, err } - return client.getInstanceInfoSlotHandleResponse(resp) + resp, err := client.getInstanceInfoSlotHandleResponse(httpResp) + return resp, err } // getInstanceInfoSlotCreateRequest creates the GetInstanceInfoSlot request. @@ -8529,7 +9600,7 @@ func (client *WebAppsClient) getInstanceInfoSlotCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8547,25 +9618,32 @@ func (client *WebAppsClient) getInstanceInfoSlotHandleResponse(resp *http.Respon // GetInstanceMSDeployLog - Description for Get the MSDeploy Log for the last MSDeploy operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - instanceID - ID of web app instance. // - options - WebAppsClientGetInstanceMSDeployLogOptions contains the optional parameters for the WebAppsClient.GetInstanceMSDeployLog // method. func (client *WebAppsClient) GetInstanceMSDeployLog(ctx context.Context, resourceGroupName string, name string, instanceID string, options *WebAppsClientGetInstanceMSDeployLogOptions) (WebAppsClientGetInstanceMSDeployLogResponse, error) { + var err error + const operationName = "WebAppsClient.GetInstanceMSDeployLog" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getInstanceMSDeployLogCreateRequest(ctx, resourceGroupName, name, instanceID, options) if err != nil { return WebAppsClientGetInstanceMSDeployLogResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetInstanceMSDeployLogResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetInstanceMSDeployLogResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetInstanceMSDeployLogResponse{}, err } - return client.getInstanceMSDeployLogHandleResponse(resp) + resp, err := client.getInstanceMSDeployLogHandleResponse(httpResp) + return resp, err } // getInstanceMSDeployLogCreateRequest creates the GetInstanceMSDeployLog request. @@ -8592,7 +9670,7 @@ func (client *WebAppsClient) getInstanceMSDeployLogCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8610,7 +9688,7 @@ func (client *WebAppsClient) getInstanceMSDeployLogHandleResponse(resp *http.Res // GetInstanceMSDeployLogSlot - Description for Get the MSDeploy Log for the last MSDeploy operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - slot - Name of web app slot. If not specified then will default to production slot. @@ -8618,18 +9696,25 @@ func (client *WebAppsClient) getInstanceMSDeployLogHandleResponse(resp *http.Res // - options - WebAppsClientGetInstanceMSDeployLogSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceMSDeployLogSlot // method. func (client *WebAppsClient) GetInstanceMSDeployLogSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string, options *WebAppsClientGetInstanceMSDeployLogSlotOptions) (WebAppsClientGetInstanceMSDeployLogSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetInstanceMSDeployLogSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getInstanceMSDeployLogSlotCreateRequest(ctx, resourceGroupName, name, slot, instanceID, options) if err != nil { return WebAppsClientGetInstanceMSDeployLogSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetInstanceMSDeployLogSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetInstanceMSDeployLogSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetInstanceMSDeployLogSlotResponse{}, err } - return client.getInstanceMSDeployLogSlotHandleResponse(resp) + resp, err := client.getInstanceMSDeployLogSlotHandleResponse(httpResp) + return resp, err } // getInstanceMSDeployLogSlotCreateRequest creates the GetInstanceMSDeployLogSlot request. @@ -8660,7 +9745,7 @@ func (client *WebAppsClient) getInstanceMSDeployLogSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8678,25 +9763,32 @@ func (client *WebAppsClient) getInstanceMSDeployLogSlotHandleResponse(resp *http // GetInstanceMsDeployStatus - Description for Get the status of the last MSDeploy operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - instanceID - ID of web app instance. // - options - WebAppsClientGetInstanceMsDeployStatusOptions contains the optional parameters for the WebAppsClient.GetInstanceMsDeployStatus // method. func (client *WebAppsClient) GetInstanceMsDeployStatus(ctx context.Context, resourceGroupName string, name string, instanceID string, options *WebAppsClientGetInstanceMsDeployStatusOptions) (WebAppsClientGetInstanceMsDeployStatusResponse, error) { + var err error + const operationName = "WebAppsClient.GetInstanceMsDeployStatus" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getInstanceMsDeployStatusCreateRequest(ctx, resourceGroupName, name, instanceID, options) if err != nil { return WebAppsClientGetInstanceMsDeployStatusResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetInstanceMsDeployStatusResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetInstanceMsDeployStatusResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetInstanceMsDeployStatusResponse{}, err } - return client.getInstanceMsDeployStatusHandleResponse(resp) + resp, err := client.getInstanceMsDeployStatusHandleResponse(httpResp) + return resp, err } // getInstanceMsDeployStatusCreateRequest creates the GetInstanceMsDeployStatus request. @@ -8723,7 +9815,7 @@ func (client *WebAppsClient) getInstanceMsDeployStatusCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8741,7 +9833,7 @@ func (client *WebAppsClient) getInstanceMsDeployStatusHandleResponse(resp *http. // GetInstanceMsDeployStatusSlot - Description for Get the status of the last MSDeploy operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - slot - Name of web app slot. If not specified then will default to production slot. @@ -8749,18 +9841,25 @@ func (client *WebAppsClient) getInstanceMsDeployStatusHandleResponse(resp *http. // - options - WebAppsClientGetInstanceMsDeployStatusSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceMsDeployStatusSlot // method. func (client *WebAppsClient) GetInstanceMsDeployStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string, options *WebAppsClientGetInstanceMsDeployStatusSlotOptions) (WebAppsClientGetInstanceMsDeployStatusSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetInstanceMsDeployStatusSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getInstanceMsDeployStatusSlotCreateRequest(ctx, resourceGroupName, name, slot, instanceID, options) if err != nil { return WebAppsClientGetInstanceMsDeployStatusSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetInstanceMsDeployStatusSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetInstanceMsDeployStatusSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetInstanceMsDeployStatusSlotResponse{}, err } - return client.getInstanceMsDeployStatusSlotHandleResponse(resp) + resp, err := client.getInstanceMsDeployStatusSlotHandleResponse(httpResp) + return resp, err } // getInstanceMsDeployStatusSlotCreateRequest creates the GetInstanceMsDeployStatusSlot request. @@ -8791,7 +9890,7 @@ func (client *WebAppsClient) getInstanceMsDeployStatusSlotCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8809,7 +9908,7 @@ func (client *WebAppsClient) getInstanceMsDeployStatusSlotHandleResponse(resp *h // GetInstanceProcess - Description for Get process information by its ID for a specific scaled-out instance in a web site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - processID - PID. @@ -8818,18 +9917,25 @@ func (client *WebAppsClient) getInstanceMsDeployStatusSlotHandleResponse(resp *h // - options - WebAppsClientGetInstanceProcessOptions contains the optional parameters for the WebAppsClient.GetInstanceProcess // method. func (client *WebAppsClient) GetInstanceProcess(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string, options *WebAppsClientGetInstanceProcessOptions) (WebAppsClientGetInstanceProcessResponse, error) { + var err error + const operationName = "WebAppsClient.GetInstanceProcess" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getInstanceProcessCreateRequest(ctx, resourceGroupName, name, processID, instanceID, options) if err != nil { return WebAppsClientGetInstanceProcessResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetInstanceProcessResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetInstanceProcessResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetInstanceProcessResponse{}, err } - return client.getInstanceProcessHandleResponse(resp) + resp, err := client.getInstanceProcessHandleResponse(httpResp) + return resp, err } // getInstanceProcessCreateRequest creates the GetInstanceProcess request. @@ -8860,7 +9966,7 @@ func (client *WebAppsClient) getInstanceProcessCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -8879,7 +9985,7 @@ func (client *WebAppsClient) getInstanceProcessHandleResponse(resp *http.Respons // a web site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - processID - PID. @@ -8888,18 +9994,24 @@ func (client *WebAppsClient) getInstanceProcessHandleResponse(resp *http.Respons // - options - WebAppsClientGetInstanceProcessDumpOptions contains the optional parameters for the WebAppsClient.GetInstanceProcessDump // method. func (client *WebAppsClient) GetInstanceProcessDump(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string, options *WebAppsClientGetInstanceProcessDumpOptions) (WebAppsClientGetInstanceProcessDumpResponse, error) { + var err error + const operationName = "WebAppsClient.GetInstanceProcessDump" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getInstanceProcessDumpCreateRequest(ctx, resourceGroupName, name, processID, instanceID, options) if err != nil { return WebAppsClientGetInstanceProcessDumpResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetInstanceProcessDumpResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetInstanceProcessDumpResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetInstanceProcessDumpResponse{}, err } - return WebAppsClientGetInstanceProcessDumpResponse{Body: resp.Body}, nil + return WebAppsClientGetInstanceProcessDumpResponse{Body: httpResp.Body}, nil } // getInstanceProcessDumpCreateRequest creates the GetInstanceProcessDump request. @@ -8930,7 +10042,7 @@ func (client *WebAppsClient) getInstanceProcessDumpCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() runtime.SkipBodyDownload(req) req.Raw().Header["Accept"] = []string{"application/json"} @@ -8941,7 +10053,7 @@ func (client *WebAppsClient) getInstanceProcessDumpCreateRequest(ctx context.Con // in a web site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - processID - PID. @@ -8951,18 +10063,24 @@ func (client *WebAppsClient) getInstanceProcessDumpCreateRequest(ctx context.Con // - options - WebAppsClientGetInstanceProcessDumpSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceProcessDumpSlot // method. func (client *WebAppsClient) GetInstanceProcessDumpSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string, options *WebAppsClientGetInstanceProcessDumpSlotOptions) (WebAppsClientGetInstanceProcessDumpSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetInstanceProcessDumpSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getInstanceProcessDumpSlotCreateRequest(ctx, resourceGroupName, name, processID, slot, instanceID, options) if err != nil { return WebAppsClientGetInstanceProcessDumpSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetInstanceProcessDumpSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetInstanceProcessDumpSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetInstanceProcessDumpSlotResponse{}, err } - return WebAppsClientGetInstanceProcessDumpSlotResponse{Body: resp.Body}, nil + return WebAppsClientGetInstanceProcessDumpSlotResponse{Body: httpResp.Body}, nil } // getInstanceProcessDumpSlotCreateRequest creates the GetInstanceProcessDumpSlot request. @@ -8997,7 +10115,7 @@ func (client *WebAppsClient) getInstanceProcessDumpSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() runtime.SkipBodyDownload(req) req.Raw().Header["Accept"] = []string{"application/json"} @@ -9008,7 +10126,7 @@ func (client *WebAppsClient) getInstanceProcessDumpSlotCreateRequest(ctx context // site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - processID - PID. @@ -9018,18 +10136,25 @@ func (client *WebAppsClient) getInstanceProcessDumpSlotCreateRequest(ctx context // - options - WebAppsClientGetInstanceProcessModuleOptions contains the optional parameters for the WebAppsClient.GetInstanceProcessModule // method. func (client *WebAppsClient) GetInstanceProcessModule(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, instanceID string, options *WebAppsClientGetInstanceProcessModuleOptions) (WebAppsClientGetInstanceProcessModuleResponse, error) { + var err error + const operationName = "WebAppsClient.GetInstanceProcessModule" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getInstanceProcessModuleCreateRequest(ctx, resourceGroupName, name, processID, baseAddress, instanceID, options) if err != nil { return WebAppsClientGetInstanceProcessModuleResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetInstanceProcessModuleResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetInstanceProcessModuleResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetInstanceProcessModuleResponse{}, err } - return client.getInstanceProcessModuleHandleResponse(resp) + resp, err := client.getInstanceProcessModuleHandleResponse(httpResp) + return resp, err } // getInstanceProcessModuleCreateRequest creates the GetInstanceProcessModule request. @@ -9064,7 +10189,7 @@ func (client *WebAppsClient) getInstanceProcessModuleCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9083,7 +10208,7 @@ func (client *WebAppsClient) getInstanceProcessModuleHandleResponse(resp *http.R // a web site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - processID - PID. @@ -9094,18 +10219,25 @@ func (client *WebAppsClient) getInstanceProcessModuleHandleResponse(resp *http.R // - options - WebAppsClientGetInstanceProcessModuleSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceProcessModuleSlot // method. func (client *WebAppsClient) GetInstanceProcessModuleSlot(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string, instanceID string, options *WebAppsClientGetInstanceProcessModuleSlotOptions) (WebAppsClientGetInstanceProcessModuleSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetInstanceProcessModuleSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getInstanceProcessModuleSlotCreateRequest(ctx, resourceGroupName, name, processID, baseAddress, slot, instanceID, options) if err != nil { return WebAppsClientGetInstanceProcessModuleSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetInstanceProcessModuleSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetInstanceProcessModuleSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetInstanceProcessModuleSlotResponse{}, err } - return client.getInstanceProcessModuleSlotHandleResponse(resp) + resp, err := client.getInstanceProcessModuleSlotHandleResponse(httpResp) + return resp, err } // getInstanceProcessModuleSlotCreateRequest creates the GetInstanceProcessModuleSlot request. @@ -9144,7 +10276,7 @@ func (client *WebAppsClient) getInstanceProcessModuleSlotCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9163,7 +10295,7 @@ func (client *WebAppsClient) getInstanceProcessModuleSlotHandleResponse(resp *ht // site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - processID - PID. @@ -9173,18 +10305,25 @@ func (client *WebAppsClient) getInstanceProcessModuleSlotHandleResponse(resp *ht // - options - WebAppsClientGetInstanceProcessSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceProcessSlot // method. func (client *WebAppsClient) GetInstanceProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string, options *WebAppsClientGetInstanceProcessSlotOptions) (WebAppsClientGetInstanceProcessSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetInstanceProcessSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getInstanceProcessSlotCreateRequest(ctx, resourceGroupName, name, processID, slot, instanceID, options) if err != nil { return WebAppsClientGetInstanceProcessSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetInstanceProcessSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetInstanceProcessSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetInstanceProcessSlotResponse{}, err } - return client.getInstanceProcessSlotHandleResponse(resp) + resp, err := client.getInstanceProcessSlotHandleResponse(httpResp) + return resp, err } // getInstanceProcessSlotCreateRequest creates the GetInstanceProcessSlot request. @@ -9219,7 +10358,7 @@ func (client *WebAppsClient) getInstanceProcessSlotCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9237,7 +10376,7 @@ func (client *WebAppsClient) getInstanceProcessSlotHandleResponse(resp *http.Res // GetInstanceWorkflowSlot - Get workflow information by its ID for web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - slot - Name of the deployment slot. @@ -9245,18 +10384,25 @@ func (client *WebAppsClient) getInstanceProcessSlotHandleResponse(resp *http.Res // - options - WebAppsClientGetInstanceWorkflowSlotOptions contains the optional parameters for the WebAppsClient.GetInstanceWorkflowSlot // method. func (client *WebAppsClient) GetInstanceWorkflowSlot(ctx context.Context, resourceGroupName string, name string, slot string, workflowName string, options *WebAppsClientGetInstanceWorkflowSlotOptions) (WebAppsClientGetInstanceWorkflowSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetInstanceWorkflowSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getInstanceWorkflowSlotCreateRequest(ctx, resourceGroupName, name, slot, workflowName, options) if err != nil { return WebAppsClientGetInstanceWorkflowSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetInstanceWorkflowSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetInstanceWorkflowSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetInstanceWorkflowSlotResponse{}, err } - return client.getInstanceWorkflowSlotHandleResponse(resp) + resp, err := client.getInstanceWorkflowSlotHandleResponse(httpResp) + return resp, err } // getInstanceWorkflowSlotCreateRequest creates the GetInstanceWorkflowSlot request. @@ -9287,7 +10433,7 @@ func (client *WebAppsClient) getInstanceWorkflowSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9305,23 +10451,30 @@ func (client *WebAppsClient) getInstanceWorkflowSlotHandleResponse(resp *http.Re // GetMSDeployLog - Description for Get the MSDeploy Log for the last MSDeploy operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - options - WebAppsClientGetMSDeployLogOptions contains the optional parameters for the WebAppsClient.GetMSDeployLog method. func (client *WebAppsClient) GetMSDeployLog(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetMSDeployLogOptions) (WebAppsClientGetMSDeployLogResponse, error) { + var err error + const operationName = "WebAppsClient.GetMSDeployLog" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getMSDeployLogCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientGetMSDeployLogResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetMSDeployLogResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetMSDeployLogResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetMSDeployLogResponse{}, err } - return client.getMSDeployLogHandleResponse(resp) + resp, err := client.getMSDeployLogHandleResponse(httpResp) + return resp, err } // getMSDeployLogCreateRequest creates the GetMSDeployLog request. @@ -9344,7 +10497,7 @@ func (client *WebAppsClient) getMSDeployLogCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9362,25 +10515,32 @@ func (client *WebAppsClient) getMSDeployLogHandleResponse(resp *http.Response) ( // GetMSDeployLogSlot - Description for Get the MSDeploy Log for the last MSDeploy operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - slot - Name of web app slot. If not specified then will default to production slot. // - options - WebAppsClientGetMSDeployLogSlotOptions contains the optional parameters for the WebAppsClient.GetMSDeployLogSlot // method. func (client *WebAppsClient) GetMSDeployLogSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetMSDeployLogSlotOptions) (WebAppsClientGetMSDeployLogSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetMSDeployLogSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getMSDeployLogSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientGetMSDeployLogSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetMSDeployLogSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetMSDeployLogSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetMSDeployLogSlotResponse{}, err } - return client.getMSDeployLogSlotHandleResponse(resp) + resp, err := client.getMSDeployLogSlotHandleResponse(httpResp) + return resp, err } // getMSDeployLogSlotCreateRequest creates the GetMSDeployLogSlot request. @@ -9407,7 +10567,7 @@ func (client *WebAppsClient) getMSDeployLogSlotCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9425,24 +10585,31 @@ func (client *WebAppsClient) getMSDeployLogSlotHandleResponse(resp *http.Respons // GetMSDeployStatus - Description for Get the status of the last MSDeploy operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - options - WebAppsClientGetMSDeployStatusOptions contains the optional parameters for the WebAppsClient.GetMSDeployStatus // method. func (client *WebAppsClient) GetMSDeployStatus(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetMSDeployStatusOptions) (WebAppsClientGetMSDeployStatusResponse, error) { + var err error + const operationName = "WebAppsClient.GetMSDeployStatus" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getMSDeployStatusCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientGetMSDeployStatusResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetMSDeployStatusResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetMSDeployStatusResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetMSDeployStatusResponse{}, err } - return client.getMSDeployStatusHandleResponse(resp) + resp, err := client.getMSDeployStatusHandleResponse(httpResp) + return resp, err } // getMSDeployStatusCreateRequest creates the GetMSDeployStatus request. @@ -9465,7 +10632,7 @@ func (client *WebAppsClient) getMSDeployStatusCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9483,25 +10650,32 @@ func (client *WebAppsClient) getMSDeployStatusHandleResponse(resp *http.Response // GetMSDeployStatusSlot - Description for Get the status of the last MSDeploy operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - slot - Name of web app slot. If not specified then will default to production slot. // - options - WebAppsClientGetMSDeployStatusSlotOptions contains the optional parameters for the WebAppsClient.GetMSDeployStatusSlot // method. func (client *WebAppsClient) GetMSDeployStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetMSDeployStatusSlotOptions) (WebAppsClientGetMSDeployStatusSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetMSDeployStatusSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getMSDeployStatusSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientGetMSDeployStatusSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetMSDeployStatusSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetMSDeployStatusSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetMSDeployStatusSlotResponse{}, err } - return client.getMSDeployStatusSlotHandleResponse(resp) + resp, err := client.getMSDeployStatusSlotHandleResponse(httpResp) + return resp, err } // getMSDeployStatusSlotCreateRequest creates the GetMSDeployStatusSlot request. @@ -9528,7 +10702,7 @@ func (client *WebAppsClient) getMSDeployStatusSlotCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9547,24 +10721,31 @@ func (client *WebAppsClient) getMSDeployStatusSlotHandleResponse(resp *http.Resp // not MySql in app is enabled // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - options - WebAppsClientGetMigrateMySQLStatusOptions contains the optional parameters for the WebAppsClient.GetMigrateMySQLStatus // method. func (client *WebAppsClient) GetMigrateMySQLStatus(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetMigrateMySQLStatusOptions) (WebAppsClientGetMigrateMySQLStatusResponse, error) { + var err error + const operationName = "WebAppsClient.GetMigrateMySQLStatus" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getMigrateMySQLStatusCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientGetMigrateMySQLStatusResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetMigrateMySQLStatusResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetMigrateMySQLStatusResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetMigrateMySQLStatusResponse{}, err } - return client.getMigrateMySQLStatusHandleResponse(resp) + resp, err := client.getMigrateMySQLStatusHandleResponse(httpResp) + return resp, err } // getMigrateMySQLStatusCreateRequest creates the GetMigrateMySQLStatus request. @@ -9587,7 +10768,7 @@ func (client *WebAppsClient) getMigrateMySQLStatusCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9606,25 +10787,32 @@ func (client *WebAppsClient) getMigrateMySQLStatusHandleResponse(resp *http.Resp // or not MySql in app is enabled // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - slot - Name of the deployment slot. // - options - WebAppsClientGetMigrateMySQLStatusSlotOptions contains the optional parameters for the WebAppsClient.GetMigrateMySQLStatusSlot // method. func (client *WebAppsClient) GetMigrateMySQLStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetMigrateMySQLStatusSlotOptions) (WebAppsClientGetMigrateMySQLStatusSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetMigrateMySQLStatusSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getMigrateMySQLStatusSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientGetMigrateMySQLStatusSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetMigrateMySQLStatusSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetMigrateMySQLStatusSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetMigrateMySQLStatusSlotResponse{}, err } - return client.getMigrateMySQLStatusSlotHandleResponse(resp) + resp, err := client.getMigrateMySQLStatusSlotHandleResponse(httpResp) + return resp, err } // getMigrateMySQLStatusSlotCreateRequest creates the GetMigrateMySQLStatusSlot request. @@ -9651,7 +10839,7 @@ func (client *WebAppsClient) getMigrateMySQLStatusSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9670,25 +10858,32 @@ func (client *WebAppsClient) getMigrateMySQLStatusSlotHandleResponse(resp *http. // specified). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - operationID - GUID of the operation. // - options - WebAppsClientGetNetworkTraceOperationOptions contains the optional parameters for the WebAppsClient.GetNetworkTraceOperation // method. func (client *WebAppsClient) GetNetworkTraceOperation(ctx context.Context, resourceGroupName string, name string, operationID string, options *WebAppsClientGetNetworkTraceOperationOptions) (WebAppsClientGetNetworkTraceOperationResponse, error) { + var err error + const operationName = "WebAppsClient.GetNetworkTraceOperation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getNetworkTraceOperationCreateRequest(ctx, resourceGroupName, name, operationID, options) if err != nil { return WebAppsClientGetNetworkTraceOperationResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetNetworkTraceOperationResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return WebAppsClientGetNetworkTraceOperationResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetNetworkTraceOperationResponse{}, err } - return client.getNetworkTraceOperationHandleResponse(resp) + resp, err := client.getNetworkTraceOperationHandleResponse(httpResp) + return resp, err } // getNetworkTraceOperationCreateRequest creates the GetNetworkTraceOperation request. @@ -9715,7 +10910,7 @@ func (client *WebAppsClient) getNetworkTraceOperationCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9734,7 +10929,7 @@ func (client *WebAppsClient) getNetworkTraceOperationHandleResponse(resp *http.R // if specified). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - operationID - GUID of the operation. @@ -9742,18 +10937,25 @@ func (client *WebAppsClient) getNetworkTraceOperationHandleResponse(resp *http.R // - options - WebAppsClientGetNetworkTraceOperationSlotOptions contains the optional parameters for the WebAppsClient.GetNetworkTraceOperationSlot // method. func (client *WebAppsClient) GetNetworkTraceOperationSlot(ctx context.Context, resourceGroupName string, name string, operationID string, slot string, options *WebAppsClientGetNetworkTraceOperationSlotOptions) (WebAppsClientGetNetworkTraceOperationSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetNetworkTraceOperationSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getNetworkTraceOperationSlotCreateRequest(ctx, resourceGroupName, name, operationID, slot, options) if err != nil { return WebAppsClientGetNetworkTraceOperationSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetNetworkTraceOperationSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return WebAppsClientGetNetworkTraceOperationSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetNetworkTraceOperationSlotResponse{}, err } - return client.getNetworkTraceOperationSlotHandleResponse(resp) + resp, err := client.getNetworkTraceOperationSlotHandleResponse(httpResp) + return resp, err } // getNetworkTraceOperationSlotCreateRequest creates the GetNetworkTraceOperationSlot request. @@ -9784,7 +10986,7 @@ func (client *WebAppsClient) getNetworkTraceOperationSlotCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9803,7 +11005,7 @@ func (client *WebAppsClient) getNetworkTraceOperationSlotHandleResponse(resp *ht // if specified). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - operationID - GUID of the operation. @@ -9811,18 +11013,25 @@ func (client *WebAppsClient) getNetworkTraceOperationSlotHandleResponse(resp *ht // - options - WebAppsClientGetNetworkTraceOperationSlotV2Options contains the optional parameters for the WebAppsClient.GetNetworkTraceOperationSlotV2 // method. func (client *WebAppsClient) GetNetworkTraceOperationSlotV2(ctx context.Context, resourceGroupName string, name string, operationID string, slot string, options *WebAppsClientGetNetworkTraceOperationSlotV2Options) (WebAppsClientGetNetworkTraceOperationSlotV2Response, error) { + var err error + const operationName = "WebAppsClient.GetNetworkTraceOperationSlotV2" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getNetworkTraceOperationSlotV2CreateRequest(ctx, resourceGroupName, name, operationID, slot, options) if err != nil { return WebAppsClientGetNetworkTraceOperationSlotV2Response{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetNetworkTraceOperationSlotV2Response{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return WebAppsClientGetNetworkTraceOperationSlotV2Response{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetNetworkTraceOperationSlotV2Response{}, err } - return client.getNetworkTraceOperationSlotV2HandleResponse(resp) + resp, err := client.getNetworkTraceOperationSlotV2HandleResponse(httpResp) + return resp, err } // getNetworkTraceOperationSlotV2CreateRequest creates the GetNetworkTraceOperationSlotV2 request. @@ -9853,7 +11062,7 @@ func (client *WebAppsClient) getNetworkTraceOperationSlotV2CreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9872,25 +11081,32 @@ func (client *WebAppsClient) getNetworkTraceOperationSlotV2HandleResponse(resp * // if specified). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - operationID - GUID of the operation. // - options - WebAppsClientGetNetworkTraceOperationV2Options contains the optional parameters for the WebAppsClient.GetNetworkTraceOperationV2 // method. func (client *WebAppsClient) GetNetworkTraceOperationV2(ctx context.Context, resourceGroupName string, name string, operationID string, options *WebAppsClientGetNetworkTraceOperationV2Options) (WebAppsClientGetNetworkTraceOperationV2Response, error) { + var err error + const operationName = "WebAppsClient.GetNetworkTraceOperationV2" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getNetworkTraceOperationV2CreateRequest(ctx, resourceGroupName, name, operationID, options) if err != nil { return WebAppsClientGetNetworkTraceOperationV2Response{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetNetworkTraceOperationV2Response{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return WebAppsClientGetNetworkTraceOperationV2Response{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetNetworkTraceOperationV2Response{}, err } - return client.getNetworkTraceOperationV2HandleResponse(resp) + resp, err := client.getNetworkTraceOperationV2HandleResponse(httpResp) + return resp, err } // getNetworkTraceOperationV2CreateRequest creates the GetNetworkTraceOperationV2 request. @@ -9917,7 +11133,7 @@ func (client *WebAppsClient) getNetworkTraceOperationV2CreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9935,25 +11151,32 @@ func (client *WebAppsClient) getNetworkTraceOperationV2HandleResponse(resp *http // GetNetworkTraces - Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - operationID - GUID of the operation. // - options - WebAppsClientGetNetworkTracesOptions contains the optional parameters for the WebAppsClient.GetNetworkTraces // method. func (client *WebAppsClient) GetNetworkTraces(ctx context.Context, resourceGroupName string, name string, operationID string, options *WebAppsClientGetNetworkTracesOptions) (WebAppsClientGetNetworkTracesResponse, error) { + var err error + const operationName = "WebAppsClient.GetNetworkTraces" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getNetworkTracesCreateRequest(ctx, resourceGroupName, name, operationID, options) if err != nil { return WebAppsClientGetNetworkTracesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetNetworkTracesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetNetworkTracesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetNetworkTracesResponse{}, err } - return client.getNetworkTracesHandleResponse(resp) + resp, err := client.getNetworkTracesHandleResponse(httpResp) + return resp, err } // getNetworkTracesCreateRequest creates the GetNetworkTraces request. @@ -9980,7 +11203,7 @@ func (client *WebAppsClient) getNetworkTracesCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -9998,7 +11221,7 @@ func (client *WebAppsClient) getNetworkTracesHandleResponse(resp *http.Response) // GetNetworkTracesSlot - Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - operationID - GUID of the operation. @@ -10006,18 +11229,25 @@ func (client *WebAppsClient) getNetworkTracesHandleResponse(resp *http.Response) // - options - WebAppsClientGetNetworkTracesSlotOptions contains the optional parameters for the WebAppsClient.GetNetworkTracesSlot // method. func (client *WebAppsClient) GetNetworkTracesSlot(ctx context.Context, resourceGroupName string, name string, operationID string, slot string, options *WebAppsClientGetNetworkTracesSlotOptions) (WebAppsClientGetNetworkTracesSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetNetworkTracesSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getNetworkTracesSlotCreateRequest(ctx, resourceGroupName, name, operationID, slot, options) if err != nil { return WebAppsClientGetNetworkTracesSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetNetworkTracesSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetNetworkTracesSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetNetworkTracesSlotResponse{}, err } - return client.getNetworkTracesSlotHandleResponse(resp) + resp, err := client.getNetworkTracesSlotHandleResponse(httpResp) + return resp, err } // getNetworkTracesSlotCreateRequest creates the GetNetworkTracesSlot request. @@ -10048,7 +11278,7 @@ func (client *WebAppsClient) getNetworkTracesSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10066,7 +11296,7 @@ func (client *WebAppsClient) getNetworkTracesSlotHandleResponse(resp *http.Respo // GetNetworkTracesSlotV2 - Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - operationID - GUID of the operation. @@ -10074,18 +11304,25 @@ func (client *WebAppsClient) getNetworkTracesSlotHandleResponse(resp *http.Respo // - options - WebAppsClientGetNetworkTracesSlotV2Options contains the optional parameters for the WebAppsClient.GetNetworkTracesSlotV2 // method. func (client *WebAppsClient) GetNetworkTracesSlotV2(ctx context.Context, resourceGroupName string, name string, operationID string, slot string, options *WebAppsClientGetNetworkTracesSlotV2Options) (WebAppsClientGetNetworkTracesSlotV2Response, error) { + var err error + const operationName = "WebAppsClient.GetNetworkTracesSlotV2" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getNetworkTracesSlotV2CreateRequest(ctx, resourceGroupName, name, operationID, slot, options) if err != nil { return WebAppsClientGetNetworkTracesSlotV2Response{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetNetworkTracesSlotV2Response{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetNetworkTracesSlotV2Response{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetNetworkTracesSlotV2Response{}, err } - return client.getNetworkTracesSlotV2HandleResponse(resp) + resp, err := client.getNetworkTracesSlotV2HandleResponse(httpResp) + return resp, err } // getNetworkTracesSlotV2CreateRequest creates the GetNetworkTracesSlotV2 request. @@ -10116,7 +11353,7 @@ func (client *WebAppsClient) getNetworkTracesSlotV2CreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10134,25 +11371,32 @@ func (client *WebAppsClient) getNetworkTracesSlotV2HandleResponse(resp *http.Res // GetNetworkTracesV2 - Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - operationID - GUID of the operation. // - options - WebAppsClientGetNetworkTracesV2Options contains the optional parameters for the WebAppsClient.GetNetworkTracesV2 // method. func (client *WebAppsClient) GetNetworkTracesV2(ctx context.Context, resourceGroupName string, name string, operationID string, options *WebAppsClientGetNetworkTracesV2Options) (WebAppsClientGetNetworkTracesV2Response, error) { + var err error + const operationName = "WebAppsClient.GetNetworkTracesV2" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getNetworkTracesV2CreateRequest(ctx, resourceGroupName, name, operationID, options) if err != nil { return WebAppsClientGetNetworkTracesV2Response{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetNetworkTracesV2Response{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetNetworkTracesV2Response{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetNetworkTracesV2Response{}, err } - return client.getNetworkTracesV2HandleResponse(resp) + resp, err := client.getNetworkTracesV2HandleResponse(httpResp) + return resp, err } // getNetworkTracesV2CreateRequest creates the GetNetworkTracesV2 request. @@ -10179,7 +11423,7 @@ func (client *WebAppsClient) getNetworkTracesV2CreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10198,24 +11442,31 @@ func (client *WebAppsClient) getNetworkTracesV2HandleResponse(resp *http.Respons // site // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - options - WebAppsClientGetOneDeployStatusOptions contains the optional parameters for the WebAppsClient.GetOneDeployStatus // method. func (client *WebAppsClient) GetOneDeployStatus(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetOneDeployStatusOptions) (WebAppsClientGetOneDeployStatusResponse, error) { + var err error + const operationName = "WebAppsClient.GetOneDeployStatus" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getOneDeployStatusCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientGetOneDeployStatusResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetOneDeployStatusResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetOneDeployStatusResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetOneDeployStatusResponse{}, err } - return client.getOneDeployStatusHandleResponse(resp) + resp, err := client.getOneDeployStatusHandleResponse(httpResp) + return resp, err } // getOneDeployStatusCreateRequest creates the GetOneDeployStatus request. @@ -10238,7 +11489,7 @@ func (client *WebAppsClient) getOneDeployStatusCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10256,24 +11507,31 @@ func (client *WebAppsClient) getOneDeployStatusHandleResponse(resp *http.Respons // GetPremierAddOn - Description for Gets a named add-on of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - premierAddOnName - Add-on name. // - options - WebAppsClientGetPremierAddOnOptions contains the optional parameters for the WebAppsClient.GetPremierAddOn method. func (client *WebAppsClient) GetPremierAddOn(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, options *WebAppsClientGetPremierAddOnOptions) (WebAppsClientGetPremierAddOnResponse, error) { + var err error + const operationName = "WebAppsClient.GetPremierAddOn" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getPremierAddOnCreateRequest(ctx, resourceGroupName, name, premierAddOnName, options) if err != nil { return WebAppsClientGetPremierAddOnResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetPremierAddOnResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetPremierAddOnResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetPremierAddOnResponse{}, err } - return client.getPremierAddOnHandleResponse(resp) + resp, err := client.getPremierAddOnHandleResponse(httpResp) + return resp, err } // getPremierAddOnCreateRequest creates the GetPremierAddOn request. @@ -10300,7 +11558,7 @@ func (client *WebAppsClient) getPremierAddOnCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10318,7 +11576,7 @@ func (client *WebAppsClient) getPremierAddOnHandleResponse(resp *http.Response) // GetPremierAddOnSlot - Description for Gets a named add-on of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - premierAddOnName - Add-on name. @@ -10326,18 +11584,25 @@ func (client *WebAppsClient) getPremierAddOnHandleResponse(resp *http.Response) // - options - WebAppsClientGetPremierAddOnSlotOptions contains the optional parameters for the WebAppsClient.GetPremierAddOnSlot // method. func (client *WebAppsClient) GetPremierAddOnSlot(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string, options *WebAppsClientGetPremierAddOnSlotOptions) (WebAppsClientGetPremierAddOnSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetPremierAddOnSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getPremierAddOnSlotCreateRequest(ctx, resourceGroupName, name, premierAddOnName, slot, options) if err != nil { return WebAppsClientGetPremierAddOnSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetPremierAddOnSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetPremierAddOnSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetPremierAddOnSlotResponse{}, err } - return client.getPremierAddOnSlotHandleResponse(resp) + resp, err := client.getPremierAddOnSlotHandleResponse(httpResp) + return resp, err } // getPremierAddOnSlotCreateRequest creates the GetPremierAddOnSlot request. @@ -10368,7 +11633,7 @@ func (client *WebAppsClient) getPremierAddOnSlotCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10387,24 +11652,31 @@ func (client *WebAppsClient) getPremierAddOnSlotHandleResponse(resp *http.Respon // can access the site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - The name of the web app. // - options - WebAppsClientGetPrivateAccessOptions contains the optional parameters for the WebAppsClient.GetPrivateAccess // method. func (client *WebAppsClient) GetPrivateAccess(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetPrivateAccessOptions) (WebAppsClientGetPrivateAccessResponse, error) { + var err error + const operationName = "WebAppsClient.GetPrivateAccess" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getPrivateAccessCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientGetPrivateAccessResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetPrivateAccessResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetPrivateAccessResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetPrivateAccessResponse{}, err } - return client.getPrivateAccessHandleResponse(resp) + resp, err := client.getPrivateAccessHandleResponse(httpResp) + return resp, err } // getPrivateAccessCreateRequest creates the GetPrivateAccess request. @@ -10427,7 +11699,7 @@ func (client *WebAppsClient) getPrivateAccessCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10446,25 +11718,32 @@ func (client *WebAppsClient) getPrivateAccessHandleResponse(resp *http.Response) // that can access the site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - The name of the web app. // - slot - The name of the slot for the web app. // - options - WebAppsClientGetPrivateAccessSlotOptions contains the optional parameters for the WebAppsClient.GetPrivateAccessSlot // method. func (client *WebAppsClient) GetPrivateAccessSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetPrivateAccessSlotOptions) (WebAppsClientGetPrivateAccessSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetPrivateAccessSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getPrivateAccessSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientGetPrivateAccessSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetPrivateAccessSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetPrivateAccessSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetPrivateAccessSlotResponse{}, err } - return client.getPrivateAccessSlotHandleResponse(resp) + resp, err := client.getPrivateAccessSlotHandleResponse(httpResp) + return resp, err } // getPrivateAccessSlotCreateRequest creates the GetPrivateAccessSlot request. @@ -10491,7 +11770,7 @@ func (client *WebAppsClient) getPrivateAccessSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10509,25 +11788,32 @@ func (client *WebAppsClient) getPrivateAccessSlotHandleResponse(resp *http.Respo // GetPrivateEndpointConnection - Description for Gets a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the site. // - privateEndpointConnectionName - Name of the private endpoint connection. // - options - WebAppsClientGetPrivateEndpointConnectionOptions contains the optional parameters for the WebAppsClient.GetPrivateEndpointConnection // method. func (client *WebAppsClient) GetPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, options *WebAppsClientGetPrivateEndpointConnectionOptions) (WebAppsClientGetPrivateEndpointConnectionResponse, error) { + var err error + const operationName = "WebAppsClient.GetPrivateEndpointConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getPrivateEndpointConnectionCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, options) if err != nil { return WebAppsClientGetPrivateEndpointConnectionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetPrivateEndpointConnectionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetPrivateEndpointConnectionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetPrivateEndpointConnectionResponse{}, err } - return client.getPrivateEndpointConnectionHandleResponse(resp) + resp, err := client.getPrivateEndpointConnectionHandleResponse(httpResp) + return resp, err } // getPrivateEndpointConnectionCreateRequest creates the GetPrivateEndpointConnection request. @@ -10554,7 +11840,7 @@ func (client *WebAppsClient) getPrivateEndpointConnectionCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10572,7 +11858,7 @@ func (client *WebAppsClient) getPrivateEndpointConnectionHandleResponse(resp *ht // NewGetPrivateEndpointConnectionListPager - Description for Gets the list of private endpoint connections associated with // a site // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the site. // - options - WebAppsClientGetPrivateEndpointConnectionListOptions contains the optional parameters for the WebAppsClient.NewGetPrivateEndpointConnectionListPager @@ -10583,25 +11869,20 @@ func (client *WebAppsClient) NewGetPrivateEndpointConnectionListPager(resourceGr return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientGetPrivateEndpointConnectionListResponse) (WebAppsClientGetPrivateEndpointConnectionListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getPrivateEndpointConnectionListCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewGetPrivateEndpointConnectionListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getPrivateEndpointConnectionListCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return WebAppsClientGetPrivateEndpointConnectionListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebAppsClientGetPrivateEndpointConnectionListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetPrivateEndpointConnectionListResponse{}, runtime.NewResponseError(resp) - } return client.getPrivateEndpointConnectionListHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -10625,7 +11906,7 @@ func (client *WebAppsClient) getPrivateEndpointConnectionListCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10643,7 +11924,7 @@ func (client *WebAppsClient) getPrivateEndpointConnectionListHandleResponse(resp // NewGetPrivateEndpointConnectionListSlotPager - Description for Gets the list of private endpoint connections associated // with a site // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the site. // - slot - Name of the site deployment slot. @@ -10655,25 +11936,20 @@ func (client *WebAppsClient) NewGetPrivateEndpointConnectionListSlotPager(resour return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientGetPrivateEndpointConnectionListSlotResponse) (WebAppsClientGetPrivateEndpointConnectionListSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getPrivateEndpointConnectionListSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientGetPrivateEndpointConnectionListSlotResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewGetPrivateEndpointConnectionListSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getPrivateEndpointConnectionListSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) if err != nil { return WebAppsClientGetPrivateEndpointConnectionListSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetPrivateEndpointConnectionListSlotResponse{}, runtime.NewResponseError(resp) - } return client.getPrivateEndpointConnectionListSlotHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -10701,7 +11977,7 @@ func (client *WebAppsClient) getPrivateEndpointConnectionListSlotCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10719,7 +11995,7 @@ func (client *WebAppsClient) getPrivateEndpointConnectionListSlotHandleResponse( // GetPrivateEndpointConnectionSlot - Description for Gets a private endpoint connection // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the site. // - privateEndpointConnectionName - Name of the private endpoint connection. @@ -10727,18 +12003,25 @@ func (client *WebAppsClient) getPrivateEndpointConnectionListSlotHandleResponse( // - options - WebAppsClientGetPrivateEndpointConnectionSlotOptions contains the optional parameters for the WebAppsClient.GetPrivateEndpointConnectionSlot // method. func (client *WebAppsClient) GetPrivateEndpointConnectionSlot(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, slot string, options *WebAppsClientGetPrivateEndpointConnectionSlotOptions) (WebAppsClientGetPrivateEndpointConnectionSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetPrivateEndpointConnectionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getPrivateEndpointConnectionSlotCreateRequest(ctx, resourceGroupName, name, privateEndpointConnectionName, slot, options) if err != nil { return WebAppsClientGetPrivateEndpointConnectionSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetPrivateEndpointConnectionSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetPrivateEndpointConnectionSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetPrivateEndpointConnectionSlotResponse{}, err } - return client.getPrivateEndpointConnectionSlotHandleResponse(resp) + resp, err := client.getPrivateEndpointConnectionSlotHandleResponse(httpResp) + return resp, err } // getPrivateEndpointConnectionSlotCreateRequest creates the GetPrivateEndpointConnectionSlot request. @@ -10769,7 +12052,7 @@ func (client *WebAppsClient) getPrivateEndpointConnectionSlotCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10787,24 +12070,31 @@ func (client *WebAppsClient) getPrivateEndpointConnectionSlotHandleResponse(resp // GetPrivateLinkResources - Description for Gets the private link resources // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the site. // - options - WebAppsClientGetPrivateLinkResourcesOptions contains the optional parameters for the WebAppsClient.GetPrivateLinkResources // method. func (client *WebAppsClient) GetPrivateLinkResources(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetPrivateLinkResourcesOptions) (WebAppsClientGetPrivateLinkResourcesResponse, error) { + var err error + const operationName = "WebAppsClient.GetPrivateLinkResources" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getPrivateLinkResourcesCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientGetPrivateLinkResourcesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetPrivateLinkResourcesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetPrivateLinkResourcesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetPrivateLinkResourcesResponse{}, err } - return client.getPrivateLinkResourcesHandleResponse(resp) + resp, err := client.getPrivateLinkResourcesHandleResponse(httpResp) + return resp, err } // getPrivateLinkResourcesCreateRequest creates the GetPrivateLinkResources request. @@ -10827,7 +12117,7 @@ func (client *WebAppsClient) getPrivateLinkResourcesCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10845,24 +12135,31 @@ func (client *WebAppsClient) getPrivateLinkResourcesHandleResponse(resp *http.Re // GetPrivateLinkResourcesSlot - Description for Gets the private link resources // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the site. // - options - WebAppsClientGetPrivateLinkResourcesSlotOptions contains the optional parameters for the WebAppsClient.GetPrivateLinkResourcesSlot // method. func (client *WebAppsClient) GetPrivateLinkResourcesSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetPrivateLinkResourcesSlotOptions) (WebAppsClientGetPrivateLinkResourcesSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetPrivateLinkResourcesSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getPrivateLinkResourcesSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientGetPrivateLinkResourcesSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetPrivateLinkResourcesSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetPrivateLinkResourcesSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetPrivateLinkResourcesSlotResponse{}, err } - return client.getPrivateLinkResourcesSlotHandleResponse(resp) + resp, err := client.getPrivateLinkResourcesSlotHandleResponse(httpResp) + return resp, err } // getPrivateLinkResourcesSlotCreateRequest creates the GetPrivateLinkResourcesSlot request. @@ -10889,7 +12186,7 @@ func (client *WebAppsClient) getPrivateLinkResourcesSlotCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10907,24 +12204,31 @@ func (client *WebAppsClient) getPrivateLinkResourcesSlotHandleResponse(resp *htt // GetProcess - Description for Get process information by its ID for a specific scaled-out instance in a web site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - processID - PID. // - options - WebAppsClientGetProcessOptions contains the optional parameters for the WebAppsClient.GetProcess method. func (client *WebAppsClient) GetProcess(ctx context.Context, resourceGroupName string, name string, processID string, options *WebAppsClientGetProcessOptions) (WebAppsClientGetProcessResponse, error) { + var err error + const operationName = "WebAppsClient.GetProcess" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getProcessCreateRequest(ctx, resourceGroupName, name, processID, options) if err != nil { return WebAppsClientGetProcessResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetProcessResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetProcessResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetProcessResponse{}, err } - return client.getProcessHandleResponse(resp) + resp, err := client.getProcessHandleResponse(httpResp) + return resp, err } // getProcessCreateRequest creates the GetProcess request. @@ -10951,7 +12255,7 @@ func (client *WebAppsClient) getProcessCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -10969,24 +12273,30 @@ func (client *WebAppsClient) getProcessHandleResponse(resp *http.Response) (WebA // GetProcessDump - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - processID - PID. // - options - WebAppsClientGetProcessDumpOptions contains the optional parameters for the WebAppsClient.GetProcessDump method. func (client *WebAppsClient) GetProcessDump(ctx context.Context, resourceGroupName string, name string, processID string, options *WebAppsClientGetProcessDumpOptions) (WebAppsClientGetProcessDumpResponse, error) { + var err error + const operationName = "WebAppsClient.GetProcessDump" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getProcessDumpCreateRequest(ctx, resourceGroupName, name, processID, options) if err != nil { return WebAppsClientGetProcessDumpResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetProcessDumpResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetProcessDumpResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetProcessDumpResponse{}, err } - return WebAppsClientGetProcessDumpResponse{Body: resp.Body}, nil + return WebAppsClientGetProcessDumpResponse{Body: httpResp.Body}, nil } // getProcessDumpCreateRequest creates the GetProcessDump request. @@ -11013,7 +12323,7 @@ func (client *WebAppsClient) getProcessDumpCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() runtime.SkipBodyDownload(req) req.Raw().Header["Accept"] = []string{"application/json"} @@ -11024,7 +12334,7 @@ func (client *WebAppsClient) getProcessDumpCreateRequest(ctx context.Context, re // site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - processID - PID. @@ -11032,18 +12342,24 @@ func (client *WebAppsClient) getProcessDumpCreateRequest(ctx context.Context, re // - options - WebAppsClientGetProcessDumpSlotOptions contains the optional parameters for the WebAppsClient.GetProcessDumpSlot // method. func (client *WebAppsClient) GetProcessDumpSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, options *WebAppsClientGetProcessDumpSlotOptions) (WebAppsClientGetProcessDumpSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetProcessDumpSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getProcessDumpSlotCreateRequest(ctx, resourceGroupName, name, processID, slot, options) if err != nil { return WebAppsClientGetProcessDumpSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetProcessDumpSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetProcessDumpSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetProcessDumpSlotResponse{}, err } - return WebAppsClientGetProcessDumpSlotResponse{Body: resp.Body}, nil + return WebAppsClientGetProcessDumpSlotResponse{Body: httpResp.Body}, nil } // getProcessDumpSlotCreateRequest creates the GetProcessDumpSlot request. @@ -11074,7 +12390,7 @@ func (client *WebAppsClient) getProcessDumpSlotCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() runtime.SkipBodyDownload(req) req.Raw().Header["Accept"] = []string{"application/json"} @@ -11084,7 +12400,7 @@ func (client *WebAppsClient) getProcessDumpSlotCreateRequest(ctx context.Context // GetProcessModule - Description for Get process information by its ID for a specific scaled-out instance in a web site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - processID - PID. @@ -11092,18 +12408,25 @@ func (client *WebAppsClient) getProcessDumpSlotCreateRequest(ctx context.Context // - options - WebAppsClientGetProcessModuleOptions contains the optional parameters for the WebAppsClient.GetProcessModule // method. func (client *WebAppsClient) GetProcessModule(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, options *WebAppsClientGetProcessModuleOptions) (WebAppsClientGetProcessModuleResponse, error) { + var err error + const operationName = "WebAppsClient.GetProcessModule" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getProcessModuleCreateRequest(ctx, resourceGroupName, name, processID, baseAddress, options) if err != nil { return WebAppsClientGetProcessModuleResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetProcessModuleResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetProcessModuleResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetProcessModuleResponse{}, err } - return client.getProcessModuleHandleResponse(resp) + resp, err := client.getProcessModuleHandleResponse(httpResp) + return resp, err } // getProcessModuleCreateRequest creates the GetProcessModule request. @@ -11134,7 +12457,7 @@ func (client *WebAppsClient) getProcessModuleCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11152,7 +12475,7 @@ func (client *WebAppsClient) getProcessModuleHandleResponse(resp *http.Response) // GetProcessModuleSlot - Description for Get process information by its ID for a specific scaled-out instance in a web site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - processID - PID. @@ -11161,18 +12484,25 @@ func (client *WebAppsClient) getProcessModuleHandleResponse(resp *http.Response) // - options - WebAppsClientGetProcessModuleSlotOptions contains the optional parameters for the WebAppsClient.GetProcessModuleSlot // method. func (client *WebAppsClient) GetProcessModuleSlot(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string, options *WebAppsClientGetProcessModuleSlotOptions) (WebAppsClientGetProcessModuleSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetProcessModuleSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getProcessModuleSlotCreateRequest(ctx, resourceGroupName, name, processID, baseAddress, slot, options) if err != nil { return WebAppsClientGetProcessModuleSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetProcessModuleSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetProcessModuleSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetProcessModuleSlotResponse{}, err } - return client.getProcessModuleSlotHandleResponse(resp) + resp, err := client.getProcessModuleSlotHandleResponse(httpResp) + return resp, err } // getProcessModuleSlotCreateRequest creates the GetProcessModuleSlot request. @@ -11207,7 +12537,7 @@ func (client *WebAppsClient) getProcessModuleSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11225,25 +12555,32 @@ func (client *WebAppsClient) getProcessModuleSlotHandleResponse(resp *http.Respo // GetProcessSlot - Description for Get process information by its ID for a specific scaled-out instance in a web site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - processID - PID. // - slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. // - options - WebAppsClientGetProcessSlotOptions contains the optional parameters for the WebAppsClient.GetProcessSlot method. func (client *WebAppsClient) GetProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, options *WebAppsClientGetProcessSlotOptions) (WebAppsClientGetProcessSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetProcessSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getProcessSlotCreateRequest(ctx, resourceGroupName, name, processID, slot, options) if err != nil { return WebAppsClientGetProcessSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetProcessSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetProcessSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetProcessSlotResponse{}, err } - return client.getProcessSlotHandleResponse(resp) + resp, err := client.getProcessSlotHandleResponse(httpResp) + return resp, err } // getProcessSlotCreateRequest creates the GetProcessSlot request. @@ -11274,7 +12611,7 @@ func (client *WebAppsClient) getProcessSlotCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11292,7 +12629,7 @@ func (client *WebAppsClient) getProcessSlotHandleResponse(resp *http.Response) ( // BeginGetProductionSiteDeploymentStatus - Gets the deployment status for an app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - deploymentStatusID - GUID of the deployment operation. @@ -11304,29 +12641,40 @@ func (client *WebAppsClient) BeginGetProductionSiteDeploymentStatus(ctx context. if err != nil { return nil, err } - return runtime.NewPoller[WebAppsClientGetProductionSiteDeploymentStatusResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientGetProductionSiteDeploymentStatusResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WebAppsClientGetProductionSiteDeploymentStatusResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientGetProductionSiteDeploymentStatusResponse]{ + Tracer: client.internal.Tracer(), + }) } } // GetProductionSiteDeploymentStatus - Gets the deployment status for an app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *WebAppsClient) getProductionSiteDeploymentStatus(ctx context.Context, resourceGroupName string, name string, deploymentStatusID string, options *WebAppsClientBeginGetProductionSiteDeploymentStatusOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginGetProductionSiteDeploymentStatus" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getProductionSiteDeploymentStatusCreateRequest(ctx, resourceGroupName, name, deploymentStatusID, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // getProductionSiteDeploymentStatusCreateRequest creates the GetProductionSiteDeploymentStatus request. @@ -11353,7 +12701,7 @@ func (client *WebAppsClient) getProductionSiteDeploymentStatusCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11362,25 +12710,32 @@ func (client *WebAppsClient) getProductionSiteDeploymentStatusCreateRequest(ctx // GetPublicCertificate - Description for Get the named public certificate for an app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - publicCertificateName - Public certificate name. // - options - WebAppsClientGetPublicCertificateOptions contains the optional parameters for the WebAppsClient.GetPublicCertificate // method. func (client *WebAppsClient) GetPublicCertificate(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, options *WebAppsClientGetPublicCertificateOptions) (WebAppsClientGetPublicCertificateResponse, error) { + var err error + const operationName = "WebAppsClient.GetPublicCertificate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getPublicCertificateCreateRequest(ctx, resourceGroupName, name, publicCertificateName, options) if err != nil { return WebAppsClientGetPublicCertificateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetPublicCertificateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetPublicCertificateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetPublicCertificateResponse{}, err } - return client.getPublicCertificateHandleResponse(resp) + resp, err := client.getPublicCertificateHandleResponse(httpResp) + return resp, err } // getPublicCertificateCreateRequest creates the GetPublicCertificate request. @@ -11407,7 +12762,7 @@ func (client *WebAppsClient) getPublicCertificateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11425,7 +12780,7 @@ func (client *WebAppsClient) getPublicCertificateHandleResponse(resp *http.Respo // GetPublicCertificateSlot - Description for Get the named public certificate for an app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API the named binding for the production slot. @@ -11433,18 +12788,25 @@ func (client *WebAppsClient) getPublicCertificateHandleResponse(resp *http.Respo // - options - WebAppsClientGetPublicCertificateSlotOptions contains the optional parameters for the WebAppsClient.GetPublicCertificateSlot // method. func (client *WebAppsClient) GetPublicCertificateSlot(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string, options *WebAppsClientGetPublicCertificateSlotOptions) (WebAppsClientGetPublicCertificateSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetPublicCertificateSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getPublicCertificateSlotCreateRequest(ctx, resourceGroupName, name, slot, publicCertificateName, options) if err != nil { return WebAppsClientGetPublicCertificateSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetPublicCertificateSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetPublicCertificateSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetPublicCertificateSlotResponse{}, err } - return client.getPublicCertificateSlotHandleResponse(resp) + resp, err := client.getPublicCertificateSlotHandleResponse(httpResp) + return resp, err } // getPublicCertificateSlotCreateRequest creates the GetPublicCertificateSlot request. @@ -11475,7 +12837,7 @@ func (client *WebAppsClient) getPublicCertificateSlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11493,25 +12855,32 @@ func (client *WebAppsClient) getPublicCertificateSlotHandleResponse(resp *http.R // GetRelayServiceConnection - Description for Gets a hybrid connection configuration by its name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - entityName - Name of the hybrid connection. // - options - WebAppsClientGetRelayServiceConnectionOptions contains the optional parameters for the WebAppsClient.GetRelayServiceConnection // method. func (client *WebAppsClient) GetRelayServiceConnection(ctx context.Context, resourceGroupName string, name string, entityName string, options *WebAppsClientGetRelayServiceConnectionOptions) (WebAppsClientGetRelayServiceConnectionResponse, error) { + var err error + const operationName = "WebAppsClient.GetRelayServiceConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getRelayServiceConnectionCreateRequest(ctx, resourceGroupName, name, entityName, options) if err != nil { return WebAppsClientGetRelayServiceConnectionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetRelayServiceConnectionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetRelayServiceConnectionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetRelayServiceConnectionResponse{}, err } - return client.getRelayServiceConnectionHandleResponse(resp) + resp, err := client.getRelayServiceConnectionHandleResponse(httpResp) + return resp, err } // getRelayServiceConnectionCreateRequest creates the GetRelayServiceConnection request. @@ -11538,7 +12907,7 @@ func (client *WebAppsClient) getRelayServiceConnectionCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11556,7 +12925,7 @@ func (client *WebAppsClient) getRelayServiceConnectionHandleResponse(resp *http. // GetRelayServiceConnectionSlot - Description for Gets a hybrid connection configuration by its name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - entityName - Name of the hybrid connection. @@ -11565,18 +12934,25 @@ func (client *WebAppsClient) getRelayServiceConnectionHandleResponse(resp *http. // - options - WebAppsClientGetRelayServiceConnectionSlotOptions contains the optional parameters for the WebAppsClient.GetRelayServiceConnectionSlot // method. func (client *WebAppsClient) GetRelayServiceConnectionSlot(ctx context.Context, resourceGroupName string, name string, entityName string, slot string, options *WebAppsClientGetRelayServiceConnectionSlotOptions) (WebAppsClientGetRelayServiceConnectionSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetRelayServiceConnectionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getRelayServiceConnectionSlotCreateRequest(ctx, resourceGroupName, name, entityName, slot, options) if err != nil { return WebAppsClientGetRelayServiceConnectionSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetRelayServiceConnectionSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetRelayServiceConnectionSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetRelayServiceConnectionSlotResponse{}, err } - return client.getRelayServiceConnectionSlotHandleResponse(resp) + resp, err := client.getRelayServiceConnectionSlotHandleResponse(httpResp) + return resp, err } // getRelayServiceConnectionSlotCreateRequest creates the GetRelayServiceConnectionSlot request. @@ -11607,7 +12983,7 @@ func (client *WebAppsClient) getRelayServiceConnectionSlotCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11625,23 +13001,30 @@ func (client *WebAppsClient) getRelayServiceConnectionSlotHandleResponse(resp *h // GetScmAllowed - Description for Returns whether Scm basic auth is allowed on the site or not. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientGetScmAllowedOptions contains the optional parameters for the WebAppsClient.GetScmAllowed method. func (client *WebAppsClient) GetScmAllowed(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetScmAllowedOptions) (WebAppsClientGetScmAllowedResponse, error) { + var err error + const operationName = "WebAppsClient.GetScmAllowed" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getScmAllowedCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientGetScmAllowedResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetScmAllowedResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetScmAllowedResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetScmAllowedResponse{}, err } - return client.getScmAllowedHandleResponse(resp) + resp, err := client.getScmAllowedHandleResponse(httpResp) + return resp, err } // getScmAllowedCreateRequest creates the GetScmAllowed request. @@ -11664,7 +13047,7 @@ func (client *WebAppsClient) getScmAllowedCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11682,24 +13065,31 @@ func (client *WebAppsClient) getScmAllowedHandleResponse(resp *http.Response) (W // GetScmAllowedSlot - Description for Returns whether Scm basic auth is allowed on the site or not. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientGetScmAllowedSlotOptions contains the optional parameters for the WebAppsClient.GetScmAllowedSlot // method. func (client *WebAppsClient) GetScmAllowedSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetScmAllowedSlotOptions) (WebAppsClientGetScmAllowedSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetScmAllowedSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getScmAllowedSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientGetScmAllowedSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetScmAllowedSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetScmAllowedSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetScmAllowedSlotResponse{}, err } - return client.getScmAllowedSlotHandleResponse(resp) + resp, err := client.getScmAllowedSlotHandleResponse(httpResp) + return resp, err } // getScmAllowedSlotCreateRequest creates the GetScmAllowedSlot request. @@ -11726,7 +13116,7 @@ func (client *WebAppsClient) getScmAllowedSlotCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11744,24 +13134,31 @@ func (client *WebAppsClient) getScmAllowedSlotHandleResponse(resp *http.Response // GetSiteConnectionStringKeyVaultReference - Description for Gets the config reference and status of an app // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientGetSiteConnectionStringKeyVaultReferenceOptions contains the optional parameters for the WebAppsClient.GetSiteConnectionStringKeyVaultReference // method. func (client *WebAppsClient) GetSiteConnectionStringKeyVaultReference(ctx context.Context, resourceGroupName string, name string, connectionStringKey string, options *WebAppsClientGetSiteConnectionStringKeyVaultReferenceOptions) (WebAppsClientGetSiteConnectionStringKeyVaultReferenceResponse, error) { + var err error + const operationName = "WebAppsClient.GetSiteConnectionStringKeyVaultReference" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getSiteConnectionStringKeyVaultReferenceCreateRequest(ctx, resourceGroupName, name, connectionStringKey, options) if err != nil { return WebAppsClientGetSiteConnectionStringKeyVaultReferenceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetSiteConnectionStringKeyVaultReferenceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetSiteConnectionStringKeyVaultReferenceResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetSiteConnectionStringKeyVaultReferenceResponse{}, err } - return client.getSiteConnectionStringKeyVaultReferenceHandleResponse(resp) + resp, err := client.getSiteConnectionStringKeyVaultReferenceHandleResponse(httpResp) + return resp, err } // getSiteConnectionStringKeyVaultReferenceCreateRequest creates the GetSiteConnectionStringKeyVaultReference request. @@ -11788,7 +13185,7 @@ func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferenceCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11806,24 +13203,31 @@ func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferenceHandleRespo // GetSiteConnectionStringKeyVaultReferenceSlot - Description for Gets the config reference and status of an app // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotOptions contains the optional parameters for the WebAppsClient.GetSiteConnectionStringKeyVaultReferenceSlot // method. func (client *WebAppsClient) GetSiteConnectionStringKeyVaultReferenceSlot(ctx context.Context, resourceGroupName string, name string, connectionStringKey string, slot string, options *WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotOptions) (WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetSiteConnectionStringKeyVaultReferenceSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getSiteConnectionStringKeyVaultReferenceSlotCreateRequest(ctx, resourceGroupName, name, connectionStringKey, slot, options) if err != nil { return WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetSiteConnectionStringKeyVaultReferenceSlotResponse{}, err } - return client.getSiteConnectionStringKeyVaultReferenceSlotHandleResponse(resp) + resp, err := client.getSiteConnectionStringKeyVaultReferenceSlotHandleResponse(httpResp) + return resp, err } // getSiteConnectionStringKeyVaultReferenceSlotCreateRequest creates the GetSiteConnectionStringKeyVaultReferenceSlot request. @@ -11854,7 +13258,7 @@ func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferenceSlotCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11872,7 +13276,7 @@ func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferenceSlotHandleR // NewGetSiteConnectionStringKeyVaultReferencesPager - Description for Gets the config reference app settings and status of // an app // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientGetSiteConnectionStringKeyVaultReferencesOptions contains the optional parameters for the WebAppsClient.NewGetSiteConnectionStringKeyVaultReferencesPager @@ -11883,25 +13287,20 @@ func (client *WebAppsClient) NewGetSiteConnectionStringKeyVaultReferencesPager(r return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse) (WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getSiteConnectionStringKeyVaultReferencesCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewGetSiteConnectionStringKeyVaultReferencesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getSiteConnectionStringKeyVaultReferencesCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetSiteConnectionStringKeyVaultReferencesResponse{}, runtime.NewResponseError(resp) - } return client.getSiteConnectionStringKeyVaultReferencesHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -11925,7 +13324,7 @@ func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferencesCreateRequ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -11943,7 +13342,7 @@ func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferencesHandleResp // NewGetSiteConnectionStringKeyVaultReferencesSlotPager - Description for Gets the config reference app settings and status // of an app // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotOptions contains the optional parameters for the WebAppsClient.NewGetSiteConnectionStringKeyVaultReferencesSlotPager @@ -11954,25 +13353,20 @@ func (client *WebAppsClient) NewGetSiteConnectionStringKeyVaultReferencesSlotPag return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse) (WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.getSiteConnectionStringKeyVaultReferencesSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewGetSiteConnectionStringKeyVaultReferencesSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.getSiteConnectionStringKeyVaultReferencesSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) if err != nil { return WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetSiteConnectionStringKeyVaultReferencesSlotResponse{}, runtime.NewResponseError(resp) - } return client.getSiteConnectionStringKeyVaultReferencesSlotHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -12000,7 +13394,7 @@ func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferencesSlotCreate return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12018,25 +13412,32 @@ func (client *WebAppsClient) getSiteConnectionStringKeyVaultReferencesSlotHandle // GetSiteExtension - Description for Get site extension information by its ID for a web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - siteExtensionID - Site extension name. // - options - WebAppsClientGetSiteExtensionOptions contains the optional parameters for the WebAppsClient.GetSiteExtension // method. func (client *WebAppsClient) GetSiteExtension(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, options *WebAppsClientGetSiteExtensionOptions) (WebAppsClientGetSiteExtensionResponse, error) { + var err error + const operationName = "WebAppsClient.GetSiteExtension" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getSiteExtensionCreateRequest(ctx, resourceGroupName, name, siteExtensionID, options) if err != nil { return WebAppsClientGetSiteExtensionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetSiteExtensionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetSiteExtensionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetSiteExtensionResponse{}, err } - return client.getSiteExtensionHandleResponse(resp) + resp, err := client.getSiteExtensionHandleResponse(httpResp) + return resp, err } // getSiteExtensionCreateRequest creates the GetSiteExtension request. @@ -12063,7 +13464,7 @@ func (client *WebAppsClient) getSiteExtensionCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12081,7 +13482,7 @@ func (client *WebAppsClient) getSiteExtensionHandleResponse(resp *http.Response) // GetSiteExtensionSlot - Description for Get site extension information by its ID for a web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - siteExtensionID - Site extension name. @@ -12089,18 +13490,25 @@ func (client *WebAppsClient) getSiteExtensionHandleResponse(resp *http.Response) // - options - WebAppsClientGetSiteExtensionSlotOptions contains the optional parameters for the WebAppsClient.GetSiteExtensionSlot // method. func (client *WebAppsClient) GetSiteExtensionSlot(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string, options *WebAppsClientGetSiteExtensionSlotOptions) (WebAppsClientGetSiteExtensionSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetSiteExtensionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getSiteExtensionSlotCreateRequest(ctx, resourceGroupName, name, siteExtensionID, slot, options) if err != nil { return WebAppsClientGetSiteExtensionSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetSiteExtensionSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetSiteExtensionSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetSiteExtensionSlotResponse{}, err } - return client.getSiteExtensionSlotHandleResponse(resp) + resp, err := client.getSiteExtensionSlotHandleResponse(httpResp) + return resp, err } // getSiteExtensionSlotCreateRequest creates the GetSiteExtensionSlot request. @@ -12131,7 +13539,7 @@ func (client *WebAppsClient) getSiteExtensionSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12149,24 +13557,31 @@ func (client *WebAppsClient) getSiteExtensionSlotHandleResponse(resp *http.Respo // GetSitePhpErrorLogFlag - Description for Gets web app's event logs. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - options - WebAppsClientGetSitePhpErrorLogFlagOptions contains the optional parameters for the WebAppsClient.GetSitePhpErrorLogFlag // method. func (client *WebAppsClient) GetSitePhpErrorLogFlag(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetSitePhpErrorLogFlagOptions) (WebAppsClientGetSitePhpErrorLogFlagResponse, error) { + var err error + const operationName = "WebAppsClient.GetSitePhpErrorLogFlag" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getSitePhpErrorLogFlagCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientGetSitePhpErrorLogFlagResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetSitePhpErrorLogFlagResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetSitePhpErrorLogFlagResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetSitePhpErrorLogFlagResponse{}, err } - return client.getSitePhpErrorLogFlagHandleResponse(resp) + resp, err := client.getSitePhpErrorLogFlagHandleResponse(httpResp) + return resp, err } // getSitePhpErrorLogFlagCreateRequest creates the GetSitePhpErrorLogFlag request. @@ -12189,7 +13604,7 @@ func (client *WebAppsClient) getSitePhpErrorLogFlagCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12207,25 +13622,32 @@ func (client *WebAppsClient) getSitePhpErrorLogFlagHandleResponse(resp *http.Res // GetSitePhpErrorLogFlagSlot - Description for Gets web app's event logs. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - slot - Name of web app slot. If not specified then will default to production slot. // - options - WebAppsClientGetSitePhpErrorLogFlagSlotOptions contains the optional parameters for the WebAppsClient.GetSitePhpErrorLogFlagSlot // method. func (client *WebAppsClient) GetSitePhpErrorLogFlagSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetSitePhpErrorLogFlagSlotOptions) (WebAppsClientGetSitePhpErrorLogFlagSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetSitePhpErrorLogFlagSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getSitePhpErrorLogFlagSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientGetSitePhpErrorLogFlagSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetSitePhpErrorLogFlagSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetSitePhpErrorLogFlagSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetSitePhpErrorLogFlagSlotResponse{}, err } - return client.getSitePhpErrorLogFlagSlotHandleResponse(resp) + resp, err := client.getSitePhpErrorLogFlagSlotHandleResponse(httpResp) + return resp, err } // getSitePhpErrorLogFlagSlotCreateRequest creates the GetSitePhpErrorLogFlagSlot request. @@ -12252,7 +13674,7 @@ func (client *WebAppsClient) getSitePhpErrorLogFlagSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12270,24 +13692,31 @@ func (client *WebAppsClient) getSitePhpErrorLogFlagSlotHandleResponse(resp *http // GetSlot - Description for Gets the details of a web, mobile, or API app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. By default, this API returns the production slot. // - options - WebAppsClientGetSlotOptions contains the optional parameters for the WebAppsClient.GetSlot method. func (client *WebAppsClient) GetSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetSlotOptions) (WebAppsClientGetSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientGetSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetSlotResponse{}, err } - return client.getSlotHandleResponse(resp) + resp, err := client.getSlotHandleResponse(httpResp) + return resp, err } // getSlotCreateRequest creates the GetSlot request. @@ -12314,7 +13743,7 @@ func (client *WebAppsClient) getSlotCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12332,7 +13761,7 @@ func (client *WebAppsClient) getSlotHandleResponse(resp *http.Response) (WebApps // BeginGetSlotSiteDeploymentStatusSlot - Gets the deployment status for an app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will get the deployment status for the production @@ -12346,29 +13775,40 @@ func (client *WebAppsClient) BeginGetSlotSiteDeploymentStatusSlot(ctx context.Co if err != nil { return nil, err } - return runtime.NewPoller[WebAppsClientGetSlotSiteDeploymentStatusSlotResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientGetSlotSiteDeploymentStatusSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WebAppsClientGetSlotSiteDeploymentStatusSlotResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientGetSlotSiteDeploymentStatusSlotResponse]{ + Tracer: client.internal.Tracer(), + }) } } // GetSlotSiteDeploymentStatusSlot - Gets the deployment status for an app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *WebAppsClient) getSlotSiteDeploymentStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string, deploymentStatusID string, options *WebAppsClientBeginGetSlotSiteDeploymentStatusSlotOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginGetSlotSiteDeploymentStatusSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getSlotSiteDeploymentStatusSlotCreateRequest(ctx, resourceGroupName, name, slot, deploymentStatusID, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // getSlotSiteDeploymentStatusSlotCreateRequest creates the GetSlotSiteDeploymentStatusSlot request. @@ -12399,7 +13839,7 @@ func (client *WebAppsClient) getSlotSiteDeploymentStatusSlotCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12408,24 +13848,31 @@ func (client *WebAppsClient) getSlotSiteDeploymentStatusSlotCreateRequest(ctx co // GetSourceControl - Description for Gets the source control configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientGetSourceControlOptions contains the optional parameters for the WebAppsClient.GetSourceControl // method. func (client *WebAppsClient) GetSourceControl(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetSourceControlOptions) (WebAppsClientGetSourceControlResponse, error) { + var err error + const operationName = "WebAppsClient.GetSourceControl" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getSourceControlCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientGetSourceControlResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetSourceControlResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return WebAppsClientGetSourceControlResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetSourceControlResponse{}, err } - return client.getSourceControlHandleResponse(resp) + resp, err := client.getSourceControlHandleResponse(httpResp) + return resp, err } // getSourceControlCreateRequest creates the GetSourceControl request. @@ -12448,7 +13895,7 @@ func (client *WebAppsClient) getSourceControlCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12466,7 +13913,7 @@ func (client *WebAppsClient) getSourceControlHandleResponse(resp *http.Response) // GetSourceControlSlot - Description for Gets the source control configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will get the source control configuration for the @@ -12474,18 +13921,25 @@ func (client *WebAppsClient) getSourceControlHandleResponse(resp *http.Response) // - options - WebAppsClientGetSourceControlSlotOptions contains the optional parameters for the WebAppsClient.GetSourceControlSlot // method. func (client *WebAppsClient) GetSourceControlSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetSourceControlSlotOptions) (WebAppsClientGetSourceControlSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetSourceControlSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getSourceControlSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientGetSourceControlSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetSourceControlSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return WebAppsClientGetSourceControlSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetSourceControlSlotResponse{}, err } - return client.getSourceControlSlotHandleResponse(resp) + resp, err := client.getSourceControlSlotHandleResponse(httpResp) + return resp, err } // getSourceControlSlotCreateRequest creates the GetSourceControlSlot request. @@ -12512,7 +13966,7 @@ func (client *WebAppsClient) getSourceControlSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12530,24 +13984,31 @@ func (client *WebAppsClient) getSourceControlSlotHandleResponse(resp *http.Respo // GetSwiftVirtualNetworkConnection - Description for Gets a Swift Virtual Network connection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientGetSwiftVirtualNetworkConnectionOptions contains the optional parameters for the WebAppsClient.GetSwiftVirtualNetworkConnection // method. func (client *WebAppsClient) GetSwiftVirtualNetworkConnection(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetSwiftVirtualNetworkConnectionOptions) (WebAppsClientGetSwiftVirtualNetworkConnectionResponse, error) { + var err error + const operationName = "WebAppsClient.GetSwiftVirtualNetworkConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getSwiftVirtualNetworkConnectionCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientGetSwiftVirtualNetworkConnectionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetSwiftVirtualNetworkConnectionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetSwiftVirtualNetworkConnectionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetSwiftVirtualNetworkConnectionResponse{}, err } - return client.getSwiftVirtualNetworkConnectionHandleResponse(resp) + resp, err := client.getSwiftVirtualNetworkConnectionHandleResponse(httpResp) + return resp, err } // getSwiftVirtualNetworkConnectionCreateRequest creates the GetSwiftVirtualNetworkConnection request. @@ -12570,7 +14031,7 @@ func (client *WebAppsClient) getSwiftVirtualNetworkConnectionCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12588,7 +14049,7 @@ func (client *WebAppsClient) getSwiftVirtualNetworkConnectionHandleResponse(resp // GetSwiftVirtualNetworkConnectionSlot - Description for Gets a Swift Virtual Network connection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will get a gateway for the production slot's Virtual @@ -12596,18 +14057,25 @@ func (client *WebAppsClient) getSwiftVirtualNetworkConnectionHandleResponse(resp // - options - WebAppsClientGetSwiftVirtualNetworkConnectionSlotOptions contains the optional parameters for the WebAppsClient.GetSwiftVirtualNetworkConnectionSlot // method. func (client *WebAppsClient) GetSwiftVirtualNetworkConnectionSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetSwiftVirtualNetworkConnectionSlotOptions) (WebAppsClientGetSwiftVirtualNetworkConnectionSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetSwiftVirtualNetworkConnectionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getSwiftVirtualNetworkConnectionSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientGetSwiftVirtualNetworkConnectionSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetSwiftVirtualNetworkConnectionSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetSwiftVirtualNetworkConnectionSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetSwiftVirtualNetworkConnectionSlotResponse{}, err } - return client.getSwiftVirtualNetworkConnectionSlotHandleResponse(resp) + resp, err := client.getSwiftVirtualNetworkConnectionSlotHandleResponse(httpResp) + return resp, err } // getSwiftVirtualNetworkConnectionSlotCreateRequest creates the GetSwiftVirtualNetworkConnectionSlot request. @@ -12634,7 +14102,7 @@ func (client *WebAppsClient) getSwiftVirtualNetworkConnectionSlotCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12652,25 +14120,32 @@ func (client *WebAppsClient) getSwiftVirtualNetworkConnectionSlotHandleResponse( // GetTriggeredWebJob - Description for Gets a triggered web job by its ID for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - webJobName - Name of Web Job. // - options - WebAppsClientGetTriggeredWebJobOptions contains the optional parameters for the WebAppsClient.GetTriggeredWebJob // method. func (client *WebAppsClient) GetTriggeredWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientGetTriggeredWebJobOptions) (WebAppsClientGetTriggeredWebJobResponse, error) { + var err error + const operationName = "WebAppsClient.GetTriggeredWebJob" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getTriggeredWebJobCreateRequest(ctx, resourceGroupName, name, webJobName, options) if err != nil { return WebAppsClientGetTriggeredWebJobResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetTriggeredWebJobResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetTriggeredWebJobResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetTriggeredWebJobResponse{}, err } - return client.getTriggeredWebJobHandleResponse(resp) + resp, err := client.getTriggeredWebJobHandleResponse(httpResp) + return resp, err } // getTriggeredWebJobCreateRequest creates the GetTriggeredWebJob request. @@ -12697,7 +14172,7 @@ func (client *WebAppsClient) getTriggeredWebJobCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12716,7 +14191,7 @@ func (client *WebAppsClient) getTriggeredWebJobHandleResponse(resp *http.Respons // slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - webJobName - Name of Web Job. @@ -12724,18 +14199,25 @@ func (client *WebAppsClient) getTriggeredWebJobHandleResponse(resp *http.Respons // - options - WebAppsClientGetTriggeredWebJobHistoryOptions contains the optional parameters for the WebAppsClient.GetTriggeredWebJobHistory // method. func (client *WebAppsClient) GetTriggeredWebJobHistory(ctx context.Context, resourceGroupName string, name string, webJobName string, id string, options *WebAppsClientGetTriggeredWebJobHistoryOptions) (WebAppsClientGetTriggeredWebJobHistoryResponse, error) { + var err error + const operationName = "WebAppsClient.GetTriggeredWebJobHistory" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getTriggeredWebJobHistoryCreateRequest(ctx, resourceGroupName, name, webJobName, id, options) if err != nil { return WebAppsClientGetTriggeredWebJobHistoryResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetTriggeredWebJobHistoryResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetTriggeredWebJobHistoryResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetTriggeredWebJobHistoryResponse{}, err } - return client.getTriggeredWebJobHistoryHandleResponse(resp) + resp, err := client.getTriggeredWebJobHistoryHandleResponse(httpResp) + return resp, err } // getTriggeredWebJobHistoryCreateRequest creates the GetTriggeredWebJobHistory request. @@ -12766,7 +14248,7 @@ func (client *WebAppsClient) getTriggeredWebJobHistoryCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12785,7 +14267,7 @@ func (client *WebAppsClient) getTriggeredWebJobHistoryHandleResponse(resp *http. // slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - webJobName - Name of Web Job. @@ -12794,18 +14276,25 @@ func (client *WebAppsClient) getTriggeredWebJobHistoryHandleResponse(resp *http. // - options - WebAppsClientGetTriggeredWebJobHistorySlotOptions contains the optional parameters for the WebAppsClient.GetTriggeredWebJobHistorySlot // method. func (client *WebAppsClient) GetTriggeredWebJobHistorySlot(ctx context.Context, resourceGroupName string, name string, webJobName string, id string, slot string, options *WebAppsClientGetTriggeredWebJobHistorySlotOptions) (WebAppsClientGetTriggeredWebJobHistorySlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetTriggeredWebJobHistorySlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getTriggeredWebJobHistorySlotCreateRequest(ctx, resourceGroupName, name, webJobName, id, slot, options) if err != nil { return WebAppsClientGetTriggeredWebJobHistorySlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetTriggeredWebJobHistorySlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetTriggeredWebJobHistorySlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetTriggeredWebJobHistorySlotResponse{}, err } - return client.getTriggeredWebJobHistorySlotHandleResponse(resp) + resp, err := client.getTriggeredWebJobHistorySlotHandleResponse(httpResp) + return resp, err } // getTriggeredWebJobHistorySlotCreateRequest creates the GetTriggeredWebJobHistorySlot request. @@ -12840,7 +14329,7 @@ func (client *WebAppsClient) getTriggeredWebJobHistorySlotCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12858,7 +14347,7 @@ func (client *WebAppsClient) getTriggeredWebJobHistorySlotHandleResponse(resp *h // GetTriggeredWebJobSlot - Description for Gets a triggered web job by its ID for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - webJobName - Name of Web Job. @@ -12866,18 +14355,25 @@ func (client *WebAppsClient) getTriggeredWebJobHistorySlotHandleResponse(resp *h // - options - WebAppsClientGetTriggeredWebJobSlotOptions contains the optional parameters for the WebAppsClient.GetTriggeredWebJobSlot // method. func (client *WebAppsClient) GetTriggeredWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientGetTriggeredWebJobSlotOptions) (WebAppsClientGetTriggeredWebJobSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetTriggeredWebJobSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getTriggeredWebJobSlotCreateRequest(ctx, resourceGroupName, name, webJobName, slot, options) if err != nil { return WebAppsClientGetTriggeredWebJobSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetTriggeredWebJobSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetTriggeredWebJobSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetTriggeredWebJobSlotResponse{}, err } - return client.getTriggeredWebJobSlotHandleResponse(resp) + resp, err := client.getTriggeredWebJobSlotHandleResponse(httpResp) + return resp, err } // getTriggeredWebJobSlotCreateRequest creates the GetTriggeredWebJobSlot request. @@ -12908,7 +14404,7 @@ func (client *WebAppsClient) getTriggeredWebJobSlotCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12926,25 +14422,32 @@ func (client *WebAppsClient) getTriggeredWebJobSlotHandleResponse(resp *http.Res // GetVnetConnection - Description for Gets a virtual network the app (or deployment slot) is connected to by name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - vnetName - Name of the virtual network. // - options - WebAppsClientGetVnetConnectionOptions contains the optional parameters for the WebAppsClient.GetVnetConnection // method. func (client *WebAppsClient) GetVnetConnection(ctx context.Context, resourceGroupName string, name string, vnetName string, options *WebAppsClientGetVnetConnectionOptions) (WebAppsClientGetVnetConnectionResponse, error) { + var err error + const operationName = "WebAppsClient.GetVnetConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getVnetConnectionCreateRequest(ctx, resourceGroupName, name, vnetName, options) if err != nil { return WebAppsClientGetVnetConnectionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetVnetConnectionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetVnetConnectionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetVnetConnectionResponse{}, err } - return client.getVnetConnectionHandleResponse(resp) + resp, err := client.getVnetConnectionHandleResponse(httpResp) + return resp, err } // getVnetConnectionCreateRequest creates the GetVnetConnection request. @@ -12971,7 +14474,7 @@ func (client *WebAppsClient) getVnetConnectionCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -12989,7 +14492,7 @@ func (client *WebAppsClient) getVnetConnectionHandleResponse(resp *http.Response // GetVnetConnectionGateway - Description for Gets an app's Virtual Network gateway. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - vnetName - Name of the Virtual Network. @@ -12997,18 +14500,25 @@ func (client *WebAppsClient) getVnetConnectionHandleResponse(resp *http.Response // - options - WebAppsClientGetVnetConnectionGatewayOptions contains the optional parameters for the WebAppsClient.GetVnetConnectionGateway // method. func (client *WebAppsClient) GetVnetConnectionGateway(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, options *WebAppsClientGetVnetConnectionGatewayOptions) (WebAppsClientGetVnetConnectionGatewayResponse, error) { + var err error + const operationName = "WebAppsClient.GetVnetConnectionGateway" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getVnetConnectionGatewayCreateRequest(ctx, resourceGroupName, name, vnetName, gatewayName, options) if err != nil { return WebAppsClientGetVnetConnectionGatewayResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetVnetConnectionGatewayResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetVnetConnectionGatewayResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetVnetConnectionGatewayResponse{}, err } - return client.getVnetConnectionGatewayHandleResponse(resp) + resp, err := client.getVnetConnectionGatewayHandleResponse(httpResp) + return resp, err } // getVnetConnectionGatewayCreateRequest creates the GetVnetConnectionGateway request. @@ -13039,7 +14549,7 @@ func (client *WebAppsClient) getVnetConnectionGatewayCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13057,7 +14567,7 @@ func (client *WebAppsClient) getVnetConnectionGatewayHandleResponse(resp *http.R // GetVnetConnectionGatewaySlot - Description for Gets an app's Virtual Network gateway. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - vnetName - Name of the Virtual Network. @@ -13067,18 +14577,25 @@ func (client *WebAppsClient) getVnetConnectionGatewayHandleResponse(resp *http.R // - options - WebAppsClientGetVnetConnectionGatewaySlotOptions contains the optional parameters for the WebAppsClient.GetVnetConnectionGatewaySlot // method. func (client *WebAppsClient) GetVnetConnectionGatewaySlot(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, slot string, options *WebAppsClientGetVnetConnectionGatewaySlotOptions) (WebAppsClientGetVnetConnectionGatewaySlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetVnetConnectionGatewaySlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getVnetConnectionGatewaySlotCreateRequest(ctx, resourceGroupName, name, vnetName, gatewayName, slot, options) if err != nil { return WebAppsClientGetVnetConnectionGatewaySlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetVnetConnectionGatewaySlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetVnetConnectionGatewaySlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetVnetConnectionGatewaySlotResponse{}, err } - return client.getVnetConnectionGatewaySlotHandleResponse(resp) + resp, err := client.getVnetConnectionGatewaySlotHandleResponse(httpResp) + return resp, err } // getVnetConnectionGatewaySlotCreateRequest creates the GetVnetConnectionGatewaySlot request. @@ -13113,7 +14630,7 @@ func (client *WebAppsClient) getVnetConnectionGatewaySlotCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13131,7 +14648,7 @@ func (client *WebAppsClient) getVnetConnectionGatewaySlotHandleResponse(resp *ht // GetVnetConnectionSlot - Description for Gets a virtual network the app (or deployment slot) is connected to by name. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - vnetName - Name of the virtual network. @@ -13140,18 +14657,25 @@ func (client *WebAppsClient) getVnetConnectionGatewaySlotHandleResponse(resp *ht // - options - WebAppsClientGetVnetConnectionSlotOptions contains the optional parameters for the WebAppsClient.GetVnetConnectionSlot // method. func (client *WebAppsClient) GetVnetConnectionSlot(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string, options *WebAppsClientGetVnetConnectionSlotOptions) (WebAppsClientGetVnetConnectionSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetVnetConnectionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getVnetConnectionSlotCreateRequest(ctx, resourceGroupName, name, vnetName, slot, options) if err != nil { return WebAppsClientGetVnetConnectionSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetVnetConnectionSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetVnetConnectionSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetVnetConnectionSlotResponse{}, err } - return client.getVnetConnectionSlotHandleResponse(resp) + resp, err := client.getVnetConnectionSlotHandleResponse(httpResp) + return resp, err } // getVnetConnectionSlotCreateRequest creates the GetVnetConnectionSlot request. @@ -13182,7 +14706,7 @@ func (client *WebAppsClient) getVnetConnectionSlotCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13200,24 +14724,31 @@ func (client *WebAppsClient) getVnetConnectionSlotHandleResponse(resp *http.Resp // GetWebJob - Description for Get webjob information for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - webJobName - Name of the web job. // - options - WebAppsClientGetWebJobOptions contains the optional parameters for the WebAppsClient.GetWebJob method. func (client *WebAppsClient) GetWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientGetWebJobOptions) (WebAppsClientGetWebJobResponse, error) { + var err error + const operationName = "WebAppsClient.GetWebJob" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getWebJobCreateRequest(ctx, resourceGroupName, name, webJobName, options) if err != nil { return WebAppsClientGetWebJobResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetWebJobResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetWebJobResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetWebJobResponse{}, err } - return client.getWebJobHandleResponse(resp) + resp, err := client.getWebJobHandleResponse(httpResp) + return resp, err } // getWebJobCreateRequest creates the GetWebJob request. @@ -13244,7 +14775,7 @@ func (client *WebAppsClient) getWebJobCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13262,25 +14793,32 @@ func (client *WebAppsClient) getWebJobHandleResponse(resp *http.Response) (WebAp // GetWebJobSlot - Description for Get webjob information for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - webJobName - Name of the web job. // - slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. // - options - WebAppsClientGetWebJobSlotOptions contains the optional parameters for the WebAppsClient.GetWebJobSlot method. func (client *WebAppsClient) GetWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientGetWebJobSlotOptions) (WebAppsClientGetWebJobSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetWebJobSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getWebJobSlotCreateRequest(ctx, resourceGroupName, name, webJobName, slot, options) if err != nil { return WebAppsClientGetWebJobSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetWebJobSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetWebJobSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetWebJobSlotResponse{}, err } - return client.getWebJobSlotHandleResponse(resp) + resp, err := client.getWebJobSlotHandleResponse(httpResp) + return resp, err } // getWebJobSlotCreateRequest creates the GetWebJobSlot request. @@ -13311,7 +14849,7 @@ func (client *WebAppsClient) getWebJobSlotCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13329,24 +14867,30 @@ func (client *WebAppsClient) getWebJobSlotHandleResponse(resp *http.Response) (W // GetWebSiteContainerLogs - Description for Gets the last lines of docker logs for the given site // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - options - WebAppsClientGetWebSiteContainerLogsOptions contains the optional parameters for the WebAppsClient.GetWebSiteContainerLogs // method. func (client *WebAppsClient) GetWebSiteContainerLogs(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientGetWebSiteContainerLogsOptions) (WebAppsClientGetWebSiteContainerLogsResponse, error) { + var err error + const operationName = "WebAppsClient.GetWebSiteContainerLogs" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getWebSiteContainerLogsCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientGetWebSiteContainerLogsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetWebSiteContainerLogsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientGetWebSiteContainerLogsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetWebSiteContainerLogsResponse{}, err } - return WebAppsClientGetWebSiteContainerLogsResponse{Body: resp.Body}, nil + return WebAppsClientGetWebSiteContainerLogsResponse{Body: httpResp.Body}, nil } // getWebSiteContainerLogsCreateRequest creates the GetWebSiteContainerLogs request. @@ -13369,7 +14913,7 @@ func (client *WebAppsClient) getWebSiteContainerLogsCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() runtime.SkipBodyDownload(req) req.Raw().Header["Accept"] = []string{"application/octet-stream"} @@ -13379,25 +14923,31 @@ func (client *WebAppsClient) getWebSiteContainerLogsCreateRequest(ctx context.Co // GetWebSiteContainerLogsSlot - Description for Gets the last lines of docker logs for the given site // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - slot - Name of web app slot. If not specified then will default to production slot. // - options - WebAppsClientGetWebSiteContainerLogsSlotOptions contains the optional parameters for the WebAppsClient.GetWebSiteContainerLogsSlot // method. func (client *WebAppsClient) GetWebSiteContainerLogsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientGetWebSiteContainerLogsSlotOptions) (WebAppsClientGetWebSiteContainerLogsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.GetWebSiteContainerLogsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getWebSiteContainerLogsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientGetWebSiteContainerLogsSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetWebSiteContainerLogsSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientGetWebSiteContainerLogsSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetWebSiteContainerLogsSlotResponse{}, err } - return WebAppsClientGetWebSiteContainerLogsSlotResponse{Body: resp.Body}, nil + return WebAppsClientGetWebSiteContainerLogsSlotResponse{Body: httpResp.Body}, nil } // getWebSiteContainerLogsSlotCreateRequest creates the GetWebSiteContainerLogsSlot request. @@ -13424,7 +14974,7 @@ func (client *WebAppsClient) getWebSiteContainerLogsSlotCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() runtime.SkipBodyDownload(req) req.Raw().Header["Accept"] = []string{"application/octet-stream"} @@ -13434,24 +14984,31 @@ func (client *WebAppsClient) getWebSiteContainerLogsSlotCreateRequest(ctx contex // GetWorkflow - Get workflow information by its ID for web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - workflowName - Workflow name. // - options - WebAppsClientGetWorkflowOptions contains the optional parameters for the WebAppsClient.GetWorkflow method. func (client *WebAppsClient) GetWorkflow(ctx context.Context, resourceGroupName string, name string, workflowName string, options *WebAppsClientGetWorkflowOptions) (WebAppsClientGetWorkflowResponse, error) { + var err error + const operationName = "WebAppsClient.GetWorkflow" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getWorkflowCreateRequest(ctx, resourceGroupName, name, workflowName, options) if err != nil { return WebAppsClientGetWorkflowResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientGetWorkflowResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientGetWorkflowResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientGetWorkflowResponse{}, err } - return client.getWorkflowHandleResponse(resp) + resp, err := client.getWorkflowHandleResponse(httpResp) + return resp, err } // getWorkflowCreateRequest creates the GetWorkflow request. @@ -13478,7 +15035,7 @@ func (client *WebAppsClient) getWorkflowCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13496,7 +15053,7 @@ func (client *WebAppsClient) getWorkflowHandleResponse(resp *http.Response) (Web // BeginInstallSiteExtension - Description for Install site extension on a web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - siteExtensionID - Site extension name. @@ -13508,29 +15065,40 @@ func (client *WebAppsClient) BeginInstallSiteExtension(ctx context.Context, reso if err != nil { return nil, err } - return runtime.NewPoller[WebAppsClientInstallSiteExtensionResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientInstallSiteExtensionResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WebAppsClientInstallSiteExtensionResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientInstallSiteExtensionResponse]{ + Tracer: client.internal.Tracer(), + }) } } // InstallSiteExtension - Description for Install site extension on a web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *WebAppsClient) installSiteExtension(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, options *WebAppsClientBeginInstallSiteExtensionOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginInstallSiteExtension" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.installSiteExtensionCreateRequest(ctx, resourceGroupName, name, siteExtensionID, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // installSiteExtensionCreateRequest creates the InstallSiteExtension request. @@ -13557,7 +15125,7 @@ func (client *WebAppsClient) installSiteExtensionCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13566,7 +15134,7 @@ func (client *WebAppsClient) installSiteExtensionCreateRequest(ctx context.Conte // BeginInstallSiteExtensionSlot - Description for Install site extension on a web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - siteExtensionID - Site extension name. @@ -13579,29 +15147,40 @@ func (client *WebAppsClient) BeginInstallSiteExtensionSlot(ctx context.Context, if err != nil { return nil, err } - return runtime.NewPoller[WebAppsClientInstallSiteExtensionSlotResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientInstallSiteExtensionSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WebAppsClientInstallSiteExtensionSlotResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientInstallSiteExtensionSlotResponse]{ + Tracer: client.internal.Tracer(), + }) } } // InstallSiteExtensionSlot - Description for Install site extension on a web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *WebAppsClient) installSiteExtensionSlot(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string, options *WebAppsClientBeginInstallSiteExtensionSlotOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginInstallSiteExtensionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.installSiteExtensionSlotCreateRequest(ctx, resourceGroupName, name, siteExtensionID, slot, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // installSiteExtensionSlotCreateRequest creates the InstallSiteExtensionSlot request. @@ -13632,7 +15211,7 @@ func (client *WebAppsClient) installSiteExtensionSlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13641,23 +15220,30 @@ func (client *WebAppsClient) installSiteExtensionSlotCreateRequest(ctx context.C // IsCloneable - Description for Shows whether an app can be cloned to another resource group or subscription. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientIsCloneableOptions contains the optional parameters for the WebAppsClient.IsCloneable method. func (client *WebAppsClient) IsCloneable(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientIsCloneableOptions) (WebAppsClientIsCloneableResponse, error) { + var err error + const operationName = "WebAppsClient.IsCloneable" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.isCloneableCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientIsCloneableResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientIsCloneableResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientIsCloneableResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientIsCloneableResponse{}, err } - return client.isCloneableHandleResponse(resp) + resp, err := client.isCloneableHandleResponse(httpResp) + return resp, err } // isCloneableCreateRequest creates the IsCloneable request. @@ -13680,7 +15266,7 @@ func (client *WebAppsClient) isCloneableCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13698,24 +15284,31 @@ func (client *WebAppsClient) isCloneableHandleResponse(resp *http.Response) (Web // IsCloneableSlot - Description for Shows whether an app can be cloned to another resource group or subscription. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. By default, this API returns information on the production slot. // - options - WebAppsClientIsCloneableSlotOptions contains the optional parameters for the WebAppsClient.IsCloneableSlot method. func (client *WebAppsClient) IsCloneableSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientIsCloneableSlotOptions) (WebAppsClientIsCloneableSlotResponse, error) { + var err error + const operationName = "WebAppsClient.IsCloneableSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.isCloneableSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientIsCloneableSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientIsCloneableSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientIsCloneableSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientIsCloneableSlotResponse{}, err } - return client.isCloneableSlotHandleResponse(resp) + resp, err := client.isCloneableSlotHandleResponse(httpResp) + return resp, err } // isCloneableSlotCreateRequest creates the IsCloneableSlot request. @@ -13742,7 +15335,7 @@ func (client *WebAppsClient) isCloneableSlotCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13759,7 +15352,7 @@ func (client *WebAppsClient) isCloneableSlotHandleResponse(resp *http.Response) // NewListPager - Description for Get all apps for a subscription. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - options - WebAppsClientListOptions contains the optional parameters for the WebAppsClient.NewListPager method. func (client *WebAppsClient) NewListPager(options *WebAppsClientListOptions) *runtime.Pager[WebAppsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[WebAppsClientListResponse]{ @@ -13767,25 +15360,20 @@ func (client *WebAppsClient) NewListPager(options *WebAppsClientListOptions) *ru return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListResponse) (WebAppsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, options) + }, nil) if err != nil { return WebAppsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -13801,7 +15389,7 @@ func (client *WebAppsClient) listCreateRequest(ctx context.Context, options *Web return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13819,24 +15407,31 @@ func (client *WebAppsClient) listHandleResponse(resp *http.Response) (WebAppsCli // ListApplicationSettings - Description for Gets the application settings of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientListApplicationSettingsOptions contains the optional parameters for the WebAppsClient.ListApplicationSettings // method. func (client *WebAppsClient) ListApplicationSettings(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListApplicationSettingsOptions) (WebAppsClientListApplicationSettingsResponse, error) { + var err error + const operationName = "WebAppsClient.ListApplicationSettings" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listApplicationSettingsCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientListApplicationSettingsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListApplicationSettingsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListApplicationSettingsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListApplicationSettingsResponse{}, err } - return client.listApplicationSettingsHandleResponse(resp) + resp, err := client.listApplicationSettingsHandleResponse(httpResp) + return resp, err } // listApplicationSettingsCreateRequest creates the ListApplicationSettings request. @@ -13859,7 +15454,7 @@ func (client *WebAppsClient) listApplicationSettingsCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13877,7 +15472,7 @@ func (client *WebAppsClient) listApplicationSettingsHandleResponse(resp *http.Re // ListApplicationSettingsSlot - Description for Gets the application settings of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will get the application settings for the production @@ -13885,18 +15480,25 @@ func (client *WebAppsClient) listApplicationSettingsHandleResponse(resp *http.Re // - options - WebAppsClientListApplicationSettingsSlotOptions contains the optional parameters for the WebAppsClient.ListApplicationSettingsSlot // method. func (client *WebAppsClient) ListApplicationSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListApplicationSettingsSlotOptions) (WebAppsClientListApplicationSettingsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ListApplicationSettingsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listApplicationSettingsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientListApplicationSettingsSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListApplicationSettingsSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListApplicationSettingsSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListApplicationSettingsSlotResponse{}, err } - return client.listApplicationSettingsSlotHandleResponse(resp) + resp, err := client.listApplicationSettingsSlotHandleResponse(httpResp) + return resp, err } // listApplicationSettingsSlotCreateRequest creates the ListApplicationSettingsSlot request. @@ -13923,7 +15525,7 @@ func (client *WebAppsClient) listApplicationSettingsSlotCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13941,24 +15543,31 @@ func (client *WebAppsClient) listApplicationSettingsSlotHandleResponse(resp *htt // ListAzureStorageAccounts - Description for Gets the Azure storage account configurations of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientListAzureStorageAccountsOptions contains the optional parameters for the WebAppsClient.ListAzureStorageAccounts // method. func (client *WebAppsClient) ListAzureStorageAccounts(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListAzureStorageAccountsOptions) (WebAppsClientListAzureStorageAccountsResponse, error) { + var err error + const operationName = "WebAppsClient.ListAzureStorageAccounts" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listAzureStorageAccountsCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientListAzureStorageAccountsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListAzureStorageAccountsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListAzureStorageAccountsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListAzureStorageAccountsResponse{}, err } - return client.listAzureStorageAccountsHandleResponse(resp) + resp, err := client.listAzureStorageAccountsHandleResponse(httpResp) + return resp, err } // listAzureStorageAccountsCreateRequest creates the ListAzureStorageAccounts request. @@ -13981,7 +15590,7 @@ func (client *WebAppsClient) listAzureStorageAccountsCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -13999,7 +15608,7 @@ func (client *WebAppsClient) listAzureStorageAccountsHandleResponse(resp *http.R // ListAzureStorageAccountsSlot - Description for Gets the Azure storage account configurations of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will update the Azure storage account configurations @@ -14007,18 +15616,25 @@ func (client *WebAppsClient) listAzureStorageAccountsHandleResponse(resp *http.R // - options - WebAppsClientListAzureStorageAccountsSlotOptions contains the optional parameters for the WebAppsClient.ListAzureStorageAccountsSlot // method. func (client *WebAppsClient) ListAzureStorageAccountsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListAzureStorageAccountsSlotOptions) (WebAppsClientListAzureStorageAccountsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ListAzureStorageAccountsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listAzureStorageAccountsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientListAzureStorageAccountsSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListAzureStorageAccountsSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListAzureStorageAccountsSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListAzureStorageAccountsSlotResponse{}, err } - return client.listAzureStorageAccountsSlotHandleResponse(resp) + resp, err := client.listAzureStorageAccountsSlotHandleResponse(httpResp) + return resp, err } // listAzureStorageAccountsSlotCreateRequest creates the ListAzureStorageAccountsSlot request. @@ -14045,7 +15661,7 @@ func (client *WebAppsClient) listAzureStorageAccountsSlotCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14065,7 +15681,7 @@ func (client *WebAppsClient) listAzureStorageAccountsSlotHandleResponse(resp *ht // backup if a new URL is passed in the request body. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - backupID - ID of backup. @@ -14073,18 +15689,25 @@ func (client *WebAppsClient) listAzureStorageAccountsSlotHandleResponse(resp *ht // - options - WebAppsClientListBackupStatusSecretsOptions contains the optional parameters for the WebAppsClient.ListBackupStatusSecrets // method. func (client *WebAppsClient) ListBackupStatusSecrets(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest, options *WebAppsClientListBackupStatusSecretsOptions) (WebAppsClientListBackupStatusSecretsResponse, error) { + var err error + const operationName = "WebAppsClient.ListBackupStatusSecrets" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listBackupStatusSecretsCreateRequest(ctx, resourceGroupName, name, backupID, request, options) if err != nil { return WebAppsClientListBackupStatusSecretsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListBackupStatusSecretsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListBackupStatusSecretsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListBackupStatusSecretsResponse{}, err } - return client.listBackupStatusSecretsHandleResponse(resp) + resp, err := client.listBackupStatusSecretsHandleResponse(httpResp) + return resp, err } // listBackupStatusSecretsCreateRequest creates the ListBackupStatusSecrets request. @@ -14111,10 +15734,13 @@ func (client *WebAppsClient) listBackupStatusSecretsCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, request) + if err := runtime.MarshalAsJSON(req, request); err != nil { + return nil, err + } + return req, nil } // listBackupStatusSecretsHandleResponse handles the ListBackupStatusSecrets response. @@ -14131,7 +15757,7 @@ func (client *WebAppsClient) listBackupStatusSecretsHandleResponse(resp *http.Re // backup if a new URL is passed in the request body. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - backupID - ID of backup. @@ -14140,18 +15766,25 @@ func (client *WebAppsClient) listBackupStatusSecretsHandleResponse(resp *http.Re // - options - WebAppsClientListBackupStatusSecretsSlotOptions contains the optional parameters for the WebAppsClient.ListBackupStatusSecretsSlot // method. func (client *WebAppsClient) ListBackupStatusSecretsSlot(ctx context.Context, resourceGroupName string, name string, backupID string, slot string, request BackupRequest, options *WebAppsClientListBackupStatusSecretsSlotOptions) (WebAppsClientListBackupStatusSecretsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ListBackupStatusSecretsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listBackupStatusSecretsSlotCreateRequest(ctx, resourceGroupName, name, backupID, slot, request, options) if err != nil { return WebAppsClientListBackupStatusSecretsSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListBackupStatusSecretsSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListBackupStatusSecretsSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListBackupStatusSecretsSlotResponse{}, err } - return client.listBackupStatusSecretsSlotHandleResponse(resp) + resp, err := client.listBackupStatusSecretsSlotHandleResponse(httpResp) + return resp, err } // listBackupStatusSecretsSlotCreateRequest creates the ListBackupStatusSecretsSlot request. @@ -14182,10 +15815,13 @@ func (client *WebAppsClient) listBackupStatusSecretsSlotCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, request) + if err := runtime.MarshalAsJSON(req, request); err != nil { + return nil, err + } + return req, nil } // listBackupStatusSecretsSlotHandleResponse handles the ListBackupStatusSecretsSlot response. @@ -14199,7 +15835,7 @@ func (client *WebAppsClient) listBackupStatusSecretsSlotHandleResponse(resp *htt // NewListBackupsPager - Description for Gets existing backups of an app. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientListBackupsOptions contains the optional parameters for the WebAppsClient.NewListBackupsPager method. @@ -14209,25 +15845,20 @@ func (client *WebAppsClient) NewListBackupsPager(resourceGroupName string, name return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListBackupsResponse) (WebAppsClientListBackupsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBackupsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListBackupsResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListBackupsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBackupsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return WebAppsClientListBackupsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListBackupsResponse{}, runtime.NewResponseError(resp) - } return client.listBackupsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -14251,7 +15882,7 @@ func (client *WebAppsClient) listBackupsCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14268,7 +15899,7 @@ func (client *WebAppsClient) listBackupsHandleResponse(resp *http.Response) (Web // NewListBackupsSlotPager - Description for Gets existing backups of an app. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will get backups of the production slot. @@ -14280,25 +15911,20 @@ func (client *WebAppsClient) NewListBackupsSlotPager(resourceGroupName string, n return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListBackupsSlotResponse) (WebAppsClientListBackupsSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBackupsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListBackupsSlotResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListBackupsSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBackupsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) if err != nil { return WebAppsClientListBackupsSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListBackupsSlotResponse{}, runtime.NewResponseError(resp) - } return client.listBackupsSlotHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -14326,7 +15952,7 @@ func (client *WebAppsClient) listBackupsSlotCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14344,7 +15970,7 @@ func (client *WebAppsClient) listBackupsSlotHandleResponse(resp *http.Response) // NewListBasicPublishingCredentialsPoliciesPager - Description for Returns whether Scm basic auth is allowed and whether // Ftp is allowed for a given site. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientListBasicPublishingCredentialsPoliciesOptions contains the optional parameters for the WebAppsClient.NewListBasicPublishingCredentialsPoliciesPager @@ -14355,25 +15981,20 @@ func (client *WebAppsClient) NewListBasicPublishingCredentialsPoliciesPager(reso return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListBasicPublishingCredentialsPoliciesResponse) (WebAppsClientListBasicPublishingCredentialsPoliciesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBasicPublishingCredentialsPoliciesCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListBasicPublishingCredentialsPoliciesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBasicPublishingCredentialsPoliciesCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return WebAppsClientListBasicPublishingCredentialsPoliciesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebAppsClientListBasicPublishingCredentialsPoliciesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListBasicPublishingCredentialsPoliciesResponse{}, runtime.NewResponseError(resp) - } return client.listBasicPublishingCredentialsPoliciesHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -14397,7 +16018,7 @@ func (client *WebAppsClient) listBasicPublishingCredentialsPoliciesCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14415,7 +16036,7 @@ func (client *WebAppsClient) listBasicPublishingCredentialsPoliciesHandleRespons // NewListBasicPublishingCredentialsPoliciesSlotPager - Description for Returns whether Scm basic auth is allowed and whether // Ftp is allowed for a given site. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientListBasicPublishingCredentialsPoliciesSlotOptions contains the optional parameters for the WebAppsClient.NewListBasicPublishingCredentialsPoliciesSlotPager @@ -14426,25 +16047,20 @@ func (client *WebAppsClient) NewListBasicPublishingCredentialsPoliciesSlotPager( return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse) (WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBasicPublishingCredentialsPoliciesSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListBasicPublishingCredentialsPoliciesSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBasicPublishingCredentialsPoliciesSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) if err != nil { return WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListBasicPublishingCredentialsPoliciesSlotResponse{}, runtime.NewResponseError(resp) - } return client.listBasicPublishingCredentialsPoliciesSlotHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -14472,7 +16088,7 @@ func (client *WebAppsClient) listBasicPublishingCredentialsPoliciesSlotCreateReq return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14489,7 +16105,7 @@ func (client *WebAppsClient) listBasicPublishingCredentialsPoliciesSlotHandleRes // NewListByResourceGroupPager - Description for Gets all web, mobile, and API apps in the specified resource group. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - options - WebAppsClientListByResourceGroupOptions contains the optional parameters for the WebAppsClient.NewListByResourceGroupPager // method. @@ -14499,25 +16115,20 @@ func (client *WebAppsClient) NewListByResourceGroupPager(resourceGroupName strin return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListByResourceGroupResponse) (WebAppsClientListByResourceGroupResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListByResourceGroupResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListByResourceGroupPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + }, nil) if err != nil { return WebAppsClientListByResourceGroupResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) - } return client.listByResourceGroupHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -14540,7 +16151,7 @@ func (client *WebAppsClient) listByResourceGroupCreateRequest(ctx context.Contex if options != nil && options.IncludeSlots != nil { reqQP.Set("includeSlots", strconv.FormatBool(*options.IncludeSlots)) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14558,7 +16169,7 @@ func (client *WebAppsClient) listByResourceGroupHandleResponse(resp *http.Respon // NewListConfigurationSnapshotInfoPager - Description for Gets a list of web app configuration snapshots identifiers. Each // element of the list contains a timestamp and the ID of the snapshot. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientListConfigurationSnapshotInfoOptions contains the optional parameters for the WebAppsClient.NewListConfigurationSnapshotInfoPager @@ -14569,25 +16180,20 @@ func (client *WebAppsClient) NewListConfigurationSnapshotInfoPager(resourceGroup return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListConfigurationSnapshotInfoResponse) (WebAppsClientListConfigurationSnapshotInfoResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listConfigurationSnapshotInfoCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListConfigurationSnapshotInfoResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListConfigurationSnapshotInfoPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listConfigurationSnapshotInfoCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return WebAppsClientListConfigurationSnapshotInfoResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListConfigurationSnapshotInfoResponse{}, runtime.NewResponseError(resp) - } return client.listConfigurationSnapshotInfoHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -14611,7 +16217,7 @@ func (client *WebAppsClient) listConfigurationSnapshotInfoCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14629,7 +16235,7 @@ func (client *WebAppsClient) listConfigurationSnapshotInfoHandleResponse(resp *h // NewListConfigurationSnapshotInfoSlotPager - Description for Gets a list of web app configuration snapshots identifiers. // Each element of the list contains a timestamp and the ID of the snapshot. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. @@ -14641,25 +16247,20 @@ func (client *WebAppsClient) NewListConfigurationSnapshotInfoSlotPager(resourceG return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListConfigurationSnapshotInfoSlotResponse) (WebAppsClientListConfigurationSnapshotInfoSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listConfigurationSnapshotInfoSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListConfigurationSnapshotInfoSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listConfigurationSnapshotInfoSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) if err != nil { return WebAppsClientListConfigurationSnapshotInfoSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebAppsClientListConfigurationSnapshotInfoSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListConfigurationSnapshotInfoSlotResponse{}, runtime.NewResponseError(resp) - } return client.listConfigurationSnapshotInfoSlotHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -14687,7 +16288,7 @@ func (client *WebAppsClient) listConfigurationSnapshotInfoSlotCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14704,7 +16305,7 @@ func (client *WebAppsClient) listConfigurationSnapshotInfoSlotHandleResponse(res // NewListConfigurationsPager - Description for List the configurations of an app // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientListConfigurationsOptions contains the optional parameters for the WebAppsClient.NewListConfigurationsPager @@ -14715,25 +16316,20 @@ func (client *WebAppsClient) NewListConfigurationsPager(resourceGroupName string return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListConfigurationsResponse) (WebAppsClientListConfigurationsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listConfigurationsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListConfigurationsResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListConfigurationsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listConfigurationsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return WebAppsClientListConfigurationsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListConfigurationsResponse{}, runtime.NewResponseError(resp) - } return client.listConfigurationsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -14757,7 +16353,7 @@ func (client *WebAppsClient) listConfigurationsCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14774,7 +16370,7 @@ func (client *WebAppsClient) listConfigurationsHandleResponse(resp *http.Respons // NewListConfigurationsSlotPager - Description for List the configurations of an app // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. @@ -14786,25 +16382,20 @@ func (client *WebAppsClient) NewListConfigurationsSlotPager(resourceGroupName st return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListConfigurationsSlotResponse) (WebAppsClientListConfigurationsSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listConfigurationsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListConfigurationsSlotResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListConfigurationsSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listConfigurationsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) if err != nil { return WebAppsClientListConfigurationsSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListConfigurationsSlotResponse{}, runtime.NewResponseError(resp) - } return client.listConfigurationsSlotHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -14832,7 +16423,7 @@ func (client *WebAppsClient) listConfigurationsSlotCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14850,24 +16441,31 @@ func (client *WebAppsClient) listConfigurationsSlotHandleResponse(resp *http.Res // ListConnectionStrings - Description for Gets the connection strings of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientListConnectionStringsOptions contains the optional parameters for the WebAppsClient.ListConnectionStrings // method. func (client *WebAppsClient) ListConnectionStrings(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListConnectionStringsOptions) (WebAppsClientListConnectionStringsResponse, error) { + var err error + const operationName = "WebAppsClient.ListConnectionStrings" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listConnectionStringsCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientListConnectionStringsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListConnectionStringsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListConnectionStringsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListConnectionStringsResponse{}, err } - return client.listConnectionStringsHandleResponse(resp) + resp, err := client.listConnectionStringsHandleResponse(httpResp) + return resp, err } // listConnectionStringsCreateRequest creates the ListConnectionStrings request. @@ -14890,7 +16488,7 @@ func (client *WebAppsClient) listConnectionStringsCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14908,7 +16506,7 @@ func (client *WebAppsClient) listConnectionStringsHandleResponse(resp *http.Resp // ListConnectionStringsSlot - Description for Gets the connection strings of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will get the connection settings for the production @@ -14916,18 +16514,25 @@ func (client *WebAppsClient) listConnectionStringsHandleResponse(resp *http.Resp // - options - WebAppsClientListConnectionStringsSlotOptions contains the optional parameters for the WebAppsClient.ListConnectionStringsSlot // method. func (client *WebAppsClient) ListConnectionStringsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListConnectionStringsSlotOptions) (WebAppsClientListConnectionStringsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ListConnectionStringsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listConnectionStringsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientListConnectionStringsSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListConnectionStringsSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListConnectionStringsSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListConnectionStringsSlotResponse{}, err } - return client.listConnectionStringsSlotHandleResponse(resp) + resp, err := client.listConnectionStringsSlotHandleResponse(httpResp) + return resp, err } // listConnectionStringsSlotCreateRequest creates the ListConnectionStringsSlot request. @@ -14954,7 +16559,7 @@ func (client *WebAppsClient) listConnectionStringsSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -14971,7 +16576,7 @@ func (client *WebAppsClient) listConnectionStringsSlotHandleResponse(resp *http. // NewListContinuousWebJobsPager - Description for List continuous web jobs for an app, or a deployment slot. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - options - WebAppsClientListContinuousWebJobsOptions contains the optional parameters for the WebAppsClient.NewListContinuousWebJobsPager @@ -14982,25 +16587,20 @@ func (client *WebAppsClient) NewListContinuousWebJobsPager(resourceGroupName str return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListContinuousWebJobsResponse) (WebAppsClientListContinuousWebJobsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listContinuousWebJobsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListContinuousWebJobsResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListContinuousWebJobsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listContinuousWebJobsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return WebAppsClientListContinuousWebJobsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListContinuousWebJobsResponse{}, runtime.NewResponseError(resp) - } return client.listContinuousWebJobsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -15024,7 +16624,7 @@ func (client *WebAppsClient) listContinuousWebJobsCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15041,7 +16641,7 @@ func (client *WebAppsClient) listContinuousWebJobsHandleResponse(resp *http.Resp // NewListContinuousWebJobsSlotPager - Description for List continuous web jobs for an app, or a deployment slot. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - slot - Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @@ -15053,25 +16653,20 @@ func (client *WebAppsClient) NewListContinuousWebJobsSlotPager(resourceGroupName return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListContinuousWebJobsSlotResponse) (WebAppsClientListContinuousWebJobsSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listContinuousWebJobsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListContinuousWebJobsSlotResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListContinuousWebJobsSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listContinuousWebJobsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) if err != nil { return WebAppsClientListContinuousWebJobsSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListContinuousWebJobsSlotResponse{}, runtime.NewResponseError(resp) - } return client.listContinuousWebJobsSlotHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -15099,7 +16694,7 @@ func (client *WebAppsClient) listContinuousWebJobsSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15117,25 +16712,32 @@ func (client *WebAppsClient) listContinuousWebJobsSlotHandleResponse(resp *http. // ListDeploymentLog - Description for List deployment log for specific deployment for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - id - The ID of a specific deployment. This is the value of the name property in the JSON response from "GET /api/sites/{siteName}/deployments". // - options - WebAppsClientListDeploymentLogOptions contains the optional parameters for the WebAppsClient.ListDeploymentLog // method. func (client *WebAppsClient) ListDeploymentLog(ctx context.Context, resourceGroupName string, name string, id string, options *WebAppsClientListDeploymentLogOptions) (WebAppsClientListDeploymentLogResponse, error) { + var err error + const operationName = "WebAppsClient.ListDeploymentLog" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listDeploymentLogCreateRequest(ctx, resourceGroupName, name, id, options) if err != nil { return WebAppsClientListDeploymentLogResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListDeploymentLogResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListDeploymentLogResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListDeploymentLogResponse{}, err } - return client.listDeploymentLogHandleResponse(resp) + resp, err := client.listDeploymentLogHandleResponse(httpResp) + return resp, err } // listDeploymentLogCreateRequest creates the ListDeploymentLog request. @@ -15162,7 +16764,7 @@ func (client *WebAppsClient) listDeploymentLogCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15180,7 +16782,7 @@ func (client *WebAppsClient) listDeploymentLogHandleResponse(resp *http.Response // ListDeploymentLogSlot - Description for List deployment log for specific deployment for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - id - The ID of a specific deployment. This is the value of the name property in the JSON response from "GET /api/sites/{siteName}/deployments". @@ -15188,18 +16790,25 @@ func (client *WebAppsClient) listDeploymentLogHandleResponse(resp *http.Response // - options - WebAppsClientListDeploymentLogSlotOptions contains the optional parameters for the WebAppsClient.ListDeploymentLogSlot // method. func (client *WebAppsClient) ListDeploymentLogSlot(ctx context.Context, resourceGroupName string, name string, id string, slot string, options *WebAppsClientListDeploymentLogSlotOptions) (WebAppsClientListDeploymentLogSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ListDeploymentLogSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listDeploymentLogSlotCreateRequest(ctx, resourceGroupName, name, id, slot, options) if err != nil { return WebAppsClientListDeploymentLogSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListDeploymentLogSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListDeploymentLogSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListDeploymentLogSlotResponse{}, err } - return client.listDeploymentLogSlotHandleResponse(resp) + resp, err := client.listDeploymentLogSlotHandleResponse(httpResp) + return resp, err } // listDeploymentLogSlotCreateRequest creates the ListDeploymentLogSlot request. @@ -15230,7 +16839,7 @@ func (client *WebAppsClient) listDeploymentLogSlotCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15247,7 +16856,7 @@ func (client *WebAppsClient) listDeploymentLogSlotHandleResponse(resp *http.Resp // NewListDeploymentsPager - Description for List deployments for an app, or a deployment slot. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientListDeploymentsOptions contains the optional parameters for the WebAppsClient.NewListDeploymentsPager @@ -15258,25 +16867,20 @@ func (client *WebAppsClient) NewListDeploymentsPager(resourceGroupName string, n return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListDeploymentsResponse) (WebAppsClientListDeploymentsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listDeploymentsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListDeploymentsResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListDeploymentsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listDeploymentsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return WebAppsClientListDeploymentsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListDeploymentsResponse{}, runtime.NewResponseError(resp) - } return client.listDeploymentsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -15300,7 +16904,7 @@ func (client *WebAppsClient) listDeploymentsCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15317,7 +16921,7 @@ func (client *WebAppsClient) listDeploymentsHandleResponse(resp *http.Response) // NewListDeploymentsSlotPager - Description for List deployments for an app, or a deployment slot. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @@ -15329,25 +16933,20 @@ func (client *WebAppsClient) NewListDeploymentsSlotPager(resourceGroupName strin return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListDeploymentsSlotResponse) (WebAppsClientListDeploymentsSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listDeploymentsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListDeploymentsSlotResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListDeploymentsSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listDeploymentsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) if err != nil { return WebAppsClientListDeploymentsSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListDeploymentsSlotResponse{}, runtime.NewResponseError(resp) - } return client.listDeploymentsSlotHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -15375,7 +16974,7 @@ func (client *WebAppsClient) listDeploymentsSlotCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15392,7 +16991,7 @@ func (client *WebAppsClient) listDeploymentsSlotHandleResponse(resp *http.Respon // NewListDomainOwnershipIdentifiersPager - Description for Lists ownership identifiers for domain associated with web app. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientListDomainOwnershipIdentifiersOptions contains the optional parameters for the WebAppsClient.NewListDomainOwnershipIdentifiersPager @@ -15403,25 +17002,20 @@ func (client *WebAppsClient) NewListDomainOwnershipIdentifiersPager(resourceGrou return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListDomainOwnershipIdentifiersResponse) (WebAppsClientListDomainOwnershipIdentifiersResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listDomainOwnershipIdentifiersCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListDomainOwnershipIdentifiersResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListDomainOwnershipIdentifiersPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listDomainOwnershipIdentifiersCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return WebAppsClientListDomainOwnershipIdentifiersResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListDomainOwnershipIdentifiersResponse{}, runtime.NewResponseError(resp) - } return client.listDomainOwnershipIdentifiersHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -15445,7 +17039,7 @@ func (client *WebAppsClient) listDomainOwnershipIdentifiersCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15463,7 +17057,7 @@ func (client *WebAppsClient) listDomainOwnershipIdentifiersHandleResponse(resp * // NewListDomainOwnershipIdentifiersSlotPager - Description for Lists ownership identifiers for domain associated with web // app. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. @@ -15475,25 +17069,20 @@ func (client *WebAppsClient) NewListDomainOwnershipIdentifiersSlotPager(resource return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListDomainOwnershipIdentifiersSlotResponse) (WebAppsClientListDomainOwnershipIdentifiersSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listDomainOwnershipIdentifiersSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListDomainOwnershipIdentifiersSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listDomainOwnershipIdentifiersSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) if err != nil { return WebAppsClientListDomainOwnershipIdentifiersSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebAppsClientListDomainOwnershipIdentifiersSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListDomainOwnershipIdentifiersSlotResponse{}, runtime.NewResponseError(resp) - } return client.listDomainOwnershipIdentifiersSlotHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -15521,7 +17110,7 @@ func (client *WebAppsClient) listDomainOwnershipIdentifiersSlotCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15539,25 +17128,32 @@ func (client *WebAppsClient) listDomainOwnershipIdentifiersSlotHandleResponse(re // ListFunctionKeys - Description for Get function keys for a function in a web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - functionName - Function name. // - options - WebAppsClientListFunctionKeysOptions contains the optional parameters for the WebAppsClient.ListFunctionKeys // method. func (client *WebAppsClient) ListFunctionKeys(ctx context.Context, resourceGroupName string, name string, functionName string, options *WebAppsClientListFunctionKeysOptions) (WebAppsClientListFunctionKeysResponse, error) { + var err error + const operationName = "WebAppsClient.ListFunctionKeys" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listFunctionKeysCreateRequest(ctx, resourceGroupName, name, functionName, options) if err != nil { return WebAppsClientListFunctionKeysResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListFunctionKeysResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListFunctionKeysResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListFunctionKeysResponse{}, err } - return client.listFunctionKeysHandleResponse(resp) + resp, err := client.listFunctionKeysHandleResponse(httpResp) + return resp, err } // listFunctionKeysCreateRequest creates the ListFunctionKeys request. @@ -15584,7 +17180,7 @@ func (client *WebAppsClient) listFunctionKeysCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15602,7 +17198,7 @@ func (client *WebAppsClient) listFunctionKeysHandleResponse(resp *http.Response) // ListFunctionKeysSlot - Description for Get function keys for a function in a web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - functionName - Function name. @@ -15610,18 +17206,25 @@ func (client *WebAppsClient) listFunctionKeysHandleResponse(resp *http.Response) // - options - WebAppsClientListFunctionKeysSlotOptions contains the optional parameters for the WebAppsClient.ListFunctionKeysSlot // method. func (client *WebAppsClient) ListFunctionKeysSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, options *WebAppsClientListFunctionKeysSlotOptions) (WebAppsClientListFunctionKeysSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ListFunctionKeysSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listFunctionKeysSlotCreateRequest(ctx, resourceGroupName, name, functionName, slot, options) if err != nil { return WebAppsClientListFunctionKeysSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListFunctionKeysSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListFunctionKeysSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListFunctionKeysSlotResponse{}, err } - return client.listFunctionKeysSlotHandleResponse(resp) + resp, err := client.listFunctionKeysSlotHandleResponse(httpResp) + return resp, err } // listFunctionKeysSlotCreateRequest creates the ListFunctionKeysSlot request. @@ -15652,7 +17255,7 @@ func (client *WebAppsClient) listFunctionKeysSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15670,25 +17273,32 @@ func (client *WebAppsClient) listFunctionKeysSlotHandleResponse(resp *http.Respo // ListFunctionSecrets - Description for Get function secrets for a function in a web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - functionName - Function name. // - options - WebAppsClientListFunctionSecretsOptions contains the optional parameters for the WebAppsClient.ListFunctionSecrets // method. func (client *WebAppsClient) ListFunctionSecrets(ctx context.Context, resourceGroupName string, name string, functionName string, options *WebAppsClientListFunctionSecretsOptions) (WebAppsClientListFunctionSecretsResponse, error) { + var err error + const operationName = "WebAppsClient.ListFunctionSecrets" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listFunctionSecretsCreateRequest(ctx, resourceGroupName, name, functionName, options) if err != nil { return WebAppsClientListFunctionSecretsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListFunctionSecretsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListFunctionSecretsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListFunctionSecretsResponse{}, err } - return client.listFunctionSecretsHandleResponse(resp) + resp, err := client.listFunctionSecretsHandleResponse(httpResp) + return resp, err } // listFunctionSecretsCreateRequest creates the ListFunctionSecrets request. @@ -15715,7 +17325,7 @@ func (client *WebAppsClient) listFunctionSecretsCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15733,7 +17343,7 @@ func (client *WebAppsClient) listFunctionSecretsHandleResponse(resp *http.Respon // ListFunctionSecretsSlot - Description for Get function secrets for a function in a web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - functionName - Function name. @@ -15741,18 +17351,25 @@ func (client *WebAppsClient) listFunctionSecretsHandleResponse(resp *http.Respon // - options - WebAppsClientListFunctionSecretsSlotOptions contains the optional parameters for the WebAppsClient.ListFunctionSecretsSlot // method. func (client *WebAppsClient) ListFunctionSecretsSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, options *WebAppsClientListFunctionSecretsSlotOptions) (WebAppsClientListFunctionSecretsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ListFunctionSecretsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listFunctionSecretsSlotCreateRequest(ctx, resourceGroupName, name, functionName, slot, options) if err != nil { return WebAppsClientListFunctionSecretsSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListFunctionSecretsSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListFunctionSecretsSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListFunctionSecretsSlotResponse{}, err } - return client.listFunctionSecretsSlotHandleResponse(resp) + resp, err := client.listFunctionSecretsSlotHandleResponse(httpResp) + return resp, err } // listFunctionSecretsSlotCreateRequest creates the ListFunctionSecretsSlot request. @@ -15783,7 +17400,7 @@ func (client *WebAppsClient) listFunctionSecretsSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15800,7 +17417,7 @@ func (client *WebAppsClient) listFunctionSecretsSlotHandleResponse(resp *http.Re // NewListFunctionsPager - Description for List the functions for a web site, or a deployment slot. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - options - WebAppsClientListFunctionsOptions contains the optional parameters for the WebAppsClient.NewListFunctionsPager @@ -15811,25 +17428,20 @@ func (client *WebAppsClient) NewListFunctionsPager(resourceGroupName string, nam return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListFunctionsResponse) (WebAppsClientListFunctionsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listFunctionsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListFunctionsResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListFunctionsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listFunctionsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return WebAppsClientListFunctionsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListFunctionsResponse{}, runtime.NewResponseError(resp) - } return client.listFunctionsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -15853,7 +17465,7 @@ func (client *WebAppsClient) listFunctionsCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15871,23 +17483,30 @@ func (client *WebAppsClient) listFunctionsHandleResponse(resp *http.Response) (W // ListHostKeys - Description for Get host secrets for a function app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - options - WebAppsClientListHostKeysOptions contains the optional parameters for the WebAppsClient.ListHostKeys method. func (client *WebAppsClient) ListHostKeys(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListHostKeysOptions) (WebAppsClientListHostKeysResponse, error) { + var err error + const operationName = "WebAppsClient.ListHostKeys" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listHostKeysCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientListHostKeysResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListHostKeysResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListHostKeysResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListHostKeysResponse{}, err } - return client.listHostKeysHandleResponse(resp) + resp, err := client.listHostKeysHandleResponse(httpResp) + return resp, err } // listHostKeysCreateRequest creates the ListHostKeys request. @@ -15910,7 +17529,7 @@ func (client *WebAppsClient) listHostKeysCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15928,25 +17547,32 @@ func (client *WebAppsClient) listHostKeysHandleResponse(resp *http.Response) (We // ListHostKeysSlot - Description for Get host secrets for a function app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - slot - Name of the deployment slot. // - options - WebAppsClientListHostKeysSlotOptions contains the optional parameters for the WebAppsClient.ListHostKeysSlot // method. func (client *WebAppsClient) ListHostKeysSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListHostKeysSlotOptions) (WebAppsClientListHostKeysSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ListHostKeysSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listHostKeysSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientListHostKeysSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListHostKeysSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListHostKeysSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListHostKeysSlotResponse{}, err } - return client.listHostKeysSlotHandleResponse(resp) + resp, err := client.listHostKeysSlotHandleResponse(httpResp) + return resp, err } // listHostKeysSlotCreateRequest creates the ListHostKeysSlot request. @@ -15973,7 +17599,7 @@ func (client *WebAppsClient) listHostKeysSlotCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -15990,7 +17616,7 @@ func (client *WebAppsClient) listHostKeysSlotHandleResponse(resp *http.Response) // NewListHostNameBindingsPager - Description for Get hostname bindings for an app or a deployment slot. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientListHostNameBindingsOptions contains the optional parameters for the WebAppsClient.NewListHostNameBindingsPager @@ -16001,25 +17627,20 @@ func (client *WebAppsClient) NewListHostNameBindingsPager(resourceGroupName stri return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListHostNameBindingsResponse) (WebAppsClientListHostNameBindingsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listHostNameBindingsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListHostNameBindingsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listHostNameBindingsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return WebAppsClientListHostNameBindingsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebAppsClientListHostNameBindingsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListHostNameBindingsResponse{}, runtime.NewResponseError(resp) - } return client.listHostNameBindingsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -16043,7 +17664,7 @@ func (client *WebAppsClient) listHostNameBindingsCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -16060,7 +17681,7 @@ func (client *WebAppsClient) listHostNameBindingsHandleResponse(resp *http.Respo // NewListHostNameBindingsSlotPager - Description for Get hostname bindings for an app or a deployment slot. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the production slot. @@ -16072,25 +17693,20 @@ func (client *WebAppsClient) NewListHostNameBindingsSlotPager(resourceGroupName return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListHostNameBindingsSlotResponse) (WebAppsClientListHostNameBindingsSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listHostNameBindingsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListHostNameBindingsSlotResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListHostNameBindingsSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listHostNameBindingsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) if err != nil { return WebAppsClientListHostNameBindingsSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListHostNameBindingsSlotResponse{}, runtime.NewResponseError(resp) - } return client.listHostNameBindingsSlotHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -16118,7 +17734,7 @@ func (client *WebAppsClient) listHostNameBindingsSlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -16136,24 +17752,31 @@ func (client *WebAppsClient) listHostNameBindingsSlotHandleResponse(resp *http.R // ListHybridConnections - Description for Retrieves all Service Bus Hybrid Connections used by this Web App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - The name of the web app. // - options - WebAppsClientListHybridConnectionsOptions contains the optional parameters for the WebAppsClient.ListHybridConnections // method. func (client *WebAppsClient) ListHybridConnections(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListHybridConnectionsOptions) (WebAppsClientListHybridConnectionsResponse, error) { + var err error + const operationName = "WebAppsClient.ListHybridConnections" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listHybridConnectionsCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientListHybridConnectionsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListHybridConnectionsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListHybridConnectionsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListHybridConnectionsResponse{}, err } - return client.listHybridConnectionsHandleResponse(resp) + resp, err := client.listHybridConnectionsHandleResponse(httpResp) + return resp, err } // listHybridConnectionsCreateRequest creates the ListHybridConnections request. @@ -16176,7 +17799,7 @@ func (client *WebAppsClient) listHybridConnectionsCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -16194,25 +17817,32 @@ func (client *WebAppsClient) listHybridConnectionsHandleResponse(resp *http.Resp // ListHybridConnectionsSlot - Description for Retrieves all Service Bus Hybrid Connections used by this Web App. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - The name of the web app. // - slot - The name of the slot for the web app. // - options - WebAppsClientListHybridConnectionsSlotOptions contains the optional parameters for the WebAppsClient.ListHybridConnectionsSlot // method. func (client *WebAppsClient) ListHybridConnectionsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListHybridConnectionsSlotOptions) (WebAppsClientListHybridConnectionsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ListHybridConnectionsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listHybridConnectionsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientListHybridConnectionsSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListHybridConnectionsSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListHybridConnectionsSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListHybridConnectionsSlotResponse{}, err } - return client.listHybridConnectionsSlotHandleResponse(resp) + resp, err := client.listHybridConnectionsSlotHandleResponse(httpResp) + return resp, err } // listHybridConnectionsSlotCreateRequest creates the ListHybridConnectionsSlot request. @@ -16239,7 +17869,7 @@ func (client *WebAppsClient) listHybridConnectionsSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -16256,7 +17886,7 @@ func (client *WebAppsClient) listHybridConnectionsSlotHandleResponse(resp *http. // NewListInstanceFunctionsSlotPager - Description for List the functions for a web site, or a deployment slot. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - slot - Name of the deployment slot. @@ -16268,25 +17898,20 @@ func (client *WebAppsClient) NewListInstanceFunctionsSlotPager(resourceGroupName return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListInstanceFunctionsSlotResponse) (WebAppsClientListInstanceFunctionsSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listInstanceFunctionsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListInstanceFunctionsSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listInstanceFunctionsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) if err != nil { return WebAppsClientListInstanceFunctionsSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebAppsClientListInstanceFunctionsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListInstanceFunctionsSlotResponse{}, runtime.NewResponseError(resp) - } return client.listInstanceFunctionsSlotHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -16314,7 +17939,7 @@ func (client *WebAppsClient) listInstanceFunctionsSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -16331,7 +17956,7 @@ func (client *WebAppsClient) listInstanceFunctionsSlotHandleResponse(resp *http. // NewListInstanceIdentifiersPager - Description for Gets all scale-out instances of an app. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientListInstanceIdentifiersOptions contains the optional parameters for the WebAppsClient.NewListInstanceIdentifiersPager @@ -16342,25 +17967,20 @@ func (client *WebAppsClient) NewListInstanceIdentifiersPager(resourceGroupName s return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListInstanceIdentifiersResponse) (WebAppsClientListInstanceIdentifiersResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listInstanceIdentifiersCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListInstanceIdentifiersResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListInstanceIdentifiersPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listInstanceIdentifiersCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return WebAppsClientListInstanceIdentifiersResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListInstanceIdentifiersResponse{}, runtime.NewResponseError(resp) - } return client.listInstanceIdentifiersHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -16384,7 +18004,7 @@ func (client *WebAppsClient) listInstanceIdentifiersCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -16401,7 +18021,7 @@ func (client *WebAppsClient) listInstanceIdentifiersHandleResponse(resp *http.Re // NewListInstanceIdentifiersSlotPager - Description for Gets all scale-out instances of an app. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API gets the production slot instances. @@ -16413,25 +18033,20 @@ func (client *WebAppsClient) NewListInstanceIdentifiersSlotPager(resourceGroupNa return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListInstanceIdentifiersSlotResponse) (WebAppsClientListInstanceIdentifiersSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listInstanceIdentifiersSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListInstanceIdentifiersSlotResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListInstanceIdentifiersSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listInstanceIdentifiersSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) if err != nil { return WebAppsClientListInstanceIdentifiersSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListInstanceIdentifiersSlotResponse{}, runtime.NewResponseError(resp) - } return client.listInstanceIdentifiersSlotHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -16459,7 +18074,7 @@ func (client *WebAppsClient) listInstanceIdentifiersSlotCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -16477,7 +18092,7 @@ func (client *WebAppsClient) listInstanceIdentifiersSlotHandleResponse(resp *htt // NewListInstanceProcessModulesPager - Description for List module information for a process by its ID for a specific scaled-out // instance in a web site. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - processID - PID. @@ -16491,25 +18106,20 @@ func (client *WebAppsClient) NewListInstanceProcessModulesPager(resourceGroupNam return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListInstanceProcessModulesResponse) (WebAppsClientListInstanceProcessModulesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listInstanceProcessModulesCreateRequest(ctx, resourceGroupName, name, processID, instanceID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListInstanceProcessModulesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listInstanceProcessModulesCreateRequest(ctx, resourceGroupName, name, processID, instanceID, options) + }, nil) if err != nil { return WebAppsClientListInstanceProcessModulesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebAppsClientListInstanceProcessModulesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListInstanceProcessModulesResponse{}, runtime.NewResponseError(resp) - } return client.listInstanceProcessModulesHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -16541,7 +18151,7 @@ func (client *WebAppsClient) listInstanceProcessModulesCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -16559,7 +18169,7 @@ func (client *WebAppsClient) listInstanceProcessModulesHandleResponse(resp *http // NewListInstanceProcessModulesSlotPager - Description for List module information for a process by its ID for a specific // scaled-out instance in a web site. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - processID - PID. @@ -16574,25 +18184,20 @@ func (client *WebAppsClient) NewListInstanceProcessModulesSlotPager(resourceGrou return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListInstanceProcessModulesSlotResponse) (WebAppsClientListInstanceProcessModulesSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listInstanceProcessModulesSlotCreateRequest(ctx, resourceGroupName, name, processID, slot, instanceID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListInstanceProcessModulesSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listInstanceProcessModulesSlotCreateRequest(ctx, resourceGroupName, name, processID, slot, instanceID, options) + }, nil) if err != nil { return WebAppsClientListInstanceProcessModulesSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebAppsClientListInstanceProcessModulesSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListInstanceProcessModulesSlotResponse{}, runtime.NewResponseError(resp) - } return client.listInstanceProcessModulesSlotHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -16628,7 +18233,7 @@ func (client *WebAppsClient) listInstanceProcessModulesSlotCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -16646,7 +18251,7 @@ func (client *WebAppsClient) listInstanceProcessModulesSlotHandleResponse(resp * // NewListInstanceProcessThreadsPager - Description for List the threads in a process by its ID for a specific scaled-out // instance in a web site. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - processID - PID. @@ -16660,25 +18265,20 @@ func (client *WebAppsClient) NewListInstanceProcessThreadsPager(resourceGroupNam return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListInstanceProcessThreadsResponse) (WebAppsClientListInstanceProcessThreadsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listInstanceProcessThreadsCreateRequest(ctx, resourceGroupName, name, processID, instanceID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListInstanceProcessThreadsResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListInstanceProcessThreadsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listInstanceProcessThreadsCreateRequest(ctx, resourceGroupName, name, processID, instanceID, options) + }, nil) if err != nil { return WebAppsClientListInstanceProcessThreadsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListInstanceProcessThreadsResponse{}, runtime.NewResponseError(resp) - } return client.listInstanceProcessThreadsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -16710,7 +18310,7 @@ func (client *WebAppsClient) listInstanceProcessThreadsCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -16728,7 +18328,7 @@ func (client *WebAppsClient) listInstanceProcessThreadsHandleResponse(resp *http // NewListInstanceProcessThreadsSlotPager - Description for List the threads in a process by its ID for a specific scaled-out // instance in a web site. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - processID - PID. @@ -16743,25 +18343,20 @@ func (client *WebAppsClient) NewListInstanceProcessThreadsSlotPager(resourceGrou return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListInstanceProcessThreadsSlotResponse) (WebAppsClientListInstanceProcessThreadsSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listInstanceProcessThreadsSlotCreateRequest(ctx, resourceGroupName, name, processID, slot, instanceID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListInstanceProcessThreadsSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listInstanceProcessThreadsSlotCreateRequest(ctx, resourceGroupName, name, processID, slot, instanceID, options) + }, nil) if err != nil { return WebAppsClientListInstanceProcessThreadsSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebAppsClientListInstanceProcessThreadsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListInstanceProcessThreadsSlotResponse{}, runtime.NewResponseError(resp) - } return client.listInstanceProcessThreadsSlotHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -16797,7 +18392,7 @@ func (client *WebAppsClient) listInstanceProcessThreadsSlotCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -16815,7 +18410,7 @@ func (client *WebAppsClient) listInstanceProcessThreadsSlotHandleResponse(resp * // NewListInstanceProcessesPager - Description for Get list of processes for a web site, or a deployment slot, or for a specific // scaled-out instance in a web site. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET @@ -16828,25 +18423,20 @@ func (client *WebAppsClient) NewListInstanceProcessesPager(resourceGroupName str return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListInstanceProcessesResponse) (WebAppsClientListInstanceProcessesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listInstanceProcessesCreateRequest(ctx, resourceGroupName, name, instanceID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListInstanceProcessesResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListInstanceProcessesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listInstanceProcessesCreateRequest(ctx, resourceGroupName, name, instanceID, options) + }, nil) if err != nil { return WebAppsClientListInstanceProcessesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListInstanceProcessesResponse{}, runtime.NewResponseError(resp) - } return client.listInstanceProcessesHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -16874,7 +18464,7 @@ func (client *WebAppsClient) listInstanceProcessesCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -16892,7 +18482,7 @@ func (client *WebAppsClient) listInstanceProcessesHandleResponse(resp *http.Resp // NewListInstanceProcessesSlotPager - Description for Get list of processes for a web site, or a deployment slot, or for // a specific scaled-out instance in a web site. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @@ -16906,25 +18496,20 @@ func (client *WebAppsClient) NewListInstanceProcessesSlotPager(resourceGroupName return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListInstanceProcessesSlotResponse) (WebAppsClientListInstanceProcessesSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listInstanceProcessesSlotCreateRequest(ctx, resourceGroupName, name, slot, instanceID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListInstanceProcessesSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listInstanceProcessesSlotCreateRequest(ctx, resourceGroupName, name, slot, instanceID, options) + }, nil) if err != nil { return WebAppsClientListInstanceProcessesSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebAppsClientListInstanceProcessesSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListInstanceProcessesSlotResponse{}, runtime.NewResponseError(resp) - } return client.listInstanceProcessesSlotHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -16956,7 +18541,7 @@ func (client *WebAppsClient) listInstanceProcessesSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -16973,7 +18558,7 @@ func (client *WebAppsClient) listInstanceProcessesSlotHandleResponse(resp *http. // NewListInstanceWorkflowsSlotPager - List the workflows for a web site, or a deployment slot. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - slot - Name of the deployment slot. @@ -16985,25 +18570,20 @@ func (client *WebAppsClient) NewListInstanceWorkflowsSlotPager(resourceGroupName return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListInstanceWorkflowsSlotResponse) (WebAppsClientListInstanceWorkflowsSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listInstanceWorkflowsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListInstanceWorkflowsSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listInstanceWorkflowsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) if err != nil { return WebAppsClientListInstanceWorkflowsSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebAppsClientListInstanceWorkflowsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListInstanceWorkflowsSlotResponse{}, runtime.NewResponseError(resp) - } return client.listInstanceWorkflowsSlotHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -17031,7 +18611,7 @@ func (client *WebAppsClient) listInstanceWorkflowsSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -17049,23 +18629,30 @@ func (client *WebAppsClient) listInstanceWorkflowsSlotHandleResponse(resp *http. // ListMetadata - Description for Gets the metadata of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientListMetadataOptions contains the optional parameters for the WebAppsClient.ListMetadata method. func (client *WebAppsClient) ListMetadata(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListMetadataOptions) (WebAppsClientListMetadataResponse, error) { + var err error + const operationName = "WebAppsClient.ListMetadata" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listMetadataCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientListMetadataResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListMetadataResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListMetadataResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListMetadataResponse{}, err } - return client.listMetadataHandleResponse(resp) + resp, err := client.listMetadataHandleResponse(httpResp) + return resp, err } // listMetadataCreateRequest creates the ListMetadata request. @@ -17088,7 +18675,7 @@ func (client *WebAppsClient) listMetadataCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -17106,25 +18693,32 @@ func (client *WebAppsClient) listMetadataHandleResponse(resp *http.Response) (We // ListMetadataSlot - Description for Gets the metadata of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will get the metadata for the production slot. // - options - WebAppsClientListMetadataSlotOptions contains the optional parameters for the WebAppsClient.ListMetadataSlot // method. func (client *WebAppsClient) ListMetadataSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListMetadataSlotOptions) (WebAppsClientListMetadataSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ListMetadataSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listMetadataSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientListMetadataSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListMetadataSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListMetadataSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListMetadataSlotResponse{}, err } - return client.listMetadataSlotHandleResponse(resp) + resp, err := client.listMetadataSlotHandleResponse(httpResp) + return resp, err } // listMetadataSlotCreateRequest creates the ListMetadataSlot request. @@ -17151,7 +18745,7 @@ func (client *WebAppsClient) listMetadataSlotCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -17169,25 +18763,32 @@ func (client *WebAppsClient) listMetadataSlotHandleResponse(resp *http.Response) // ListNetworkFeatures - Description for Gets all network features used by the app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - view - The type of view. Only "summary" is supported at this time. // - options - WebAppsClientListNetworkFeaturesOptions contains the optional parameters for the WebAppsClient.ListNetworkFeatures // method. func (client *WebAppsClient) ListNetworkFeatures(ctx context.Context, resourceGroupName string, name string, view string, options *WebAppsClientListNetworkFeaturesOptions) (WebAppsClientListNetworkFeaturesResponse, error) { + var err error + const operationName = "WebAppsClient.ListNetworkFeatures" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listNetworkFeaturesCreateRequest(ctx, resourceGroupName, name, view, options) if err != nil { return WebAppsClientListNetworkFeaturesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListNetworkFeaturesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListNetworkFeaturesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListNetworkFeaturesResponse{}, err } - return client.listNetworkFeaturesHandleResponse(resp) + resp, err := client.listNetworkFeaturesHandleResponse(httpResp) + return resp, err } // listNetworkFeaturesCreateRequest creates the ListNetworkFeatures request. @@ -17214,7 +18815,7 @@ func (client *WebAppsClient) listNetworkFeaturesCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -17232,7 +18833,7 @@ func (client *WebAppsClient) listNetworkFeaturesHandleResponse(resp *http.Respon // ListNetworkFeaturesSlot - Description for Gets all network features used by the app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - view - The type of view. Only "summary" is supported at this time. @@ -17240,18 +18841,25 @@ func (client *WebAppsClient) listNetworkFeaturesHandleResponse(resp *http.Respon // - options - WebAppsClientListNetworkFeaturesSlotOptions contains the optional parameters for the WebAppsClient.ListNetworkFeaturesSlot // method. func (client *WebAppsClient) ListNetworkFeaturesSlot(ctx context.Context, resourceGroupName string, name string, view string, slot string, options *WebAppsClientListNetworkFeaturesSlotOptions) (WebAppsClientListNetworkFeaturesSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ListNetworkFeaturesSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listNetworkFeaturesSlotCreateRequest(ctx, resourceGroupName, name, view, slot, options) if err != nil { return WebAppsClientListNetworkFeaturesSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListNetworkFeaturesSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListNetworkFeaturesSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListNetworkFeaturesSlotResponse{}, err } - return client.listNetworkFeaturesSlotHandleResponse(resp) + resp, err := client.listNetworkFeaturesSlotHandleResponse(httpResp) + return resp, err } // listNetworkFeaturesSlotCreateRequest creates the ListNetworkFeaturesSlot request. @@ -17282,7 +18890,7 @@ func (client *WebAppsClient) listNetworkFeaturesSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -17299,7 +18907,7 @@ func (client *WebAppsClient) listNetworkFeaturesSlotHandleResponse(resp *http.Re // NewListPerfMonCountersPager - Description for Gets perfmon counters for web app. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - options - WebAppsClientListPerfMonCountersOptions contains the optional parameters for the WebAppsClient.NewListPerfMonCountersPager @@ -17310,25 +18918,20 @@ func (client *WebAppsClient) NewListPerfMonCountersPager(resourceGroupName strin return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListPerfMonCountersResponse) (WebAppsClientListPerfMonCountersResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listPerfMonCountersCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListPerfMonCountersPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listPerfMonCountersCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return WebAppsClientListPerfMonCountersResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebAppsClientListPerfMonCountersResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListPerfMonCountersResponse{}, runtime.NewResponseError(resp) - } return client.listPerfMonCountersHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -17352,7 +18955,7 @@ func (client *WebAppsClient) listPerfMonCountersCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() unencodedParams := []string{req.Raw().URL.RawQuery} if options != nil && options.Filter != nil { @@ -17374,7 +18977,7 @@ func (client *WebAppsClient) listPerfMonCountersHandleResponse(resp *http.Respon // NewListPerfMonCountersSlotPager - Description for Gets perfmon counters for web app. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - slot - Name of web app slot. If not specified then will default to production slot. @@ -17386,25 +18989,20 @@ func (client *WebAppsClient) NewListPerfMonCountersSlotPager(resourceGroupName s return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListPerfMonCountersSlotResponse) (WebAppsClientListPerfMonCountersSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listPerfMonCountersSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListPerfMonCountersSlotResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListPerfMonCountersSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listPerfMonCountersSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) if err != nil { return WebAppsClientListPerfMonCountersSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListPerfMonCountersSlotResponse{}, runtime.NewResponseError(resp) - } return client.listPerfMonCountersSlotHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -17432,7 +19030,7 @@ func (client *WebAppsClient) listPerfMonCountersSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() unencodedParams := []string{req.Raw().URL.RawQuery} if options != nil && options.Filter != nil { @@ -17455,24 +19053,31 @@ func (client *WebAppsClient) listPerfMonCountersSlotHandleResponse(resp *http.Re // ListPremierAddOns - Description for Gets the premier add-ons of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientListPremierAddOnsOptions contains the optional parameters for the WebAppsClient.ListPremierAddOns // method. func (client *WebAppsClient) ListPremierAddOns(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListPremierAddOnsOptions) (WebAppsClientListPremierAddOnsResponse, error) { + var err error + const operationName = "WebAppsClient.ListPremierAddOns" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listPremierAddOnsCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientListPremierAddOnsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListPremierAddOnsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListPremierAddOnsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListPremierAddOnsResponse{}, err } - return client.listPremierAddOnsHandleResponse(resp) + resp, err := client.listPremierAddOnsHandleResponse(httpResp) + return resp, err } // listPremierAddOnsCreateRequest creates the ListPremierAddOns request. @@ -17495,7 +19100,7 @@ func (client *WebAppsClient) listPremierAddOnsCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -17513,7 +19118,7 @@ func (client *WebAppsClient) listPremierAddOnsHandleResponse(resp *http.Response // ListPremierAddOnsSlot - Description for Gets the premier add-ons of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will get the premier add-ons for the production @@ -17521,18 +19126,25 @@ func (client *WebAppsClient) listPremierAddOnsHandleResponse(resp *http.Response // - options - WebAppsClientListPremierAddOnsSlotOptions contains the optional parameters for the WebAppsClient.ListPremierAddOnsSlot // method. func (client *WebAppsClient) ListPremierAddOnsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListPremierAddOnsSlotOptions) (WebAppsClientListPremierAddOnsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ListPremierAddOnsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listPremierAddOnsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientListPremierAddOnsSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListPremierAddOnsSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListPremierAddOnsSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListPremierAddOnsSlotResponse{}, err } - return client.listPremierAddOnsSlotHandleResponse(resp) + resp, err := client.listPremierAddOnsSlotHandleResponse(httpResp) + return resp, err } // listPremierAddOnsSlotCreateRequest creates the ListPremierAddOnsSlot request. @@ -17559,7 +19171,7 @@ func (client *WebAppsClient) listPremierAddOnsSlotCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -17577,7 +19189,7 @@ func (client *WebAppsClient) listPremierAddOnsSlotHandleResponse(resp *http.Resp // NewListProcessModulesPager - Description for List module information for a process by its ID for a specific scaled-out // instance in a web site. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - processID - PID. @@ -17589,25 +19201,20 @@ func (client *WebAppsClient) NewListProcessModulesPager(resourceGroupName string return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListProcessModulesResponse) (WebAppsClientListProcessModulesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listProcessModulesCreateRequest(ctx, resourceGroupName, name, processID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListProcessModulesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listProcessModulesCreateRequest(ctx, resourceGroupName, name, processID, options) + }, nil) if err != nil { return WebAppsClientListProcessModulesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebAppsClientListProcessModulesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListProcessModulesResponse{}, runtime.NewResponseError(resp) - } return client.listProcessModulesHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -17635,7 +19242,7 @@ func (client *WebAppsClient) listProcessModulesCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -17653,7 +19260,7 @@ func (client *WebAppsClient) listProcessModulesHandleResponse(resp *http.Respons // NewListProcessModulesSlotPager - Description for List module information for a process by its ID for a specific scaled-out // instance in a web site. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - processID - PID. @@ -17666,25 +19273,20 @@ func (client *WebAppsClient) NewListProcessModulesSlotPager(resourceGroupName st return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListProcessModulesSlotResponse) (WebAppsClientListProcessModulesSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listProcessModulesSlotCreateRequest(ctx, resourceGroupName, name, processID, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListProcessModulesSlotResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListProcessModulesSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listProcessModulesSlotCreateRequest(ctx, resourceGroupName, name, processID, slot, options) + }, nil) if err != nil { return WebAppsClientListProcessModulesSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListProcessModulesSlotResponse{}, runtime.NewResponseError(resp) - } return client.listProcessModulesSlotHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -17716,7 +19318,7 @@ func (client *WebAppsClient) listProcessModulesSlotCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -17734,7 +19336,7 @@ func (client *WebAppsClient) listProcessModulesSlotHandleResponse(resp *http.Res // NewListProcessThreadsPager - Description for List the threads in a process by its ID for a specific scaled-out instance // in a web site. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - processID - PID. @@ -17746,25 +19348,20 @@ func (client *WebAppsClient) NewListProcessThreadsPager(resourceGroupName string return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListProcessThreadsResponse) (WebAppsClientListProcessThreadsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listProcessThreadsCreateRequest(ctx, resourceGroupName, name, processID, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListProcessThreadsResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListProcessThreadsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listProcessThreadsCreateRequest(ctx, resourceGroupName, name, processID, options) + }, nil) if err != nil { return WebAppsClientListProcessThreadsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListProcessThreadsResponse{}, runtime.NewResponseError(resp) - } return client.listProcessThreadsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -17792,7 +19389,7 @@ func (client *WebAppsClient) listProcessThreadsCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -17810,7 +19407,7 @@ func (client *WebAppsClient) listProcessThreadsHandleResponse(resp *http.Respons // NewListProcessThreadsSlotPager - Description for List the threads in a process by its ID for a specific scaled-out instance // in a web site. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - processID - PID. @@ -17823,25 +19420,20 @@ func (client *WebAppsClient) NewListProcessThreadsSlotPager(resourceGroupName st return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListProcessThreadsSlotResponse) (WebAppsClientListProcessThreadsSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listProcessThreadsSlotCreateRequest(ctx, resourceGroupName, name, processID, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListProcessThreadsSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listProcessThreadsSlotCreateRequest(ctx, resourceGroupName, name, processID, slot, options) + }, nil) if err != nil { return WebAppsClientListProcessThreadsSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebAppsClientListProcessThreadsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListProcessThreadsSlotResponse{}, runtime.NewResponseError(resp) - } return client.listProcessThreadsSlotHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -17873,7 +19465,7 @@ func (client *WebAppsClient) listProcessThreadsSlotCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -17891,7 +19483,7 @@ func (client *WebAppsClient) listProcessThreadsSlotHandleResponse(resp *http.Res // NewListProcessesPager - Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out // instance in a web site. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - options - WebAppsClientListProcessesOptions contains the optional parameters for the WebAppsClient.NewListProcessesPager @@ -17902,25 +19494,20 @@ func (client *WebAppsClient) NewListProcessesPager(resourceGroupName string, nam return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListProcessesResponse) (WebAppsClientListProcessesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listProcessesCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListProcessesResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListProcessesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listProcessesCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return WebAppsClientListProcessesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListProcessesResponse{}, runtime.NewResponseError(resp) - } return client.listProcessesHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -17944,7 +19531,7 @@ func (client *WebAppsClient) listProcessesCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -17962,7 +19549,7 @@ func (client *WebAppsClient) listProcessesHandleResponse(resp *http.Response) (W // NewListProcessesSlotPager - Description for Get list of processes for a web site, or a deployment slot, or for a specific // scaled-out instance in a web site. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @@ -17974,25 +19561,20 @@ func (client *WebAppsClient) NewListProcessesSlotPager(resourceGroupName string, return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListProcessesSlotResponse) (WebAppsClientListProcessesSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listProcessesSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListProcessesSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listProcessesSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) if err != nil { return WebAppsClientListProcessesSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebAppsClientListProcessesSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListProcessesSlotResponse{}, runtime.NewResponseError(resp) - } return client.listProcessesSlotHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -18020,7 +19602,7 @@ func (client *WebAppsClient) listProcessesSlotCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -18037,7 +19619,7 @@ func (client *WebAppsClient) listProcessesSlotHandleResponse(resp *http.Response // NewListProductionSiteDeploymentStatusesPager - List deployment statuses for an app (or deployment slot, if specified). // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientListProductionSiteDeploymentStatusesOptions contains the optional parameters for the WebAppsClient.NewListProductionSiteDeploymentStatusesPager @@ -18048,25 +19630,20 @@ func (client *WebAppsClient) NewListProductionSiteDeploymentStatusesPager(resour return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListProductionSiteDeploymentStatusesResponse) (WebAppsClientListProductionSiteDeploymentStatusesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listProductionSiteDeploymentStatusesCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListProductionSiteDeploymentStatusesResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListProductionSiteDeploymentStatusesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listProductionSiteDeploymentStatusesCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return WebAppsClientListProductionSiteDeploymentStatusesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListProductionSiteDeploymentStatusesResponse{}, runtime.NewResponseError(resp) - } return client.listProductionSiteDeploymentStatusesHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -18090,7 +19667,7 @@ func (client *WebAppsClient) listProductionSiteDeploymentStatusesCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -18107,7 +19684,7 @@ func (client *WebAppsClient) listProductionSiteDeploymentStatusesHandleResponse( // NewListPublicCertificatesPager - Description for Get public certificates for an app or a deployment slot. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientListPublicCertificatesOptions contains the optional parameters for the WebAppsClient.NewListPublicCertificatesPager @@ -18118,25 +19695,20 @@ func (client *WebAppsClient) NewListPublicCertificatesPager(resourceGroupName st return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListPublicCertificatesResponse) (WebAppsClientListPublicCertificatesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listPublicCertificatesCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListPublicCertificatesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listPublicCertificatesCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return WebAppsClientListPublicCertificatesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebAppsClientListPublicCertificatesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListPublicCertificatesResponse{}, runtime.NewResponseError(resp) - } return client.listPublicCertificatesHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -18160,7 +19732,7 @@ func (client *WebAppsClient) listPublicCertificatesCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -18177,7 +19749,7 @@ func (client *WebAppsClient) listPublicCertificatesHandleResponse(resp *http.Res // NewListPublicCertificatesSlotPager - Description for Get public certificates for an app or a deployment slot. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the production slot. @@ -18189,25 +19761,20 @@ func (client *WebAppsClient) NewListPublicCertificatesSlotPager(resourceGroupNam return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListPublicCertificatesSlotResponse) (WebAppsClientListPublicCertificatesSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listPublicCertificatesSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListPublicCertificatesSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listPublicCertificatesSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) if err != nil { return WebAppsClientListPublicCertificatesSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebAppsClientListPublicCertificatesSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListPublicCertificatesSlotResponse{}, runtime.NewResponseError(resp) - } return client.listPublicCertificatesSlotHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -18235,7 +19802,7 @@ func (client *WebAppsClient) listPublicCertificatesSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -18253,7 +19820,7 @@ func (client *WebAppsClient) listPublicCertificatesSlotHandleResponse(resp *http // BeginListPublishingCredentials - Description for Gets the Git/FTP publishing credentials of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientBeginListPublishingCredentialsOptions contains the optional parameters for the WebAppsClient.BeginListPublishingCredentials @@ -18264,29 +19831,40 @@ func (client *WebAppsClient) BeginListPublishingCredentials(ctx context.Context, if err != nil { return nil, err } - return runtime.NewPoller[WebAppsClientListPublishingCredentialsResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientListPublishingCredentialsResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WebAppsClientListPublishingCredentialsResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientListPublishingCredentialsResponse]{ + Tracer: client.internal.Tracer(), + }) } } // ListPublishingCredentials - Description for Gets the Git/FTP publishing credentials of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *WebAppsClient) listPublishingCredentials(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientBeginListPublishingCredentialsOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginListPublishingCredentials" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listPublishingCredentialsCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // listPublishingCredentialsCreateRequest creates the ListPublishingCredentials request. @@ -18309,7 +19887,7 @@ func (client *WebAppsClient) listPublishingCredentialsCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -18318,7 +19896,7 @@ func (client *WebAppsClient) listPublishingCredentialsCreateRequest(ctx context. // BeginListPublishingCredentialsSlot - Description for Gets the Git/FTP publishing credentials of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials for the production @@ -18331,29 +19909,40 @@ func (client *WebAppsClient) BeginListPublishingCredentialsSlot(ctx context.Cont if err != nil { return nil, err } - return runtime.NewPoller[WebAppsClientListPublishingCredentialsSlotResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientListPublishingCredentialsSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WebAppsClientListPublishingCredentialsSlotResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientListPublishingCredentialsSlotResponse]{ + Tracer: client.internal.Tracer(), + }) } } // ListPublishingCredentialsSlot - Description for Gets the Git/FTP publishing credentials of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *WebAppsClient) listPublishingCredentialsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientBeginListPublishingCredentialsSlotOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginListPublishingCredentialsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listPublishingCredentialsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // listPublishingCredentialsSlotCreateRequest creates the ListPublishingCredentialsSlot request. @@ -18380,7 +19969,7 @@ func (client *WebAppsClient) listPublishingCredentialsSlotCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -18389,7 +19978,7 @@ func (client *WebAppsClient) listPublishingCredentialsSlotCreateRequest(ctx cont // ListPublishingProfileXMLWithSecrets - Description for Gets the publishing profile for an app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - publishingProfileOptions - Specifies publishingProfileOptions for publishing profile. For example, use {"format": "FileZilla3"} @@ -18397,18 +19986,24 @@ func (client *WebAppsClient) listPublishingCredentialsSlotCreateRequest(ctx cont // - options - WebAppsClientListPublishingProfileXMLWithSecretsOptions contains the optional parameters for the WebAppsClient.ListPublishingProfileXMLWithSecrets // method. func (client *WebAppsClient) ListPublishingProfileXMLWithSecrets(ctx context.Context, resourceGroupName string, name string, publishingProfileOptions CsmPublishingProfileOptions, options *WebAppsClientListPublishingProfileXMLWithSecretsOptions) (WebAppsClientListPublishingProfileXMLWithSecretsResponse, error) { + var err error + const operationName = "WebAppsClient.ListPublishingProfileXMLWithSecrets" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listPublishingProfileXMLWithSecretsCreateRequest(ctx, resourceGroupName, name, publishingProfileOptions, options) if err != nil { return WebAppsClientListPublishingProfileXMLWithSecretsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListPublishingProfileXMLWithSecretsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListPublishingProfileXMLWithSecretsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListPublishingProfileXMLWithSecretsResponse{}, err } - return WebAppsClientListPublishingProfileXMLWithSecretsResponse{Body: resp.Body}, nil + return WebAppsClientListPublishingProfileXMLWithSecretsResponse{Body: httpResp.Body}, nil } // listPublishingProfileXMLWithSecretsCreateRequest creates the ListPublishingProfileXMLWithSecrets request. @@ -18431,18 +20026,21 @@ func (client *WebAppsClient) listPublishingProfileXMLWithSecretsCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() runtime.SkipBodyDownload(req) req.Raw().Header["Accept"] = []string{"application/xml"} - return req, runtime.MarshalAsJSON(req, publishingProfileOptions) + if err := runtime.MarshalAsJSON(req, publishingProfileOptions); err != nil { + return nil, err + } + return req, nil } // ListPublishingProfileXMLWithSecretsSlot - Description for Gets the publishing profile for an app (or deployment slot, if // specified). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will get the publishing profile for the production @@ -18452,18 +20050,24 @@ func (client *WebAppsClient) listPublishingProfileXMLWithSecretsCreateRequest(ct // - options - WebAppsClientListPublishingProfileXMLWithSecretsSlotOptions contains the optional parameters for the WebAppsClient.ListPublishingProfileXMLWithSecretsSlot // method. func (client *WebAppsClient) ListPublishingProfileXMLWithSecretsSlot(ctx context.Context, resourceGroupName string, name string, slot string, publishingProfileOptions CsmPublishingProfileOptions, options *WebAppsClientListPublishingProfileXMLWithSecretsSlotOptions) (WebAppsClientListPublishingProfileXMLWithSecretsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ListPublishingProfileXMLWithSecretsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listPublishingProfileXMLWithSecretsSlotCreateRequest(ctx, resourceGroupName, name, slot, publishingProfileOptions, options) if err != nil { return WebAppsClientListPublishingProfileXMLWithSecretsSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListPublishingProfileXMLWithSecretsSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListPublishingProfileXMLWithSecretsSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListPublishingProfileXMLWithSecretsSlotResponse{}, err } - return WebAppsClientListPublishingProfileXMLWithSecretsSlotResponse{Body: resp.Body}, nil + return WebAppsClientListPublishingProfileXMLWithSecretsSlotResponse{Body: httpResp.Body}, nil } // listPublishingProfileXMLWithSecretsSlotCreateRequest creates the ListPublishingProfileXMLWithSecretsSlot request. @@ -18490,34 +20094,44 @@ func (client *WebAppsClient) listPublishingProfileXMLWithSecretsSlotCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() runtime.SkipBodyDownload(req) req.Raw().Header["Accept"] = []string{"application/xml"} - return req, runtime.MarshalAsJSON(req, publishingProfileOptions) + if err := runtime.MarshalAsJSON(req, publishingProfileOptions); err != nil { + return nil, err + } + return req, nil } // ListRelayServiceConnections - Description for Gets hybrid connections configured for an app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientListRelayServiceConnectionsOptions contains the optional parameters for the WebAppsClient.ListRelayServiceConnections // method. func (client *WebAppsClient) ListRelayServiceConnections(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListRelayServiceConnectionsOptions) (WebAppsClientListRelayServiceConnectionsResponse, error) { + var err error + const operationName = "WebAppsClient.ListRelayServiceConnections" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listRelayServiceConnectionsCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientListRelayServiceConnectionsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListRelayServiceConnectionsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListRelayServiceConnectionsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListRelayServiceConnectionsResponse{}, err } - return client.listRelayServiceConnectionsHandleResponse(resp) + resp, err := client.listRelayServiceConnectionsHandleResponse(httpResp) + return resp, err } // listRelayServiceConnectionsCreateRequest creates the ListRelayServiceConnections request. @@ -18540,7 +20154,7 @@ func (client *WebAppsClient) listRelayServiceConnectionsCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -18559,7 +20173,7 @@ func (client *WebAppsClient) listRelayServiceConnectionsHandleResponse(resp *htt // specified). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will get hybrid connections for the production @@ -18567,18 +20181,25 @@ func (client *WebAppsClient) listRelayServiceConnectionsHandleResponse(resp *htt // - options - WebAppsClientListRelayServiceConnectionsSlotOptions contains the optional parameters for the WebAppsClient.ListRelayServiceConnectionsSlot // method. func (client *WebAppsClient) ListRelayServiceConnectionsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListRelayServiceConnectionsSlotOptions) (WebAppsClientListRelayServiceConnectionsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ListRelayServiceConnectionsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listRelayServiceConnectionsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientListRelayServiceConnectionsSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListRelayServiceConnectionsSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListRelayServiceConnectionsSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListRelayServiceConnectionsSlotResponse{}, err } - return client.listRelayServiceConnectionsSlotHandleResponse(resp) + resp, err := client.listRelayServiceConnectionsSlotHandleResponse(httpResp) + return resp, err } // listRelayServiceConnectionsSlotCreateRequest creates the ListRelayServiceConnectionsSlot request. @@ -18605,7 +20226,7 @@ func (client *WebAppsClient) listRelayServiceConnectionsSlotCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -18622,7 +20243,7 @@ func (client *WebAppsClient) listRelayServiceConnectionsSlotHandleResponse(resp // NewListSiteBackupsPager - Description for Gets existing backups of an app. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientListSiteBackupsOptions contains the optional parameters for the WebAppsClient.NewListSiteBackupsPager @@ -18633,25 +20254,20 @@ func (client *WebAppsClient) NewListSiteBackupsPager(resourceGroupName string, n return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListSiteBackupsResponse) (WebAppsClientListSiteBackupsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSiteBackupsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListSiteBackupsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSiteBackupsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return WebAppsClientListSiteBackupsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebAppsClientListSiteBackupsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListSiteBackupsResponse{}, runtime.NewResponseError(resp) - } return client.listSiteBackupsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -18675,7 +20291,7 @@ func (client *WebAppsClient) listSiteBackupsCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -18692,7 +20308,7 @@ func (client *WebAppsClient) listSiteBackupsHandleResponse(resp *http.Response) // NewListSiteBackupsSlotPager - Description for Gets existing backups of an app. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will get backups of the production slot. @@ -18704,25 +20320,20 @@ func (client *WebAppsClient) NewListSiteBackupsSlotPager(resourceGroupName strin return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListSiteBackupsSlotResponse) (WebAppsClientListSiteBackupsSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSiteBackupsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListSiteBackupsSlotResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListSiteBackupsSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSiteBackupsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) if err != nil { return WebAppsClientListSiteBackupsSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListSiteBackupsSlotResponse{}, runtime.NewResponseError(resp) - } return client.listSiteBackupsSlotHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -18750,7 +20361,7 @@ func (client *WebAppsClient) listSiteBackupsSlotCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -18767,7 +20378,7 @@ func (client *WebAppsClient) listSiteBackupsSlotHandleResponse(resp *http.Respon // NewListSiteExtensionsPager - Description for Get list of siteextensions for a web site, or a deployment slot. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - options - WebAppsClientListSiteExtensionsOptions contains the optional parameters for the WebAppsClient.NewListSiteExtensionsPager @@ -18778,25 +20389,20 @@ func (client *WebAppsClient) NewListSiteExtensionsPager(resourceGroupName string return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListSiteExtensionsResponse) (WebAppsClientListSiteExtensionsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSiteExtensionsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListSiteExtensionsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSiteExtensionsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return WebAppsClientListSiteExtensionsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebAppsClientListSiteExtensionsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListSiteExtensionsResponse{}, runtime.NewResponseError(resp) - } return client.listSiteExtensionsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -18820,7 +20426,7 @@ func (client *WebAppsClient) listSiteExtensionsCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -18837,7 +20443,7 @@ func (client *WebAppsClient) listSiteExtensionsHandleResponse(resp *http.Respons // NewListSiteExtensionsSlotPager - Description for Get list of siteextensions for a web site, or a deployment slot. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - slot - Name of the deployment slot. If a slot is not specified, the API uses the production slot. @@ -18849,25 +20455,20 @@ func (client *WebAppsClient) NewListSiteExtensionsSlotPager(resourceGroupName st return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListSiteExtensionsSlotResponse) (WebAppsClientListSiteExtensionsSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSiteExtensionsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListSiteExtensionsSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSiteExtensionsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) if err != nil { return WebAppsClientListSiteExtensionsSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebAppsClientListSiteExtensionsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListSiteExtensionsSlotResponse{}, runtime.NewResponseError(resp) - } return client.listSiteExtensionsSlotHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -18895,7 +20496,7 @@ func (client *WebAppsClient) listSiteExtensionsSlotCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -18913,24 +20514,31 @@ func (client *WebAppsClient) listSiteExtensionsSlotHandleResponse(resp *http.Res // ListSitePushSettings - Description for Gets the Push settings associated with web app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - options - WebAppsClientListSitePushSettingsOptions contains the optional parameters for the WebAppsClient.ListSitePushSettings // method. func (client *WebAppsClient) ListSitePushSettings(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListSitePushSettingsOptions) (WebAppsClientListSitePushSettingsResponse, error) { + var err error + const operationName = "WebAppsClient.ListSitePushSettings" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listSitePushSettingsCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientListSitePushSettingsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListSitePushSettingsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListSitePushSettingsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListSitePushSettingsResponse{}, err } - return client.listSitePushSettingsHandleResponse(resp) + resp, err := client.listSitePushSettingsHandleResponse(httpResp) + return resp, err } // listSitePushSettingsCreateRequest creates the ListSitePushSettings request. @@ -18953,7 +20561,7 @@ func (client *WebAppsClient) listSitePushSettingsCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -18971,25 +20579,32 @@ func (client *WebAppsClient) listSitePushSettingsHandleResponse(resp *http.Respo // ListSitePushSettingsSlot - Description for Gets the Push settings associated with web app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - slot - Name of web app slot. If not specified then will default to production slot. // - options - WebAppsClientListSitePushSettingsSlotOptions contains the optional parameters for the WebAppsClient.ListSitePushSettingsSlot // method. func (client *WebAppsClient) ListSitePushSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListSitePushSettingsSlotOptions) (WebAppsClientListSitePushSettingsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ListSitePushSettingsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listSitePushSettingsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientListSitePushSettingsSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListSitePushSettingsSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListSitePushSettingsSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListSitePushSettingsSlotResponse{}, err } - return client.listSitePushSettingsSlotHandleResponse(resp) + resp, err := client.listSitePushSettingsSlotHandleResponse(httpResp) + return resp, err } // listSitePushSettingsSlotCreateRequest creates the ListSitePushSettingsSlot request. @@ -19016,7 +20631,7 @@ func (client *WebAppsClient) listSitePushSettingsSlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -19035,24 +20650,31 @@ func (client *WebAppsClient) listSitePushSettingsSlotHandleResponse(resp *http.R // (not swapped). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientListSlotConfigurationNamesOptions contains the optional parameters for the WebAppsClient.ListSlotConfigurationNames // method. func (client *WebAppsClient) ListSlotConfigurationNames(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListSlotConfigurationNamesOptions) (WebAppsClientListSlotConfigurationNamesResponse, error) { + var err error + const operationName = "WebAppsClient.ListSlotConfigurationNames" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listSlotConfigurationNamesCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientListSlotConfigurationNamesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListSlotConfigurationNamesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListSlotConfigurationNamesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListSlotConfigurationNamesResponse{}, err } - return client.listSlotConfigurationNamesHandleResponse(resp) + resp, err := client.listSlotConfigurationNamesHandleResponse(httpResp) + return resp, err } // listSlotConfigurationNamesCreateRequest creates the ListSlotConfigurationNames request. @@ -19075,7 +20697,7 @@ func (client *WebAppsClient) listSlotConfigurationNamesCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -19093,7 +20715,7 @@ func (client *WebAppsClient) listSlotConfigurationNamesHandleResponse(resp *http // NewListSlotDifferencesFromProductionPager - Description for Get the difference in configuration settings between two web // app slots. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slotSwapEntity - JSON object that contains the target slot name. See example. @@ -19105,25 +20727,20 @@ func (client *WebAppsClient) NewListSlotDifferencesFromProductionPager(resourceG return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListSlotDifferencesFromProductionResponse) (WebAppsClientListSlotDifferencesFromProductionResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSlotDifferencesFromProductionCreateRequest(ctx, resourceGroupName, name, slotSwapEntity, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListSlotDifferencesFromProductionPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSlotDifferencesFromProductionCreateRequest(ctx, resourceGroupName, name, slotSwapEntity, options) + }, nil) if err != nil { return WebAppsClientListSlotDifferencesFromProductionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebAppsClientListSlotDifferencesFromProductionResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListSlotDifferencesFromProductionResponse{}, runtime.NewResponseError(resp) - } return client.listSlotDifferencesFromProductionHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -19147,10 +20764,13 @@ func (client *WebAppsClient) listSlotDifferencesFromProductionCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, slotSwapEntity) + if err := runtime.MarshalAsJSON(req, slotSwapEntity); err != nil { + return nil, err + } + return req, nil } // listSlotDifferencesFromProductionHandleResponse handles the ListSlotDifferencesFromProduction response. @@ -19164,7 +20784,7 @@ func (client *WebAppsClient) listSlotDifferencesFromProductionHandleResponse(res // NewListSlotDifferencesSlotPager - Description for Get the difference in configuration settings between two web app slots. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the source slot. If a slot is not specified, the production slot is used as the source slot. @@ -19177,25 +20797,20 @@ func (client *WebAppsClient) NewListSlotDifferencesSlotPager(resourceGroupName s return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListSlotDifferencesSlotResponse) (WebAppsClientListSlotDifferencesSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSlotDifferencesSlotCreateRequest(ctx, resourceGroupName, name, slot, slotSwapEntity, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListSlotDifferencesSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSlotDifferencesSlotCreateRequest(ctx, resourceGroupName, name, slot, slotSwapEntity, options) + }, nil) if err != nil { return WebAppsClientListSlotDifferencesSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebAppsClientListSlotDifferencesSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListSlotDifferencesSlotResponse{}, runtime.NewResponseError(resp) - } return client.listSlotDifferencesSlotHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -19223,10 +20838,13 @@ func (client *WebAppsClient) listSlotDifferencesSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, slotSwapEntity) + if err := runtime.MarshalAsJSON(req, slotSwapEntity); err != nil { + return nil, err + } + return req, nil } // listSlotDifferencesSlotHandleResponse handles the ListSlotDifferencesSlot response. @@ -19240,7 +20858,7 @@ func (client *WebAppsClient) listSlotDifferencesSlotHandleResponse(resp *http.Re // NewListSlotSiteDeploymentStatusesSlotPager - List deployment statuses for an app (or deployment slot, if specified). // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will get the deployment status for the production @@ -19253,25 +20871,20 @@ func (client *WebAppsClient) NewListSlotSiteDeploymentStatusesSlotPager(resource return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListSlotSiteDeploymentStatusesSlotResponse) (WebAppsClientListSlotSiteDeploymentStatusesSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSlotSiteDeploymentStatusesSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListSlotSiteDeploymentStatusesSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSlotSiteDeploymentStatusesSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) if err != nil { return WebAppsClientListSlotSiteDeploymentStatusesSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebAppsClientListSlotSiteDeploymentStatusesSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListSlotSiteDeploymentStatusesSlotResponse{}, runtime.NewResponseError(resp) - } return client.listSlotSiteDeploymentStatusesSlotHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -19299,7 +20912,7 @@ func (client *WebAppsClient) listSlotSiteDeploymentStatusesSlotCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -19316,7 +20929,7 @@ func (client *WebAppsClient) listSlotSiteDeploymentStatusesSlotHandleResponse(re // NewListSlotsPager - Description for Gets an app's deployment slots. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientListSlotsOptions contains the optional parameters for the WebAppsClient.NewListSlotsPager method. @@ -19326,25 +20939,20 @@ func (client *WebAppsClient) NewListSlotsPager(resourceGroupName string, name st return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListSlotsResponse) (WebAppsClientListSlotsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSlotsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListSlotsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSlotsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return WebAppsClientListSlotsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebAppsClientListSlotsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListSlotsResponse{}, runtime.NewResponseError(resp) - } return client.listSlotsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -19368,7 +20976,7 @@ func (client *WebAppsClient) listSlotsCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -19385,7 +20993,7 @@ func (client *WebAppsClient) listSlotsHandleResponse(resp *http.Response) (WebAp // NewListSnapshotsPager - Description for Returns all Snapshots to the user. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Website Name. // - options - WebAppsClientListSnapshotsOptions contains the optional parameters for the WebAppsClient.NewListSnapshotsPager @@ -19396,25 +21004,20 @@ func (client *WebAppsClient) NewListSnapshotsPager(resourceGroupName string, nam return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListSnapshotsResponse) (WebAppsClientListSnapshotsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSnapshotsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListSnapshotsResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListSnapshotsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSnapshotsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return WebAppsClientListSnapshotsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListSnapshotsResponse{}, runtime.NewResponseError(resp) - } return client.listSnapshotsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -19438,7 +21041,7 @@ func (client *WebAppsClient) listSnapshotsCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -19455,7 +21058,7 @@ func (client *WebAppsClient) listSnapshotsHandleResponse(resp *http.Response) (W // NewListSnapshotsFromDRSecondaryPager - Description for Returns all Snapshots to the user from DRSecondary endpoint. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Website Name. // - options - WebAppsClientListSnapshotsFromDRSecondaryOptions contains the optional parameters for the WebAppsClient.NewListSnapshotsFromDRSecondaryPager @@ -19466,25 +21069,20 @@ func (client *WebAppsClient) NewListSnapshotsFromDRSecondaryPager(resourceGroupN return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListSnapshotsFromDRSecondaryResponse) (WebAppsClientListSnapshotsFromDRSecondaryResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSnapshotsFromDRSecondaryCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListSnapshotsFromDRSecondaryPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSnapshotsFromDRSecondaryCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return WebAppsClientListSnapshotsFromDRSecondaryResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebAppsClientListSnapshotsFromDRSecondaryResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListSnapshotsFromDRSecondaryResponse{}, runtime.NewResponseError(resp) - } return client.listSnapshotsFromDRSecondaryHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -19508,7 +21106,7 @@ func (client *WebAppsClient) listSnapshotsFromDRSecondaryCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -19525,7 +21123,7 @@ func (client *WebAppsClient) listSnapshotsFromDRSecondaryHandleResponse(resp *ht // NewListSnapshotsFromDRSecondarySlotPager - Description for Returns all Snapshots to the user from DRSecondary endpoint. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Website Name. // - slot - Website Slot. @@ -19537,25 +21135,20 @@ func (client *WebAppsClient) NewListSnapshotsFromDRSecondarySlotPager(resourceGr return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListSnapshotsFromDRSecondarySlotResponse) (WebAppsClientListSnapshotsFromDRSecondarySlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSnapshotsFromDRSecondarySlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListSnapshotsFromDRSecondarySlotResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListSnapshotsFromDRSecondarySlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSnapshotsFromDRSecondarySlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) if err != nil { return WebAppsClientListSnapshotsFromDRSecondarySlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListSnapshotsFromDRSecondarySlotResponse{}, runtime.NewResponseError(resp) - } return client.listSnapshotsFromDRSecondarySlotHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -19583,7 +21176,7 @@ func (client *WebAppsClient) listSnapshotsFromDRSecondarySlotCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -19600,7 +21193,7 @@ func (client *WebAppsClient) listSnapshotsFromDRSecondarySlotHandleResponse(resp // NewListSnapshotsSlotPager - Description for Returns all Snapshots to the user. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Website Name. // - slot - Website Slot. @@ -19612,25 +21205,20 @@ func (client *WebAppsClient) NewListSnapshotsSlotPager(resourceGroupName string, return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListSnapshotsSlotResponse) (WebAppsClientListSnapshotsSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSnapshotsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListSnapshotsSlotResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListSnapshotsSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSnapshotsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) if err != nil { return WebAppsClientListSnapshotsSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListSnapshotsSlotResponse{}, runtime.NewResponseError(resp) - } return client.listSnapshotsSlotHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -19658,7 +21246,7 @@ func (client *WebAppsClient) listSnapshotsSlotCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -19676,24 +21264,31 @@ func (client *WebAppsClient) listSnapshotsSlotHandleResponse(resp *http.Response // ListSyncFunctionTriggers - Description for This is to allow calling via powershell and ARM template. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientListSyncFunctionTriggersOptions contains the optional parameters for the WebAppsClient.ListSyncFunctionTriggers // method. func (client *WebAppsClient) ListSyncFunctionTriggers(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListSyncFunctionTriggersOptions) (WebAppsClientListSyncFunctionTriggersResponse, error) { + var err error + const operationName = "WebAppsClient.ListSyncFunctionTriggers" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listSyncFunctionTriggersCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientListSyncFunctionTriggersResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListSyncFunctionTriggersResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListSyncFunctionTriggersResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListSyncFunctionTriggersResponse{}, err } - return client.listSyncFunctionTriggersHandleResponse(resp) + resp, err := client.listSyncFunctionTriggersHandleResponse(httpResp) + return resp, err } // listSyncFunctionTriggersCreateRequest creates the ListSyncFunctionTriggers request. @@ -19716,7 +21311,7 @@ func (client *WebAppsClient) listSyncFunctionTriggersCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -19734,25 +21329,32 @@ func (client *WebAppsClient) listSyncFunctionTriggersHandleResponse(resp *http.R // ListSyncFunctionTriggersSlot - Description for This is to allow calling via powershell and ARM template. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. // - options - WebAppsClientListSyncFunctionTriggersSlotOptions contains the optional parameters for the WebAppsClient.ListSyncFunctionTriggersSlot // method. func (client *WebAppsClient) ListSyncFunctionTriggersSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListSyncFunctionTriggersSlotOptions) (WebAppsClientListSyncFunctionTriggersSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ListSyncFunctionTriggersSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listSyncFunctionTriggersSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientListSyncFunctionTriggersSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListSyncFunctionTriggersSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListSyncFunctionTriggersSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListSyncFunctionTriggersSlotResponse{}, err } - return client.listSyncFunctionTriggersSlotHandleResponse(resp) + resp, err := client.listSyncFunctionTriggersSlotHandleResponse(httpResp) + return resp, err } // listSyncFunctionTriggersSlotCreateRequest creates the ListSyncFunctionTriggersSlot request. @@ -19779,7 +21381,7 @@ func (client *WebAppsClient) listSyncFunctionTriggersSlotCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -19797,21 +21399,27 @@ func (client *WebAppsClient) listSyncFunctionTriggersSlotHandleResponse(resp *ht // ListSyncStatus - Description for This is to allow calling via powershell and ARM template. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientListSyncStatusOptions contains the optional parameters for the WebAppsClient.ListSyncStatus method. func (client *WebAppsClient) ListSyncStatus(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListSyncStatusOptions) (WebAppsClientListSyncStatusResponse, error) { + var err error + const operationName = "WebAppsClient.ListSyncStatus" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listSyncStatusCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientListSyncStatusResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListSyncStatusResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientListSyncStatusResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListSyncStatusResponse{}, err } return WebAppsClientListSyncStatusResponse{}, nil } @@ -19836,7 +21444,7 @@ func (client *WebAppsClient) listSyncStatusCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -19845,23 +21453,29 @@ func (client *WebAppsClient) listSyncStatusCreateRequest(ctx context.Context, re // ListSyncStatusSlot - Description for This is to allow calling via powershell and ARM template. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. // - options - WebAppsClientListSyncStatusSlotOptions contains the optional parameters for the WebAppsClient.ListSyncStatusSlot // method. func (client *WebAppsClient) ListSyncStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListSyncStatusSlotOptions) (WebAppsClientListSyncStatusSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ListSyncStatusSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listSyncStatusSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientListSyncStatusSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListSyncStatusSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientListSyncStatusSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListSyncStatusSlotResponse{}, err } return WebAppsClientListSyncStatusSlotResponse{}, nil } @@ -19890,7 +21504,7 @@ func (client *WebAppsClient) listSyncStatusSlotCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -19898,7 +21512,7 @@ func (client *WebAppsClient) listSyncStatusSlotCreateRequest(ctx context.Context // NewListTriggeredWebJobHistoryPager - Description for List a triggered web job's history for an app, or a deployment slot. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - webJobName - Name of Web Job. @@ -19910,25 +21524,20 @@ func (client *WebAppsClient) NewListTriggeredWebJobHistoryPager(resourceGroupNam return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListTriggeredWebJobHistoryResponse) (WebAppsClientListTriggeredWebJobHistoryResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listTriggeredWebJobHistoryCreateRequest(ctx, resourceGroupName, name, webJobName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListTriggeredWebJobHistoryResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListTriggeredWebJobHistoryPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listTriggeredWebJobHistoryCreateRequest(ctx, resourceGroupName, name, webJobName, options) + }, nil) if err != nil { return WebAppsClientListTriggeredWebJobHistoryResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListTriggeredWebJobHistoryResponse{}, runtime.NewResponseError(resp) - } return client.listTriggeredWebJobHistoryHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -19956,7 +21565,7 @@ func (client *WebAppsClient) listTriggeredWebJobHistoryCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -19974,7 +21583,7 @@ func (client *WebAppsClient) listTriggeredWebJobHistoryHandleResponse(resp *http // NewListTriggeredWebJobHistorySlotPager - Description for List a triggered web job's history for an app, or a deployment // slot. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - webJobName - Name of Web Job. @@ -19987,25 +21596,20 @@ func (client *WebAppsClient) NewListTriggeredWebJobHistorySlotPager(resourceGrou return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListTriggeredWebJobHistorySlotResponse) (WebAppsClientListTriggeredWebJobHistorySlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listTriggeredWebJobHistorySlotCreateRequest(ctx, resourceGroupName, name, webJobName, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListTriggeredWebJobHistorySlotResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListTriggeredWebJobHistorySlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listTriggeredWebJobHistorySlotCreateRequest(ctx, resourceGroupName, name, webJobName, slot, options) + }, nil) if err != nil { return WebAppsClientListTriggeredWebJobHistorySlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListTriggeredWebJobHistorySlotResponse{}, runtime.NewResponseError(resp) - } return client.listTriggeredWebJobHistorySlotHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -20037,7 +21641,7 @@ func (client *WebAppsClient) listTriggeredWebJobHistorySlotCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -20054,7 +21658,7 @@ func (client *WebAppsClient) listTriggeredWebJobHistorySlotHandleResponse(resp * // NewListTriggeredWebJobsPager - Description for List triggered web jobs for an app, or a deployment slot. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - options - WebAppsClientListTriggeredWebJobsOptions contains the optional parameters for the WebAppsClient.NewListTriggeredWebJobsPager @@ -20065,25 +21669,20 @@ func (client *WebAppsClient) NewListTriggeredWebJobsPager(resourceGroupName stri return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListTriggeredWebJobsResponse) (WebAppsClientListTriggeredWebJobsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listTriggeredWebJobsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListTriggeredWebJobsResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListTriggeredWebJobsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listTriggeredWebJobsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return WebAppsClientListTriggeredWebJobsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListTriggeredWebJobsResponse{}, runtime.NewResponseError(resp) - } return client.listTriggeredWebJobsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -20107,7 +21706,7 @@ func (client *WebAppsClient) listTriggeredWebJobsCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -20124,7 +21723,7 @@ func (client *WebAppsClient) listTriggeredWebJobsHandleResponse(resp *http.Respo // NewListTriggeredWebJobsSlotPager - Description for List triggered web jobs for an app, or a deployment slot. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - slot - Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. @@ -20136,25 +21735,20 @@ func (client *WebAppsClient) NewListTriggeredWebJobsSlotPager(resourceGroupName return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListTriggeredWebJobsSlotResponse) (WebAppsClientListTriggeredWebJobsSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listTriggeredWebJobsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListTriggeredWebJobsSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listTriggeredWebJobsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) if err != nil { return WebAppsClientListTriggeredWebJobsSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebAppsClientListTriggeredWebJobsSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListTriggeredWebJobsSlotResponse{}, runtime.NewResponseError(resp) - } return client.listTriggeredWebJobsSlotHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -20182,7 +21776,7 @@ func (client *WebAppsClient) listTriggeredWebJobsSlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -20199,7 +21793,7 @@ func (client *WebAppsClient) listTriggeredWebJobsSlotHandleResponse(resp *http.R // NewListUsagesPager - Description for Gets the quota usage information of an app (or deployment slot, if specified). // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientListUsagesOptions contains the optional parameters for the WebAppsClient.NewListUsagesPager method. @@ -20209,25 +21803,20 @@ func (client *WebAppsClient) NewListUsagesPager(resourceGroupName string, name s return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListUsagesResponse) (WebAppsClientListUsagesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listUsagesCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListUsagesResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListUsagesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listUsagesCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return WebAppsClientListUsagesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListUsagesResponse{}, runtime.NewResponseError(resp) - } return client.listUsagesHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -20251,7 +21840,7 @@ func (client *WebAppsClient) listUsagesCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() unencodedParams := []string{req.Raw().URL.RawQuery} if options != nil && options.Filter != nil { @@ -20273,7 +21862,7 @@ func (client *WebAppsClient) listUsagesHandleResponse(resp *http.Response) (WebA // NewListUsagesSlotPager - Description for Gets the quota usage information of an app (or deployment slot, if specified). // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will get quota information of the production slot. @@ -20285,25 +21874,20 @@ func (client *WebAppsClient) NewListUsagesSlotPager(resourceGroupName string, na return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListUsagesSlotResponse) (WebAppsClientListUsagesSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listUsagesSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListUsagesSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listUsagesSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) if err != nil { return WebAppsClientListUsagesSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebAppsClientListUsagesSlotResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListUsagesSlotResponse{}, runtime.NewResponseError(resp) - } return client.listUsagesSlotHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -20331,7 +21915,7 @@ func (client *WebAppsClient) listUsagesSlotCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() unencodedParams := []string{req.Raw().URL.RawQuery} if options != nil && options.Filter != nil { @@ -20354,24 +21938,31 @@ func (client *WebAppsClient) listUsagesSlotHandleResponse(resp *http.Response) ( // ListVnetConnections - Description for Gets the virtual networks the app (or deployment slot) is connected to. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientListVnetConnectionsOptions contains the optional parameters for the WebAppsClient.ListVnetConnections // method. func (client *WebAppsClient) ListVnetConnections(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListVnetConnectionsOptions) (WebAppsClientListVnetConnectionsResponse, error) { + var err error + const operationName = "WebAppsClient.ListVnetConnections" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listVnetConnectionsCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientListVnetConnectionsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListVnetConnectionsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListVnetConnectionsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListVnetConnectionsResponse{}, err } - return client.listVnetConnectionsHandleResponse(resp) + resp, err := client.listVnetConnectionsHandleResponse(httpResp) + return resp, err } // listVnetConnectionsCreateRequest creates the ListVnetConnections request. @@ -20394,7 +21985,7 @@ func (client *WebAppsClient) listVnetConnectionsCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -20412,7 +22003,7 @@ func (client *WebAppsClient) listVnetConnectionsHandleResponse(resp *http.Respon // ListVnetConnectionsSlot - Description for Gets the virtual networks the app (or deployment slot) is connected to. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will get virtual network connections for the production @@ -20420,18 +22011,25 @@ func (client *WebAppsClient) listVnetConnectionsHandleResponse(resp *http.Respon // - options - WebAppsClientListVnetConnectionsSlotOptions contains the optional parameters for the WebAppsClient.ListVnetConnectionsSlot // method. func (client *WebAppsClient) ListVnetConnectionsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListVnetConnectionsSlotOptions) (WebAppsClientListVnetConnectionsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ListVnetConnectionsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listVnetConnectionsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientListVnetConnectionsSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListVnetConnectionsSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListVnetConnectionsSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListVnetConnectionsSlotResponse{}, err } - return client.listVnetConnectionsSlotHandleResponse(resp) + resp, err := client.listVnetConnectionsSlotHandleResponse(httpResp) + return resp, err } // listVnetConnectionsSlotCreateRequest creates the ListVnetConnectionsSlot request. @@ -20458,7 +22056,7 @@ func (client *WebAppsClient) listVnetConnectionsSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -20475,7 +22073,7 @@ func (client *WebAppsClient) listVnetConnectionsSlotHandleResponse(resp *http.Re // NewListWebJobsPager - Description for List webjobs for an app, or a deployment slot. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - options - WebAppsClientListWebJobsOptions contains the optional parameters for the WebAppsClient.NewListWebJobsPager method. @@ -20485,25 +22083,20 @@ func (client *WebAppsClient) NewListWebJobsPager(resourceGroupName string, name return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListWebJobsResponse) (WebAppsClientListWebJobsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listWebJobsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListWebJobsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listWebJobsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return WebAppsClientListWebJobsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebAppsClientListWebJobsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListWebJobsResponse{}, runtime.NewResponseError(resp) - } return client.listWebJobsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -20527,7 +22120,7 @@ func (client *WebAppsClient) listWebJobsCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -20544,7 +22137,7 @@ func (client *WebAppsClient) listWebJobsHandleResponse(resp *http.Response) (Web // NewListWebJobsSlotPager - Description for List webjobs for an app, or a deployment slot. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - slot - Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. @@ -20556,25 +22149,20 @@ func (client *WebAppsClient) NewListWebJobsSlotPager(resourceGroupName string, n return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListWebJobsSlotResponse) (WebAppsClientListWebJobsSlotResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listWebJobsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebAppsClientListWebJobsSlotResponse{}, err - } - resp, err := client.internal.Pipeline().Do(req) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListWebJobsSlotPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listWebJobsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) + }, nil) if err != nil { return WebAppsClientListWebJobsSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListWebJobsSlotResponse{}, runtime.NewResponseError(resp) - } return client.listWebJobsSlotHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -20602,7 +22190,7 @@ func (client *WebAppsClient) listWebJobsSlotCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -20619,7 +22207,7 @@ func (client *WebAppsClient) listWebJobsSlotHandleResponse(resp *http.Response) // NewListWorkflowsPager - List the workflows for a web site, or a deployment slot. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - options - WebAppsClientListWorkflowsOptions contains the optional parameters for the WebAppsClient.NewListWorkflowsPager @@ -20630,25 +22218,20 @@ func (client *WebAppsClient) NewListWorkflowsPager(resourceGroupName string, nam return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebAppsClientListWorkflowsResponse) (WebAppsClientListWorkflowsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listWorkflowsCreateRequest(ctx, resourceGroupName, name, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebAppsClient.NewListWorkflowsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listWorkflowsCreateRequest(ctx, resourceGroupName, name, options) + }, nil) if err != nil { return WebAppsClientListWorkflowsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebAppsClientListWorkflowsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListWorkflowsResponse{}, runtime.NewResponseError(resp) - } return client.listWorkflowsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -20672,7 +22255,7 @@ func (client *WebAppsClient) listWorkflowsCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -20690,24 +22273,31 @@ func (client *WebAppsClient) listWorkflowsHandleResponse(resp *http.Response) (W // ListWorkflowsConnections - Lists logic app's connections for web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - options - WebAppsClientListWorkflowsConnectionsOptions contains the optional parameters for the WebAppsClient.ListWorkflowsConnections // method. func (client *WebAppsClient) ListWorkflowsConnections(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientListWorkflowsConnectionsOptions) (WebAppsClientListWorkflowsConnectionsResponse, error) { + var err error + const operationName = "WebAppsClient.ListWorkflowsConnections" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listWorkflowsConnectionsCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientListWorkflowsConnectionsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListWorkflowsConnectionsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListWorkflowsConnectionsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListWorkflowsConnectionsResponse{}, err } - return client.listWorkflowsConnectionsHandleResponse(resp) + resp, err := client.listWorkflowsConnectionsHandleResponse(httpResp) + return resp, err } // listWorkflowsConnectionsCreateRequest creates the ListWorkflowsConnections request. @@ -20730,7 +22320,7 @@ func (client *WebAppsClient) listWorkflowsConnectionsCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -20748,25 +22338,32 @@ func (client *WebAppsClient) listWorkflowsConnectionsHandleResponse(resp *http.R // ListWorkflowsConnectionsSlot - Lists logic app's connections for web site, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - slot - Name of the deployment slot. // - options - WebAppsClientListWorkflowsConnectionsSlotOptions contains the optional parameters for the WebAppsClient.ListWorkflowsConnectionsSlot // method. func (client *WebAppsClient) ListWorkflowsConnectionsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientListWorkflowsConnectionsSlotOptions) (WebAppsClientListWorkflowsConnectionsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ListWorkflowsConnectionsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listWorkflowsConnectionsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientListWorkflowsConnectionsSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientListWorkflowsConnectionsSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientListWorkflowsConnectionsSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientListWorkflowsConnectionsSlotResponse{}, err } - return client.listWorkflowsConnectionsSlotHandleResponse(resp) + resp, err := client.listWorkflowsConnectionsSlotHandleResponse(httpResp) + return resp, err } // listWorkflowsConnectionsSlotCreateRequest creates the ListWorkflowsConnectionsSlot request. @@ -20793,7 +22390,7 @@ func (client *WebAppsClient) listWorkflowsConnectionsSlotCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -20811,7 +22408,7 @@ func (client *WebAppsClient) listWorkflowsConnectionsSlotHandleResponse(resp *ht // BeginMigrateMySQL - Description for Migrates a local (in-app) MySql database to a remote MySql database. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - migrationRequestEnvelope - MySql migration options. @@ -20823,29 +22420,40 @@ func (client *WebAppsClient) BeginMigrateMySQL(ctx context.Context, resourceGrou if err != nil { return nil, err } - return runtime.NewPoller[WebAppsClientMigrateMySQLResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientMigrateMySQLResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WebAppsClientMigrateMySQLResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientMigrateMySQLResponse]{ + Tracer: client.internal.Tracer(), + }) } } // MigrateMySQL - Description for Migrates a local (in-app) MySql database to a remote MySql database. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *WebAppsClient) migrateMySQL(ctx context.Context, resourceGroupName string, name string, migrationRequestEnvelope MigrateMySQLRequest, options *WebAppsClientBeginMigrateMySQLOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginMigrateMySQL" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.migrateMySQLCreateRequest(ctx, resourceGroupName, name, migrationRequestEnvelope, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // migrateMySQLCreateRequest creates the MigrateMySQL request. @@ -20868,16 +22476,19 @@ func (client *WebAppsClient) migrateMySQLCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, migrationRequestEnvelope) + if err := runtime.MarshalAsJSON(req, migrationRequestEnvelope); err != nil { + return nil, err + } + return req, nil } // BeginMigrateStorage - Description for Restores a web app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - subscriptionName - Azure subscription. // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. @@ -20890,29 +22501,40 @@ func (client *WebAppsClient) BeginMigrateStorage(ctx context.Context, subscripti if err != nil { return nil, err } - return runtime.NewPoller[WebAppsClientMigrateStorageResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientMigrateStorageResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WebAppsClientMigrateStorageResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientMigrateStorageResponse]{ + Tracer: client.internal.Tracer(), + }) } } // MigrateStorage - Description for Restores a web app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *WebAppsClient) migrateStorage(ctx context.Context, subscriptionName string, resourceGroupName string, name string, migrationOptions StorageMigrationOptions, options *WebAppsClientBeginMigrateStorageOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginMigrateStorage" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.migrateStorageCreateRequest(ctx, subscriptionName, resourceGroupName, name, migrationOptions, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // migrateStorageCreateRequest creates the MigrateStorage request. @@ -20936,35 +22558,45 @@ func (client *WebAppsClient) migrateStorageCreateRequest(ctx context.Context, su } reqQP := req.Raw().URL.Query() reqQP.Set("subscriptionName", subscriptionName) - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, migrationOptions) + if err := runtime.MarshalAsJSON(req, migrationOptions); err != nil { + return nil, err + } + return req, nil } // PutPrivateAccessVnet - Description for Sets data around private site access enablement and authorized Virtual Networks // that can access the site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - The name of the web app. // - access - The information for the private access // - options - WebAppsClientPutPrivateAccessVnetOptions contains the optional parameters for the WebAppsClient.PutPrivateAccessVnet // method. func (client *WebAppsClient) PutPrivateAccessVnet(ctx context.Context, resourceGroupName string, name string, access PrivateAccess, options *WebAppsClientPutPrivateAccessVnetOptions) (WebAppsClientPutPrivateAccessVnetResponse, error) { + var err error + const operationName = "WebAppsClient.PutPrivateAccessVnet" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.putPrivateAccessVnetCreateRequest(ctx, resourceGroupName, name, access, options) if err != nil { return WebAppsClientPutPrivateAccessVnetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientPutPrivateAccessVnetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientPutPrivateAccessVnetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientPutPrivateAccessVnetResponse{}, err } - return client.putPrivateAccessVnetHandleResponse(resp) + resp, err := client.putPrivateAccessVnetHandleResponse(httpResp) + return resp, err } // putPrivateAccessVnetCreateRequest creates the PutPrivateAccessVnet request. @@ -20987,10 +22619,13 @@ func (client *WebAppsClient) putPrivateAccessVnetCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, access) + if err := runtime.MarshalAsJSON(req, access); err != nil { + return nil, err + } + return req, nil } // putPrivateAccessVnetHandleResponse handles the PutPrivateAccessVnet response. @@ -21006,7 +22641,7 @@ func (client *WebAppsClient) putPrivateAccessVnetHandleResponse(resp *http.Respo // that can access the site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - The name of the web app. // - slot - The name of the slot for the web app. @@ -21014,18 +22649,25 @@ func (client *WebAppsClient) putPrivateAccessVnetHandleResponse(resp *http.Respo // - options - WebAppsClientPutPrivateAccessVnetSlotOptions contains the optional parameters for the WebAppsClient.PutPrivateAccessVnetSlot // method. func (client *WebAppsClient) PutPrivateAccessVnetSlot(ctx context.Context, resourceGroupName string, name string, slot string, access PrivateAccess, options *WebAppsClientPutPrivateAccessVnetSlotOptions) (WebAppsClientPutPrivateAccessVnetSlotResponse, error) { + var err error + const operationName = "WebAppsClient.PutPrivateAccessVnetSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.putPrivateAccessVnetSlotCreateRequest(ctx, resourceGroupName, name, slot, access, options) if err != nil { return WebAppsClientPutPrivateAccessVnetSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientPutPrivateAccessVnetSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientPutPrivateAccessVnetSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientPutPrivateAccessVnetSlotResponse{}, err } - return client.putPrivateAccessVnetSlotHandleResponse(resp) + resp, err := client.putPrivateAccessVnetSlotHandleResponse(httpResp) + return resp, err } // putPrivateAccessVnetSlotCreateRequest creates the PutPrivateAccessVnetSlot request. @@ -21052,10 +22694,13 @@ func (client *WebAppsClient) putPrivateAccessVnetSlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, access) + if err := runtime.MarshalAsJSON(req, access); err != nil { + return nil, err + } + return req, nil } // putPrivateAccessVnetSlotHandleResponse handles the PutPrivateAccessVnetSlot response. @@ -21070,23 +22715,29 @@ func (client *WebAppsClient) putPrivateAccessVnetSlotHandleResponse(resp *http.R // RecoverSiteConfigurationSnapshot - Description for Reverts the configuration of an app to a previous snapshot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - snapshotID - The ID of the snapshot to read. // - options - WebAppsClientRecoverSiteConfigurationSnapshotOptions contains the optional parameters for the WebAppsClient.RecoverSiteConfigurationSnapshot // method. func (client *WebAppsClient) RecoverSiteConfigurationSnapshot(ctx context.Context, resourceGroupName string, name string, snapshotID string, options *WebAppsClientRecoverSiteConfigurationSnapshotOptions) (WebAppsClientRecoverSiteConfigurationSnapshotResponse, error) { + var err error + const operationName = "WebAppsClient.RecoverSiteConfigurationSnapshot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.recoverSiteConfigurationSnapshotCreateRequest(ctx, resourceGroupName, name, snapshotID, options) if err != nil { return WebAppsClientRecoverSiteConfigurationSnapshotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientRecoverSiteConfigurationSnapshotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientRecoverSiteConfigurationSnapshotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientRecoverSiteConfigurationSnapshotResponse{}, err } return WebAppsClientRecoverSiteConfigurationSnapshotResponse{}, nil } @@ -21115,7 +22766,7 @@ func (client *WebAppsClient) recoverSiteConfigurationSnapshotCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -21124,7 +22775,7 @@ func (client *WebAppsClient) recoverSiteConfigurationSnapshotCreateRequest(ctx c // RecoverSiteConfigurationSnapshotSlot - Description for Reverts the configuration of an app to a previous snapshot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - snapshotID - The ID of the snapshot to read. @@ -21132,16 +22783,22 @@ func (client *WebAppsClient) recoverSiteConfigurationSnapshotCreateRequest(ctx c // - options - WebAppsClientRecoverSiteConfigurationSnapshotSlotOptions contains the optional parameters for the WebAppsClient.RecoverSiteConfigurationSnapshotSlot // method. func (client *WebAppsClient) RecoverSiteConfigurationSnapshotSlot(ctx context.Context, resourceGroupName string, name string, snapshotID string, slot string, options *WebAppsClientRecoverSiteConfigurationSnapshotSlotOptions) (WebAppsClientRecoverSiteConfigurationSnapshotSlotResponse, error) { + var err error + const operationName = "WebAppsClient.RecoverSiteConfigurationSnapshotSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.recoverSiteConfigurationSnapshotSlotCreateRequest(ctx, resourceGroupName, name, snapshotID, slot, options) if err != nil { return WebAppsClientRecoverSiteConfigurationSnapshotSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientRecoverSiteConfigurationSnapshotSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientRecoverSiteConfigurationSnapshotSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientRecoverSiteConfigurationSnapshotSlotResponse{}, err } return WebAppsClientRecoverSiteConfigurationSnapshotSlotResponse{}, nil } @@ -21174,7 +22831,7 @@ func (client *WebAppsClient) recoverSiteConfigurationSnapshotSlotCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -21184,22 +22841,28 @@ func (client *WebAppsClient) recoverSiteConfigurationSnapshotSlotCreateRequest(c // modified by calling the API with POST. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientResetProductionSlotConfigOptions contains the optional parameters for the WebAppsClient.ResetProductionSlotConfig // method. func (client *WebAppsClient) ResetProductionSlotConfig(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientResetProductionSlotConfigOptions) (WebAppsClientResetProductionSlotConfigResponse, error) { + var err error + const operationName = "WebAppsClient.ResetProductionSlotConfig" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.resetProductionSlotConfigCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientResetProductionSlotConfigResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientResetProductionSlotConfigResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientResetProductionSlotConfigResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientResetProductionSlotConfigResponse{}, err } return WebAppsClientResetProductionSlotConfigResponse{}, nil } @@ -21224,7 +22887,7 @@ func (client *WebAppsClient) resetProductionSlotConfigCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -21234,7 +22897,7 @@ func (client *WebAppsClient) resetProductionSlotConfigCreateRequest(ctx context. // modified by calling the API with POST. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API resets configuration settings for the production @@ -21242,16 +22905,22 @@ func (client *WebAppsClient) resetProductionSlotConfigCreateRequest(ctx context. // - options - WebAppsClientResetSlotConfigurationSlotOptions contains the optional parameters for the WebAppsClient.ResetSlotConfigurationSlot // method. func (client *WebAppsClient) ResetSlotConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientResetSlotConfigurationSlotOptions) (WebAppsClientResetSlotConfigurationSlotResponse, error) { + var err error + const operationName = "WebAppsClient.ResetSlotConfigurationSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.resetSlotConfigurationSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientResetSlotConfigurationSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientResetSlotConfigurationSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientResetSlotConfigurationSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientResetSlotConfigurationSlotResponse{}, err } return WebAppsClientResetSlotConfigurationSlotResponse{}, nil } @@ -21280,7 +22949,7 @@ func (client *WebAppsClient) resetSlotConfigurationSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -21289,21 +22958,27 @@ func (client *WebAppsClient) resetSlotConfigurationSlotCreateRequest(ctx context // Restart - Description for Restarts an app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientRestartOptions contains the optional parameters for the WebAppsClient.Restart method. func (client *WebAppsClient) Restart(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientRestartOptions) (WebAppsClientRestartResponse, error) { + var err error + const operationName = "WebAppsClient.Restart" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.restartCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientRestartResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientRestartResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientRestartResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientRestartResponse{}, err } return WebAppsClientRestartResponse{}, nil } @@ -21334,7 +23009,7 @@ func (client *WebAppsClient) restartCreateRequest(ctx context.Context, resourceG if options != nil && options.Synchronous != nil { reqQP.Set("synchronous", strconv.FormatBool(*options.Synchronous)) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -21343,22 +23018,28 @@ func (client *WebAppsClient) restartCreateRequest(ctx context.Context, resourceG // RestartSlot - Description for Restarts an app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will restart the production slot. // - options - WebAppsClientRestartSlotOptions contains the optional parameters for the WebAppsClient.RestartSlot method. func (client *WebAppsClient) RestartSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientRestartSlotOptions) (WebAppsClientRestartSlotResponse, error) { + var err error + const operationName = "WebAppsClient.RestartSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.restartSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientRestartSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientRestartSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientRestartSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientRestartSlotResponse{}, err } return WebAppsClientRestartSlotResponse{}, nil } @@ -21393,7 +23074,7 @@ func (client *WebAppsClient) restartSlotCreateRequest(ctx context.Context, resou if options != nil && options.Synchronous != nil { reqQP.Set("synchronous", strconv.FormatBool(*options.Synchronous)) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -21402,7 +23083,7 @@ func (client *WebAppsClient) restartSlotCreateRequest(ctx context.Context, resou // BeginRestore - Description for Restores a specific backup to another app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - backupID - ID of the backup. @@ -21414,29 +23095,40 @@ func (client *WebAppsClient) BeginRestore(ctx context.Context, resourceGroupName if err != nil { return nil, err } - return runtime.NewPoller[WebAppsClientRestoreResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientRestoreResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WebAppsClientRestoreResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientRestoreResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Restore - Description for Restores a specific backup to another app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *WebAppsClient) restore(ctx context.Context, resourceGroupName string, name string, backupID string, request RestoreRequest, options *WebAppsClientBeginRestoreOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginRestore" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.restoreCreateRequest(ctx, resourceGroupName, name, backupID, request, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // restoreCreateRequest creates the Restore request. @@ -21463,16 +23155,19 @@ func (client *WebAppsClient) restoreCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, request) + if err := runtime.MarshalAsJSON(req, request); err != nil { + return nil, err + } + return req, nil } // BeginRestoreFromBackupBlob - Description for Restores an app from a backup blob in Azure Storage. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - request - Information on restore request . @@ -21484,29 +23179,40 @@ func (client *WebAppsClient) BeginRestoreFromBackupBlob(ctx context.Context, res if err != nil { return nil, err } - return runtime.NewPoller[WebAppsClientRestoreFromBackupBlobResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientRestoreFromBackupBlobResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WebAppsClientRestoreFromBackupBlobResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientRestoreFromBackupBlobResponse]{ + Tracer: client.internal.Tracer(), + }) } } // RestoreFromBackupBlob - Description for Restores an app from a backup blob in Azure Storage. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *WebAppsClient) restoreFromBackupBlob(ctx context.Context, resourceGroupName string, name string, request RestoreRequest, options *WebAppsClientBeginRestoreFromBackupBlobOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginRestoreFromBackupBlob" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.restoreFromBackupBlobCreateRequest(ctx, resourceGroupName, name, request, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // restoreFromBackupBlobCreateRequest creates the RestoreFromBackupBlob request. @@ -21529,16 +23235,19 @@ func (client *WebAppsClient) restoreFromBackupBlobCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, request) + if err := runtime.MarshalAsJSON(req, request); err != nil { + return nil, err + } + return req, nil } // BeginRestoreFromBackupBlobSlot - Description for Restores an app from a backup blob in Azure Storage. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. @@ -21551,29 +23260,40 @@ func (client *WebAppsClient) BeginRestoreFromBackupBlobSlot(ctx context.Context, if err != nil { return nil, err } - return runtime.NewPoller[WebAppsClientRestoreFromBackupBlobSlotResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientRestoreFromBackupBlobSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WebAppsClientRestoreFromBackupBlobSlotResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientRestoreFromBackupBlobSlotResponse]{ + Tracer: client.internal.Tracer(), + }) } } // RestoreFromBackupBlobSlot - Description for Restores an app from a backup blob in Azure Storage. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *WebAppsClient) restoreFromBackupBlobSlot(ctx context.Context, resourceGroupName string, name string, slot string, request RestoreRequest, options *WebAppsClientBeginRestoreFromBackupBlobSlotOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginRestoreFromBackupBlobSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.restoreFromBackupBlobSlotCreateRequest(ctx, resourceGroupName, name, slot, request, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // restoreFromBackupBlobSlotCreateRequest creates the RestoreFromBackupBlobSlot request. @@ -21600,16 +23320,19 @@ func (client *WebAppsClient) restoreFromBackupBlobSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, request) + if err := runtime.MarshalAsJSON(req, request); err != nil { + return nil, err + } + return req, nil } // BeginRestoreFromDeletedApp - Description for Restores a deleted web app to this web app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - restoreRequest - Deleted web app restore information. @@ -21621,29 +23344,40 @@ func (client *WebAppsClient) BeginRestoreFromDeletedApp(ctx context.Context, res if err != nil { return nil, err } - return runtime.NewPoller[WebAppsClientRestoreFromDeletedAppResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientRestoreFromDeletedAppResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WebAppsClientRestoreFromDeletedAppResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientRestoreFromDeletedAppResponse]{ + Tracer: client.internal.Tracer(), + }) } } // RestoreFromDeletedApp - Description for Restores a deleted web app to this web app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *WebAppsClient) restoreFromDeletedApp(ctx context.Context, resourceGroupName string, name string, restoreRequest DeletedAppRestoreRequest, options *WebAppsClientBeginRestoreFromDeletedAppOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginRestoreFromDeletedApp" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.restoreFromDeletedAppCreateRequest(ctx, resourceGroupName, name, restoreRequest, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // restoreFromDeletedAppCreateRequest creates the RestoreFromDeletedApp request. @@ -21666,16 +23400,19 @@ func (client *WebAppsClient) restoreFromDeletedAppCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, restoreRequest) + if err := runtime.MarshalAsJSON(req, restoreRequest); err != nil { + return nil, err + } + return req, nil } // BeginRestoreFromDeletedAppSlot - Description for Restores a deleted web app to this web app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - slot - Name of web app slot. If not specified then will default to production slot. @@ -21688,29 +23425,40 @@ func (client *WebAppsClient) BeginRestoreFromDeletedAppSlot(ctx context.Context, if err != nil { return nil, err } - return runtime.NewPoller[WebAppsClientRestoreFromDeletedAppSlotResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientRestoreFromDeletedAppSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WebAppsClientRestoreFromDeletedAppSlotResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientRestoreFromDeletedAppSlotResponse]{ + Tracer: client.internal.Tracer(), + }) } } // RestoreFromDeletedAppSlot - Description for Restores a deleted web app to this web app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *WebAppsClient) restoreFromDeletedAppSlot(ctx context.Context, resourceGroupName string, name string, slot string, restoreRequest DeletedAppRestoreRequest, options *WebAppsClientBeginRestoreFromDeletedAppSlotOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginRestoreFromDeletedAppSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.restoreFromDeletedAppSlotCreateRequest(ctx, resourceGroupName, name, slot, restoreRequest, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // restoreFromDeletedAppSlotCreateRequest creates the RestoreFromDeletedAppSlot request. @@ -21737,16 +23485,19 @@ func (client *WebAppsClient) restoreFromDeletedAppSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, restoreRequest) + if err := runtime.MarshalAsJSON(req, restoreRequest); err != nil { + return nil, err + } + return req, nil } // BeginRestoreSlot - Description for Restores a specific backup to another app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - backupID - ID of the backup. @@ -21760,29 +23511,40 @@ func (client *WebAppsClient) BeginRestoreSlot(ctx context.Context, resourceGroup if err != nil { return nil, err } - return runtime.NewPoller[WebAppsClientRestoreSlotResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientRestoreSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WebAppsClientRestoreSlotResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientRestoreSlotResponse]{ + Tracer: client.internal.Tracer(), + }) } } // RestoreSlot - Description for Restores a specific backup to another app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *WebAppsClient) restoreSlot(ctx context.Context, resourceGroupName string, name string, backupID string, slot string, request RestoreRequest, options *WebAppsClientBeginRestoreSlotOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginRestoreSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.restoreSlotCreateRequest(ctx, resourceGroupName, name, backupID, slot, request, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // restoreSlotCreateRequest creates the RestoreSlot request. @@ -21813,16 +23575,19 @@ func (client *WebAppsClient) restoreSlotCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, request) + if err := runtime.MarshalAsJSON(req, request); err != nil { + return nil, err + } + return req, nil } // BeginRestoreSnapshot - Description for Restores a web app from a snapshot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - restoreRequest - Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots @@ -21835,29 +23600,40 @@ func (client *WebAppsClient) BeginRestoreSnapshot(ctx context.Context, resourceG if err != nil { return nil, err } - return runtime.NewPoller[WebAppsClientRestoreSnapshotResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientRestoreSnapshotResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WebAppsClientRestoreSnapshotResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientRestoreSnapshotResponse]{ + Tracer: client.internal.Tracer(), + }) } } // RestoreSnapshot - Description for Restores a web app from a snapshot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *WebAppsClient) restoreSnapshot(ctx context.Context, resourceGroupName string, name string, restoreRequest SnapshotRestoreRequest, options *WebAppsClientBeginRestoreSnapshotOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginRestoreSnapshot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.restoreSnapshotCreateRequest(ctx, resourceGroupName, name, restoreRequest, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // restoreSnapshotCreateRequest creates the RestoreSnapshot request. @@ -21880,16 +23656,19 @@ func (client *WebAppsClient) restoreSnapshotCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, restoreRequest) + if err := runtime.MarshalAsJSON(req, restoreRequest); err != nil { + return nil, err + } + return req, nil } // BeginRestoreSnapshotSlot - Description for Restores a web app from a snapshot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - slot - Name of web app slot. If not specified then will default to production slot. @@ -21903,29 +23682,40 @@ func (client *WebAppsClient) BeginRestoreSnapshotSlot(ctx context.Context, resou if err != nil { return nil, err } - return runtime.NewPoller[WebAppsClientRestoreSnapshotSlotResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientRestoreSnapshotSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WebAppsClientRestoreSnapshotSlotResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientRestoreSnapshotSlotResponse]{ + Tracer: client.internal.Tracer(), + }) } } // RestoreSnapshotSlot - Description for Restores a web app from a snapshot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *WebAppsClient) restoreSnapshotSlot(ctx context.Context, resourceGroupName string, name string, slot string, restoreRequest SnapshotRestoreRequest, options *WebAppsClientBeginRestoreSnapshotSlotOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginRestoreSnapshotSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.restoreSnapshotSlotCreateRequest(ctx, resourceGroupName, name, slot, restoreRequest, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // restoreSnapshotSlotCreateRequest creates the RestoreSnapshotSlot request. @@ -21952,32 +23742,41 @@ func (client *WebAppsClient) restoreSnapshotSlotCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, restoreRequest) + if err := runtime.MarshalAsJSON(req, restoreRequest); err != nil { + return nil, err + } + return req, nil } // RunTriggeredWebJob - Description for Run a triggered web job for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - webJobName - Name of Web Job. // - options - WebAppsClientRunTriggeredWebJobOptions contains the optional parameters for the WebAppsClient.RunTriggeredWebJob // method. func (client *WebAppsClient) RunTriggeredWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientRunTriggeredWebJobOptions) (WebAppsClientRunTriggeredWebJobResponse, error) { + var err error + const operationName = "WebAppsClient.RunTriggeredWebJob" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.runTriggeredWebJobCreateRequest(ctx, resourceGroupName, name, webJobName, options) if err != nil { return WebAppsClientRunTriggeredWebJobResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientRunTriggeredWebJobResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientRunTriggeredWebJobResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientRunTriggeredWebJobResponse{}, err } return WebAppsClientRunTriggeredWebJobResponse{}, nil } @@ -22006,7 +23805,7 @@ func (client *WebAppsClient) runTriggeredWebJobCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -22015,7 +23814,7 @@ func (client *WebAppsClient) runTriggeredWebJobCreateRequest(ctx context.Context // RunTriggeredWebJobSlot - Description for Run a triggered web job for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - webJobName - Name of Web Job. @@ -22023,16 +23822,22 @@ func (client *WebAppsClient) runTriggeredWebJobCreateRequest(ctx context.Context // - options - WebAppsClientRunTriggeredWebJobSlotOptions contains the optional parameters for the WebAppsClient.RunTriggeredWebJobSlot // method. func (client *WebAppsClient) RunTriggeredWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientRunTriggeredWebJobSlotOptions) (WebAppsClientRunTriggeredWebJobSlotResponse, error) { + var err error + const operationName = "WebAppsClient.RunTriggeredWebJobSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.runTriggeredWebJobSlotCreateRequest(ctx, resourceGroupName, name, webJobName, slot, options) if err != nil { return WebAppsClientRunTriggeredWebJobSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientRunTriggeredWebJobSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientRunTriggeredWebJobSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientRunTriggeredWebJobSlotResponse{}, err } return WebAppsClientRunTriggeredWebJobSlotResponse{}, nil } @@ -22065,7 +23870,7 @@ func (client *WebAppsClient) runTriggeredWebJobSlotCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -22074,21 +23879,27 @@ func (client *WebAppsClient) runTriggeredWebJobSlotCreateRequest(ctx context.Con // Start - Description for Starts an app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientStartOptions contains the optional parameters for the WebAppsClient.Start method. func (client *WebAppsClient) Start(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientStartOptions) (WebAppsClientStartResponse, error) { + var err error + const operationName = "WebAppsClient.Start" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.startCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientStartResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientStartResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientStartResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientStartResponse{}, err } return WebAppsClientStartResponse{}, nil } @@ -22113,7 +23924,7 @@ func (client *WebAppsClient) startCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -22122,23 +23933,29 @@ func (client *WebAppsClient) startCreateRequest(ctx context.Context, resourceGro // StartContinuousWebJob - Description for Start a continuous web job for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - webJobName - Name of Web Job. // - options - WebAppsClientStartContinuousWebJobOptions contains the optional parameters for the WebAppsClient.StartContinuousWebJob // method. func (client *WebAppsClient) StartContinuousWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientStartContinuousWebJobOptions) (WebAppsClientStartContinuousWebJobResponse, error) { + var err error + const operationName = "WebAppsClient.StartContinuousWebJob" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.startContinuousWebJobCreateRequest(ctx, resourceGroupName, name, webJobName, options) if err != nil { return WebAppsClientStartContinuousWebJobResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientStartContinuousWebJobResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientStartContinuousWebJobResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientStartContinuousWebJobResponse{}, err } return WebAppsClientStartContinuousWebJobResponse{}, nil } @@ -22167,7 +23984,7 @@ func (client *WebAppsClient) startContinuousWebJobCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -22176,7 +23993,7 @@ func (client *WebAppsClient) startContinuousWebJobCreateRequest(ctx context.Cont // StartContinuousWebJobSlot - Description for Start a continuous web job for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - webJobName - Name of Web Job. @@ -22184,16 +24001,22 @@ func (client *WebAppsClient) startContinuousWebJobCreateRequest(ctx context.Cont // - options - WebAppsClientStartContinuousWebJobSlotOptions contains the optional parameters for the WebAppsClient.StartContinuousWebJobSlot // method. func (client *WebAppsClient) StartContinuousWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientStartContinuousWebJobSlotOptions) (WebAppsClientStartContinuousWebJobSlotResponse, error) { + var err error + const operationName = "WebAppsClient.StartContinuousWebJobSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.startContinuousWebJobSlotCreateRequest(ctx, resourceGroupName, name, webJobName, slot, options) if err != nil { return WebAppsClientStartContinuousWebJobSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientStartContinuousWebJobSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientStartContinuousWebJobSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientStartContinuousWebJobSlotResponse{}, err } return WebAppsClientStartContinuousWebJobSlotResponse{}, nil } @@ -22226,7 +24049,7 @@ func (client *WebAppsClient) startContinuousWebJobSlotCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -22235,7 +24058,7 @@ func (client *WebAppsClient) startContinuousWebJobSlotCreateRequest(ctx context. // BeginStartNetworkTrace - Description for Start capturing network packets for the site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - The name of the web app. // - options - WebAppsClientBeginStartNetworkTraceOptions contains the optional parameters for the WebAppsClient.BeginStartNetworkTrace @@ -22246,29 +24069,40 @@ func (client *WebAppsClient) BeginStartNetworkTrace(ctx context.Context, resourc if err != nil { return nil, err } - return runtime.NewPoller[WebAppsClientStartNetworkTraceResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientStartNetworkTraceResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WebAppsClientStartNetworkTraceResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientStartNetworkTraceResponse]{ + Tracer: client.internal.Tracer(), + }) } } // StartNetworkTrace - Description for Start capturing network packets for the site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *WebAppsClient) startNetworkTrace(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientBeginStartNetworkTraceOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginStartNetworkTrace" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.startNetworkTraceCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // startNetworkTraceCreateRequest creates the StartNetworkTrace request. @@ -22300,7 +24134,7 @@ func (client *WebAppsClient) startNetworkTraceCreateRequest(ctx context.Context, if options != nil && options.SasURL != nil { reqQP.Set("sasUrl", *options.SasURL) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -22309,7 +24143,7 @@ func (client *WebAppsClient) startNetworkTraceCreateRequest(ctx context.Context, // BeginStartNetworkTraceSlot - Description for Start capturing network packets for the site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - The name of the web app. // - slot - The name of the slot for this web app. @@ -22321,29 +24155,40 @@ func (client *WebAppsClient) BeginStartNetworkTraceSlot(ctx context.Context, res if err != nil { return nil, err } - return runtime.NewPoller[WebAppsClientStartNetworkTraceSlotResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientStartNetworkTraceSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WebAppsClientStartNetworkTraceSlotResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientStartNetworkTraceSlotResponse]{ + Tracer: client.internal.Tracer(), + }) } } // StartNetworkTraceSlot - Description for Start capturing network packets for the site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *WebAppsClient) startNetworkTraceSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientBeginStartNetworkTraceSlotOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginStartNetworkTraceSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.startNetworkTraceSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // startNetworkTraceSlotCreateRequest creates the StartNetworkTraceSlot request. @@ -22379,7 +24224,7 @@ func (client *WebAppsClient) startNetworkTraceSlotCreateRequest(ctx context.Cont if options != nil && options.SasURL != nil { reqQP.Set("sasUrl", *options.SasURL) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -22388,22 +24233,28 @@ func (client *WebAppsClient) startNetworkTraceSlotCreateRequest(ctx context.Cont // StartSlot - Description for Starts an app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will start the production slot. // - options - WebAppsClientStartSlotOptions contains the optional parameters for the WebAppsClient.StartSlot method. func (client *WebAppsClient) StartSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientStartSlotOptions) (WebAppsClientStartSlotResponse, error) { + var err error + const operationName = "WebAppsClient.StartSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.startSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientStartSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientStartSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientStartSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientStartSlotResponse{}, err } return WebAppsClientStartSlotResponse{}, nil } @@ -22432,7 +24283,7 @@ func (client *WebAppsClient) startSlotCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -22441,24 +24292,31 @@ func (client *WebAppsClient) startSlotCreateRequest(ctx context.Context, resourc // StartWebSiteNetworkTrace - Description for Start capturing network packets for the site (To be deprecated). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - The name of the web app. // - options - WebAppsClientStartWebSiteNetworkTraceOptions contains the optional parameters for the WebAppsClient.StartWebSiteNetworkTrace // method. func (client *WebAppsClient) StartWebSiteNetworkTrace(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientStartWebSiteNetworkTraceOptions) (WebAppsClientStartWebSiteNetworkTraceResponse, error) { + var err error + const operationName = "WebAppsClient.StartWebSiteNetworkTrace" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.startWebSiteNetworkTraceCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientStartWebSiteNetworkTraceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientStartWebSiteNetworkTraceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientStartWebSiteNetworkTraceResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientStartWebSiteNetworkTraceResponse{}, err } - return client.startWebSiteNetworkTraceHandleResponse(resp) + resp, err := client.startWebSiteNetworkTraceHandleResponse(httpResp) + return resp, err } // startWebSiteNetworkTraceCreateRequest creates the StartWebSiteNetworkTrace request. @@ -22490,7 +24348,7 @@ func (client *WebAppsClient) startWebSiteNetworkTraceCreateRequest(ctx context.C if options != nil && options.SasURL != nil { reqQP.Set("sasUrl", *options.SasURL) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -22508,7 +24366,7 @@ func (client *WebAppsClient) startWebSiteNetworkTraceHandleResponse(resp *http.R // BeginStartWebSiteNetworkTraceOperation - Description for Start capturing network packets for the site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - The name of the web app. // - options - WebAppsClientBeginStartWebSiteNetworkTraceOperationOptions contains the optional parameters for the WebAppsClient.BeginStartWebSiteNetworkTraceOperation @@ -22519,29 +24377,40 @@ func (client *WebAppsClient) BeginStartWebSiteNetworkTraceOperation(ctx context. if err != nil { return nil, err } - return runtime.NewPoller[WebAppsClientStartWebSiteNetworkTraceOperationResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientStartWebSiteNetworkTraceOperationResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WebAppsClientStartWebSiteNetworkTraceOperationResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientStartWebSiteNetworkTraceOperationResponse]{ + Tracer: client.internal.Tracer(), + }) } } // StartWebSiteNetworkTraceOperation - Description for Start capturing network packets for the site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *WebAppsClient) startWebSiteNetworkTraceOperation(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientBeginStartWebSiteNetworkTraceOperationOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginStartWebSiteNetworkTraceOperation" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.startWebSiteNetworkTraceOperationCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // startWebSiteNetworkTraceOperationCreateRequest creates the StartWebSiteNetworkTraceOperation request. @@ -22573,7 +24442,7 @@ func (client *WebAppsClient) startWebSiteNetworkTraceOperationCreateRequest(ctx if options != nil && options.SasURL != nil { reqQP.Set("sasUrl", *options.SasURL) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -22582,7 +24451,7 @@ func (client *WebAppsClient) startWebSiteNetworkTraceOperationCreateRequest(ctx // BeginStartWebSiteNetworkTraceOperationSlot - Description for Start capturing network packets for the site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - The name of the web app. // - slot - The name of the slot for this web app. @@ -22594,29 +24463,40 @@ func (client *WebAppsClient) BeginStartWebSiteNetworkTraceOperationSlot(ctx cont if err != nil { return nil, err } - return runtime.NewPoller[WebAppsClientStartWebSiteNetworkTraceOperationSlotResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientStartWebSiteNetworkTraceOperationSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WebAppsClientStartWebSiteNetworkTraceOperationSlotResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientStartWebSiteNetworkTraceOperationSlotResponse]{ + Tracer: client.internal.Tracer(), + }) } } // StartWebSiteNetworkTraceOperationSlot - Description for Start capturing network packets for the site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *WebAppsClient) startWebSiteNetworkTraceOperationSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientBeginStartWebSiteNetworkTraceOperationSlotOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginStartWebSiteNetworkTraceOperationSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.startWebSiteNetworkTraceOperationSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // startWebSiteNetworkTraceOperationSlotCreateRequest creates the StartWebSiteNetworkTraceOperationSlot request. @@ -22652,7 +24532,7 @@ func (client *WebAppsClient) startWebSiteNetworkTraceOperationSlotCreateRequest( if options != nil && options.SasURL != nil { reqQP.Set("sasUrl", *options.SasURL) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -22661,25 +24541,32 @@ func (client *WebAppsClient) startWebSiteNetworkTraceOperationSlotCreateRequest( // StartWebSiteNetworkTraceSlot - Description for Start capturing network packets for the site (To be deprecated). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - The name of the web app. // - slot - The name of the slot for this web app. // - options - WebAppsClientStartWebSiteNetworkTraceSlotOptions contains the optional parameters for the WebAppsClient.StartWebSiteNetworkTraceSlot // method. func (client *WebAppsClient) StartWebSiteNetworkTraceSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientStartWebSiteNetworkTraceSlotOptions) (WebAppsClientStartWebSiteNetworkTraceSlotResponse, error) { + var err error + const operationName = "WebAppsClient.StartWebSiteNetworkTraceSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.startWebSiteNetworkTraceSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientStartWebSiteNetworkTraceSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientStartWebSiteNetworkTraceSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientStartWebSiteNetworkTraceSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientStartWebSiteNetworkTraceSlotResponse{}, err } - return client.startWebSiteNetworkTraceSlotHandleResponse(resp) + resp, err := client.startWebSiteNetworkTraceSlotHandleResponse(httpResp) + return resp, err } // startWebSiteNetworkTraceSlotCreateRequest creates the StartWebSiteNetworkTraceSlot request. @@ -22715,7 +24602,7 @@ func (client *WebAppsClient) startWebSiteNetworkTraceSlotCreateRequest(ctx conte if options != nil && options.SasURL != nil { reqQP.Set("sasUrl", *options.SasURL) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -22733,21 +24620,27 @@ func (client *WebAppsClient) startWebSiteNetworkTraceSlotHandleResponse(resp *ht // Stop - Description for Stops an app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientStopOptions contains the optional parameters for the WebAppsClient.Stop method. func (client *WebAppsClient) Stop(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientStopOptions) (WebAppsClientStopResponse, error) { + var err error + const operationName = "WebAppsClient.Stop" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.stopCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientStopResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientStopResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientStopResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientStopResponse{}, err } return WebAppsClientStopResponse{}, nil } @@ -22772,7 +24665,7 @@ func (client *WebAppsClient) stopCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -22781,23 +24674,29 @@ func (client *WebAppsClient) stopCreateRequest(ctx context.Context, resourceGrou // StopContinuousWebJob - Description for Stop a continuous web job for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - webJobName - Name of Web Job. // - options - WebAppsClientStopContinuousWebJobOptions contains the optional parameters for the WebAppsClient.StopContinuousWebJob // method. func (client *WebAppsClient) StopContinuousWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string, options *WebAppsClientStopContinuousWebJobOptions) (WebAppsClientStopContinuousWebJobResponse, error) { + var err error + const operationName = "WebAppsClient.StopContinuousWebJob" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.stopContinuousWebJobCreateRequest(ctx, resourceGroupName, name, webJobName, options) if err != nil { return WebAppsClientStopContinuousWebJobResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientStopContinuousWebJobResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientStopContinuousWebJobResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientStopContinuousWebJobResponse{}, err } return WebAppsClientStopContinuousWebJobResponse{}, nil } @@ -22826,7 +24725,7 @@ func (client *WebAppsClient) stopContinuousWebJobCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -22835,7 +24734,7 @@ func (client *WebAppsClient) stopContinuousWebJobCreateRequest(ctx context.Conte // StopContinuousWebJobSlot - Description for Stop a continuous web job for an app, or a deployment slot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - webJobName - Name of Web Job. @@ -22843,16 +24742,22 @@ func (client *WebAppsClient) stopContinuousWebJobCreateRequest(ctx context.Conte // - options - WebAppsClientStopContinuousWebJobSlotOptions contains the optional parameters for the WebAppsClient.StopContinuousWebJobSlot // method. func (client *WebAppsClient) StopContinuousWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string, options *WebAppsClientStopContinuousWebJobSlotOptions) (WebAppsClientStopContinuousWebJobSlotResponse, error) { + var err error + const operationName = "WebAppsClient.StopContinuousWebJobSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.stopContinuousWebJobSlotCreateRequest(ctx, resourceGroupName, name, webJobName, slot, options) if err != nil { return WebAppsClientStopContinuousWebJobSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientStopContinuousWebJobSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientStopContinuousWebJobSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientStopContinuousWebJobSlotResponse{}, err } return WebAppsClientStopContinuousWebJobSlotResponse{}, nil } @@ -22885,7 +24790,7 @@ func (client *WebAppsClient) stopContinuousWebJobSlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -22894,22 +24799,28 @@ func (client *WebAppsClient) stopContinuousWebJobSlotCreateRequest(ctx context.C // StopNetworkTrace - Description for Stop ongoing capturing network packets for the site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - The name of the web app. // - options - WebAppsClientStopNetworkTraceOptions contains the optional parameters for the WebAppsClient.StopNetworkTrace // method. func (client *WebAppsClient) StopNetworkTrace(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientStopNetworkTraceOptions) (WebAppsClientStopNetworkTraceResponse, error) { + var err error + const operationName = "WebAppsClient.StopNetworkTrace" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.stopNetworkTraceCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientStopNetworkTraceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientStopNetworkTraceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientStopNetworkTraceResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientStopNetworkTraceResponse{}, err } return WebAppsClientStopNetworkTraceResponse{}, nil } @@ -22934,7 +24845,7 @@ func (client *WebAppsClient) stopNetworkTraceCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -22943,23 +24854,29 @@ func (client *WebAppsClient) stopNetworkTraceCreateRequest(ctx context.Context, // StopNetworkTraceSlot - Description for Stop ongoing capturing network packets for the site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - The name of the web app. // - slot - The name of the slot for this web app. // - options - WebAppsClientStopNetworkTraceSlotOptions contains the optional parameters for the WebAppsClient.StopNetworkTraceSlot // method. func (client *WebAppsClient) StopNetworkTraceSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientStopNetworkTraceSlotOptions) (WebAppsClientStopNetworkTraceSlotResponse, error) { + var err error + const operationName = "WebAppsClient.StopNetworkTraceSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.stopNetworkTraceSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientStopNetworkTraceSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientStopNetworkTraceSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientStopNetworkTraceSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientStopNetworkTraceSlotResponse{}, err } return WebAppsClientStopNetworkTraceSlotResponse{}, nil } @@ -22988,7 +24905,7 @@ func (client *WebAppsClient) stopNetworkTraceSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -22997,22 +24914,28 @@ func (client *WebAppsClient) stopNetworkTraceSlotCreateRequest(ctx context.Conte // StopSlot - Description for Stops an app (or deployment slot, if specified). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will stop the production slot. // - options - WebAppsClientStopSlotOptions contains the optional parameters for the WebAppsClient.StopSlot method. func (client *WebAppsClient) StopSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientStopSlotOptions) (WebAppsClientStopSlotResponse, error) { + var err error + const operationName = "WebAppsClient.StopSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.stopSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientStopSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientStopSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientStopSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientStopSlotResponse{}, err } return WebAppsClientStopSlotResponse{}, nil } @@ -23041,7 +24964,7 @@ func (client *WebAppsClient) stopSlotCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -23050,22 +24973,28 @@ func (client *WebAppsClient) stopSlotCreateRequest(ctx context.Context, resource // StopWebSiteNetworkTrace - Description for Stop ongoing capturing network packets for the site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - The name of the web app. // - options - WebAppsClientStopWebSiteNetworkTraceOptions contains the optional parameters for the WebAppsClient.StopWebSiteNetworkTrace // method. func (client *WebAppsClient) StopWebSiteNetworkTrace(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientStopWebSiteNetworkTraceOptions) (WebAppsClientStopWebSiteNetworkTraceResponse, error) { + var err error + const operationName = "WebAppsClient.StopWebSiteNetworkTrace" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.stopWebSiteNetworkTraceCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientStopWebSiteNetworkTraceResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientStopWebSiteNetworkTraceResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientStopWebSiteNetworkTraceResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientStopWebSiteNetworkTraceResponse{}, err } return WebAppsClientStopWebSiteNetworkTraceResponse{}, nil } @@ -23090,7 +25019,7 @@ func (client *WebAppsClient) stopWebSiteNetworkTraceCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -23099,23 +25028,29 @@ func (client *WebAppsClient) stopWebSiteNetworkTraceCreateRequest(ctx context.Co // StopWebSiteNetworkTraceSlot - Description for Stop ongoing capturing network packets for the site. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - The name of the web app. // - slot - The name of the slot for this web app. // - options - WebAppsClientStopWebSiteNetworkTraceSlotOptions contains the optional parameters for the WebAppsClient.StopWebSiteNetworkTraceSlot // method. func (client *WebAppsClient) StopWebSiteNetworkTraceSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientStopWebSiteNetworkTraceSlotOptions) (WebAppsClientStopWebSiteNetworkTraceSlotResponse, error) { + var err error + const operationName = "WebAppsClient.StopWebSiteNetworkTraceSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.stopWebSiteNetworkTraceSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientStopWebSiteNetworkTraceSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientStopWebSiteNetworkTraceSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return WebAppsClientStopWebSiteNetworkTraceSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientStopWebSiteNetworkTraceSlotResponse{}, err } return WebAppsClientStopWebSiteNetworkTraceSlotResponse{}, nil } @@ -23144,7 +25079,7 @@ func (client *WebAppsClient) stopWebSiteNetworkTraceSlotCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -23153,7 +25088,7 @@ func (client *WebAppsClient) stopWebSiteNetworkTraceSlotCreateRequest(ctx contex // BeginSwapSlot - Description for Swaps two deployment slots of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the source slot. If a slot is not specified, the production slot is used as the source slot. @@ -23165,29 +25100,40 @@ func (client *WebAppsClient) BeginSwapSlot(ctx context.Context, resourceGroupNam if err != nil { return nil, err } - return runtime.NewPoller[WebAppsClientSwapSlotResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientSwapSlotResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WebAppsClientSwapSlotResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientSwapSlotResponse]{ + Tracer: client.internal.Tracer(), + }) } } // SwapSlot - Description for Swaps two deployment slots of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *WebAppsClient) swapSlot(ctx context.Context, resourceGroupName string, name string, slot string, slotSwapEntity CsmSlotEntity, options *WebAppsClientBeginSwapSlotOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginSwapSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.swapSlotCreateRequest(ctx, resourceGroupName, name, slot, slotSwapEntity, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // swapSlotCreateRequest creates the SwapSlot request. @@ -23214,16 +25160,19 @@ func (client *WebAppsClient) swapSlotCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, slotSwapEntity) + if err := runtime.MarshalAsJSON(req, slotSwapEntity); err != nil { + return nil, err + } + return req, nil } // BeginSwapSlotWithProduction - Description for Swaps two deployment slots of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slotSwapEntity - JSON object that contains the target slot name. See example. @@ -23235,29 +25184,40 @@ func (client *WebAppsClient) BeginSwapSlotWithProduction(ctx context.Context, re if err != nil { return nil, err } - return runtime.NewPoller[WebAppsClientSwapSlotWithProductionResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WebAppsClientSwapSlotWithProductionResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WebAppsClientSwapSlotWithProductionResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WebAppsClientSwapSlotWithProductionResponse]{ + Tracer: client.internal.Tracer(), + }) } } // SwapSlotWithProduction - Description for Swaps two deployment slots of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *WebAppsClient) swapSlotWithProduction(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, options *WebAppsClientBeginSwapSlotWithProductionOptions) (*http.Response, error) { + var err error + const operationName = "WebAppsClient.BeginSwapSlotWithProduction" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.swapSlotWithProductionCreateRequest(ctx, resourceGroupName, name, slotSwapEntity, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // swapSlotWithProductionCreateRequest creates the SwapSlotWithProduction request. @@ -23280,31 +25240,40 @@ func (client *WebAppsClient) swapSlotWithProductionCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, slotSwapEntity) + if err := runtime.MarshalAsJSON(req, slotSwapEntity); err != nil { + return nil, err + } + return req, nil } // SyncFunctionTriggers - Description for Syncs function trigger metadata to the management database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientSyncFunctionTriggersOptions contains the optional parameters for the WebAppsClient.SyncFunctionTriggers // method. func (client *WebAppsClient) SyncFunctionTriggers(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientSyncFunctionTriggersOptions) (WebAppsClientSyncFunctionTriggersResponse, error) { + var err error + const operationName = "WebAppsClient.SyncFunctionTriggers" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.syncFunctionTriggersCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientSyncFunctionTriggersResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientSyncFunctionTriggersResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientSyncFunctionTriggersResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientSyncFunctionTriggersResponse{}, err } return WebAppsClientSyncFunctionTriggersResponse{}, nil } @@ -23329,7 +25298,7 @@ func (client *WebAppsClient) syncFunctionTriggersCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -23338,23 +25307,29 @@ func (client *WebAppsClient) syncFunctionTriggersCreateRequest(ctx context.Conte // SyncFunctionTriggersSlot - Description for Syncs function trigger metadata to the management database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. // - options - WebAppsClientSyncFunctionTriggersSlotOptions contains the optional parameters for the WebAppsClient.SyncFunctionTriggersSlot // method. func (client *WebAppsClient) SyncFunctionTriggersSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientSyncFunctionTriggersSlotOptions) (WebAppsClientSyncFunctionTriggersSlotResponse, error) { + var err error + const operationName = "WebAppsClient.SyncFunctionTriggersSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.syncFunctionTriggersSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientSyncFunctionTriggersSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientSyncFunctionTriggersSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientSyncFunctionTriggersSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientSyncFunctionTriggersSlotResponse{}, err } return WebAppsClientSyncFunctionTriggersSlotResponse{}, nil } @@ -23383,7 +25358,7 @@ func (client *WebAppsClient) syncFunctionTriggersSlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -23392,21 +25367,27 @@ func (client *WebAppsClient) syncFunctionTriggersSlotCreateRequest(ctx context.C // SyncFunctions - Description for Syncs function trigger metadata to the management database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientSyncFunctionsOptions contains the optional parameters for the WebAppsClient.SyncFunctions method. func (client *WebAppsClient) SyncFunctions(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientSyncFunctionsOptions) (WebAppsClientSyncFunctionsResponse, error) { + var err error + const operationName = "WebAppsClient.SyncFunctions" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.syncFunctionsCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientSyncFunctionsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientSyncFunctionsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientSyncFunctionsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientSyncFunctionsResponse{}, err } return WebAppsClientSyncFunctionsResponse{}, nil } @@ -23431,7 +25412,7 @@ func (client *WebAppsClient) syncFunctionsCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -23440,23 +25421,29 @@ func (client *WebAppsClient) syncFunctionsCreateRequest(ctx context.Context, res // SyncFunctionsSlot - Description for Syncs function trigger metadata to the management database // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. // - options - WebAppsClientSyncFunctionsSlotOptions contains the optional parameters for the WebAppsClient.SyncFunctionsSlot // method. func (client *WebAppsClient) SyncFunctionsSlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientSyncFunctionsSlotOptions) (WebAppsClientSyncFunctionsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.SyncFunctionsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.syncFunctionsSlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientSyncFunctionsSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientSyncFunctionsSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebAppsClientSyncFunctionsSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientSyncFunctionsSlotResponse{}, err } return WebAppsClientSyncFunctionsSlotResponse{}, nil } @@ -23485,7 +25472,7 @@ func (client *WebAppsClient) syncFunctionsSlotCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -23494,21 +25481,27 @@ func (client *WebAppsClient) syncFunctionsSlotCreateRequest(ctx context.Context, // SyncRepository - Description for Sync web app repository. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - options - WebAppsClientSyncRepositoryOptions contains the optional parameters for the WebAppsClient.SyncRepository method. func (client *WebAppsClient) SyncRepository(ctx context.Context, resourceGroupName string, name string, options *WebAppsClientSyncRepositoryOptions) (WebAppsClientSyncRepositoryResponse, error) { + var err error + const operationName = "WebAppsClient.SyncRepository" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.syncRepositoryCreateRequest(ctx, resourceGroupName, name, options) if err != nil { return WebAppsClientSyncRepositoryResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientSyncRepositoryResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientSyncRepositoryResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientSyncRepositoryResponse{}, err } return WebAppsClientSyncRepositoryResponse{}, nil } @@ -23533,7 +25526,7 @@ func (client *WebAppsClient) syncRepositoryCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -23542,23 +25535,29 @@ func (client *WebAppsClient) syncRepositoryCreateRequest(ctx context.Context, re // SyncRepositorySlot - Description for Sync web app repository. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - slot - Name of web app slot. If not specified then will default to production slot. // - options - WebAppsClientSyncRepositorySlotOptions contains the optional parameters for the WebAppsClient.SyncRepositorySlot // method. func (client *WebAppsClient) SyncRepositorySlot(ctx context.Context, resourceGroupName string, name string, slot string, options *WebAppsClientSyncRepositorySlotOptions) (WebAppsClientSyncRepositorySlotResponse, error) { + var err error + const operationName = "WebAppsClient.SyncRepositorySlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.syncRepositorySlotCreateRequest(ctx, resourceGroupName, name, slot, options) if err != nil { return WebAppsClientSyncRepositorySlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientSyncRepositorySlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientSyncRepositorySlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientSyncRepositorySlotResponse{}, err } return WebAppsClientSyncRepositorySlotResponse{}, nil } @@ -23587,7 +25586,7 @@ func (client *WebAppsClient) syncRepositorySlotCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -23596,24 +25595,31 @@ func (client *WebAppsClient) syncRepositorySlotCreateRequest(ctx context.Context // Update - Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. // - siteEnvelope - A JSON representation of the app properties. See example. // - options - WebAppsClientUpdateOptions contains the optional parameters for the WebAppsClient.Update method. func (client *WebAppsClient) Update(ctx context.Context, resourceGroupName string, name string, siteEnvelope SitePatchResource, options *WebAppsClientUpdateOptions) (WebAppsClientUpdateResponse, error) { + var err error + const operationName = "WebAppsClient.Update" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateCreateRequest(ctx, resourceGroupName, name, siteEnvelope, options) if err != nil { return WebAppsClientUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return WebAppsClientUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateResponse{}, err } - return client.updateHandleResponse(resp) + resp, err := client.updateHandleResponse(httpResp) + return resp, err } // updateCreateRequest creates the Update request. @@ -23636,10 +25642,13 @@ func (client *WebAppsClient) updateCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, siteEnvelope) + if err := runtime.MarshalAsJSON(req, siteEnvelope); err != nil { + return nil, err + } + return req, nil } // updateHandleResponse handles the Update response. @@ -23654,25 +25663,32 @@ func (client *WebAppsClient) updateHandleResponse(resp *http.Response) (WebAppsC // UpdateApplicationSettings - Description for Replaces the application settings of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - appSettings - Application settings of the app. // - options - WebAppsClientUpdateApplicationSettingsOptions contains the optional parameters for the WebAppsClient.UpdateApplicationSettings // method. func (client *WebAppsClient) UpdateApplicationSettings(ctx context.Context, resourceGroupName string, name string, appSettings StringDictionary, options *WebAppsClientUpdateApplicationSettingsOptions) (WebAppsClientUpdateApplicationSettingsResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateApplicationSettings" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateApplicationSettingsCreateRequest(ctx, resourceGroupName, name, appSettings, options) if err != nil { return WebAppsClientUpdateApplicationSettingsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateApplicationSettingsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateApplicationSettingsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateApplicationSettingsResponse{}, err } - return client.updateApplicationSettingsHandleResponse(resp) + resp, err := client.updateApplicationSettingsHandleResponse(httpResp) + return resp, err } // updateApplicationSettingsCreateRequest creates the UpdateApplicationSettings request. @@ -23695,10 +25711,13 @@ func (client *WebAppsClient) updateApplicationSettingsCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, appSettings) + if err := runtime.MarshalAsJSON(req, appSettings); err != nil { + return nil, err + } + return req, nil } // updateApplicationSettingsHandleResponse handles the UpdateApplicationSettings response. @@ -23713,7 +25732,7 @@ func (client *WebAppsClient) updateApplicationSettingsHandleResponse(resp *http. // UpdateApplicationSettingsSlot - Description for Replaces the application settings of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will update the application settings for the production @@ -23722,18 +25741,25 @@ func (client *WebAppsClient) updateApplicationSettingsHandleResponse(resp *http. // - options - WebAppsClientUpdateApplicationSettingsSlotOptions contains the optional parameters for the WebAppsClient.UpdateApplicationSettingsSlot // method. func (client *WebAppsClient) UpdateApplicationSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string, appSettings StringDictionary, options *WebAppsClientUpdateApplicationSettingsSlotOptions) (WebAppsClientUpdateApplicationSettingsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateApplicationSettingsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateApplicationSettingsSlotCreateRequest(ctx, resourceGroupName, name, slot, appSettings, options) if err != nil { return WebAppsClientUpdateApplicationSettingsSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateApplicationSettingsSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateApplicationSettingsSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateApplicationSettingsSlotResponse{}, err } - return client.updateApplicationSettingsSlotHandleResponse(resp) + resp, err := client.updateApplicationSettingsSlotHandleResponse(httpResp) + return resp, err } // updateApplicationSettingsSlotCreateRequest creates the UpdateApplicationSettingsSlot request. @@ -23760,10 +25786,13 @@ func (client *WebAppsClient) updateApplicationSettingsSlotCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, appSettings) + if err := runtime.MarshalAsJSON(req, appSettings); err != nil { + return nil, err + } + return req, nil } // updateApplicationSettingsSlotHandleResponse handles the UpdateApplicationSettingsSlot response. @@ -23778,25 +25807,32 @@ func (client *WebAppsClient) updateApplicationSettingsSlotHandleResponse(resp *h // UpdateAuthSettings - Description for Updates the Authentication / Authorization settings associated with web app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - siteAuthSettings - Auth settings associated with web app. // - options - WebAppsClientUpdateAuthSettingsOptions contains the optional parameters for the WebAppsClient.UpdateAuthSettings // method. func (client *WebAppsClient) UpdateAuthSettings(ctx context.Context, resourceGroupName string, name string, siteAuthSettings SiteAuthSettings, options *WebAppsClientUpdateAuthSettingsOptions) (WebAppsClientUpdateAuthSettingsResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateAuthSettings" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateAuthSettingsCreateRequest(ctx, resourceGroupName, name, siteAuthSettings, options) if err != nil { return WebAppsClientUpdateAuthSettingsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateAuthSettingsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateAuthSettingsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateAuthSettingsResponse{}, err } - return client.updateAuthSettingsHandleResponse(resp) + resp, err := client.updateAuthSettingsHandleResponse(httpResp) + return resp, err } // updateAuthSettingsCreateRequest creates the UpdateAuthSettings request. @@ -23819,10 +25855,13 @@ func (client *WebAppsClient) updateAuthSettingsCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, siteAuthSettings) + if err := runtime.MarshalAsJSON(req, siteAuthSettings); err != nil { + return nil, err + } + return req, nil } // updateAuthSettingsHandleResponse handles the UpdateAuthSettings response. @@ -23837,7 +25876,7 @@ func (client *WebAppsClient) updateAuthSettingsHandleResponse(resp *http.Respons // UpdateAuthSettingsSlot - Description for Updates the Authentication / Authorization settings associated with web app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - slot - Name of web app slot. If not specified then will default to production slot. @@ -23845,18 +25884,25 @@ func (client *WebAppsClient) updateAuthSettingsHandleResponse(resp *http.Respons // - options - WebAppsClientUpdateAuthSettingsSlotOptions contains the optional parameters for the WebAppsClient.UpdateAuthSettingsSlot // method. func (client *WebAppsClient) UpdateAuthSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string, siteAuthSettings SiteAuthSettings, options *WebAppsClientUpdateAuthSettingsSlotOptions) (WebAppsClientUpdateAuthSettingsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateAuthSettingsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateAuthSettingsSlotCreateRequest(ctx, resourceGroupName, name, slot, siteAuthSettings, options) if err != nil { return WebAppsClientUpdateAuthSettingsSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateAuthSettingsSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateAuthSettingsSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateAuthSettingsSlotResponse{}, err } - return client.updateAuthSettingsSlotHandleResponse(resp) + resp, err := client.updateAuthSettingsSlotHandleResponse(httpResp) + return resp, err } // updateAuthSettingsSlotCreateRequest creates the UpdateAuthSettingsSlot request. @@ -23883,10 +25929,13 @@ func (client *WebAppsClient) updateAuthSettingsSlotCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, siteAuthSettings) + if err := runtime.MarshalAsJSON(req, siteAuthSettings); err != nil { + return nil, err + } + return req, nil } // updateAuthSettingsSlotHandleResponse handles the UpdateAuthSettingsSlot response. @@ -23901,25 +25950,32 @@ func (client *WebAppsClient) updateAuthSettingsSlotHandleResponse(resp *http.Res // UpdateAuthSettingsV2 - Description for Updates site's Authentication / Authorization settings for apps via the V2 format // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - siteAuthSettingsV2 - Auth settings associated with web app. // - options - WebAppsClientUpdateAuthSettingsV2Options contains the optional parameters for the WebAppsClient.UpdateAuthSettingsV2 // method. func (client *WebAppsClient) UpdateAuthSettingsV2(ctx context.Context, resourceGroupName string, name string, siteAuthSettingsV2 SiteAuthSettingsV2, options *WebAppsClientUpdateAuthSettingsV2Options) (WebAppsClientUpdateAuthSettingsV2Response, error) { + var err error + const operationName = "WebAppsClient.UpdateAuthSettingsV2" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateAuthSettingsV2CreateRequest(ctx, resourceGroupName, name, siteAuthSettingsV2, options) if err != nil { return WebAppsClientUpdateAuthSettingsV2Response{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateAuthSettingsV2Response{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateAuthSettingsV2Response{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateAuthSettingsV2Response{}, err } - return client.updateAuthSettingsV2HandleResponse(resp) + resp, err := client.updateAuthSettingsV2HandleResponse(httpResp) + return resp, err } // updateAuthSettingsV2CreateRequest creates the UpdateAuthSettingsV2 request. @@ -23942,10 +25998,13 @@ func (client *WebAppsClient) updateAuthSettingsV2CreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, siteAuthSettingsV2) + if err := runtime.MarshalAsJSON(req, siteAuthSettingsV2); err != nil { + return nil, err + } + return req, nil } // updateAuthSettingsV2HandleResponse handles the UpdateAuthSettingsV2 response. @@ -23960,7 +26019,7 @@ func (client *WebAppsClient) updateAuthSettingsV2HandleResponse(resp *http.Respo // UpdateAuthSettingsV2Slot - Description for Updates site's Authentication / Authorization settings for apps via the V2 format // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - slot - Name of web app slot. If not specified then will default to production slot. @@ -23968,18 +26027,25 @@ func (client *WebAppsClient) updateAuthSettingsV2HandleResponse(resp *http.Respo // - options - WebAppsClientUpdateAuthSettingsV2SlotOptions contains the optional parameters for the WebAppsClient.UpdateAuthSettingsV2Slot // method. func (client *WebAppsClient) UpdateAuthSettingsV2Slot(ctx context.Context, resourceGroupName string, name string, slot string, siteAuthSettingsV2 SiteAuthSettingsV2, options *WebAppsClientUpdateAuthSettingsV2SlotOptions) (WebAppsClientUpdateAuthSettingsV2SlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateAuthSettingsV2Slot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateAuthSettingsV2SlotCreateRequest(ctx, resourceGroupName, name, slot, siteAuthSettingsV2, options) if err != nil { return WebAppsClientUpdateAuthSettingsV2SlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateAuthSettingsV2SlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateAuthSettingsV2SlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateAuthSettingsV2SlotResponse{}, err } - return client.updateAuthSettingsV2SlotHandleResponse(resp) + resp, err := client.updateAuthSettingsV2SlotHandleResponse(httpResp) + return resp, err } // updateAuthSettingsV2SlotCreateRequest creates the UpdateAuthSettingsV2Slot request. @@ -24006,10 +26072,13 @@ func (client *WebAppsClient) updateAuthSettingsV2SlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, siteAuthSettingsV2) + if err := runtime.MarshalAsJSON(req, siteAuthSettingsV2); err != nil { + return nil, err + } + return req, nil } // updateAuthSettingsV2SlotHandleResponse handles the UpdateAuthSettingsV2Slot response. @@ -24024,25 +26093,32 @@ func (client *WebAppsClient) updateAuthSettingsV2SlotHandleResponse(resp *http.R // UpdateAzureStorageAccounts - Description for Updates the Azure storage account configurations of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - azureStorageAccounts - Azure storage accounts of the app. // - options - WebAppsClientUpdateAzureStorageAccountsOptions contains the optional parameters for the WebAppsClient.UpdateAzureStorageAccounts // method. func (client *WebAppsClient) UpdateAzureStorageAccounts(ctx context.Context, resourceGroupName string, name string, azureStorageAccounts AzureStoragePropertyDictionaryResource, options *WebAppsClientUpdateAzureStorageAccountsOptions) (WebAppsClientUpdateAzureStorageAccountsResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateAzureStorageAccounts" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateAzureStorageAccountsCreateRequest(ctx, resourceGroupName, name, azureStorageAccounts, options) if err != nil { return WebAppsClientUpdateAzureStorageAccountsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateAzureStorageAccountsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateAzureStorageAccountsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateAzureStorageAccountsResponse{}, err } - return client.updateAzureStorageAccountsHandleResponse(resp) + resp, err := client.updateAzureStorageAccountsHandleResponse(httpResp) + return resp, err } // updateAzureStorageAccountsCreateRequest creates the UpdateAzureStorageAccounts request. @@ -24065,10 +26141,13 @@ func (client *WebAppsClient) updateAzureStorageAccountsCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, azureStorageAccounts) + if err := runtime.MarshalAsJSON(req, azureStorageAccounts); err != nil { + return nil, err + } + return req, nil } // updateAzureStorageAccountsHandleResponse handles the UpdateAzureStorageAccounts response. @@ -24083,7 +26162,7 @@ func (client *WebAppsClient) updateAzureStorageAccountsHandleResponse(resp *http // UpdateAzureStorageAccountsSlot - Description for Updates the Azure storage account configurations of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will update the Azure storage account configurations @@ -24092,18 +26171,25 @@ func (client *WebAppsClient) updateAzureStorageAccountsHandleResponse(resp *http // - options - WebAppsClientUpdateAzureStorageAccountsSlotOptions contains the optional parameters for the WebAppsClient.UpdateAzureStorageAccountsSlot // method. func (client *WebAppsClient) UpdateAzureStorageAccountsSlot(ctx context.Context, resourceGroupName string, name string, slot string, azureStorageAccounts AzureStoragePropertyDictionaryResource, options *WebAppsClientUpdateAzureStorageAccountsSlotOptions) (WebAppsClientUpdateAzureStorageAccountsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateAzureStorageAccountsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateAzureStorageAccountsSlotCreateRequest(ctx, resourceGroupName, name, slot, azureStorageAccounts, options) if err != nil { return WebAppsClientUpdateAzureStorageAccountsSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateAzureStorageAccountsSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateAzureStorageAccountsSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateAzureStorageAccountsSlotResponse{}, err } - return client.updateAzureStorageAccountsSlotHandleResponse(resp) + resp, err := client.updateAzureStorageAccountsSlotHandleResponse(httpResp) + return resp, err } // updateAzureStorageAccountsSlotCreateRequest creates the UpdateAzureStorageAccountsSlot request. @@ -24130,10 +26216,13 @@ func (client *WebAppsClient) updateAzureStorageAccountsSlotCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, azureStorageAccounts) + if err := runtime.MarshalAsJSON(req, azureStorageAccounts); err != nil { + return nil, err + } + return req, nil } // updateAzureStorageAccountsSlotHandleResponse handles the UpdateAzureStorageAccountsSlot response. @@ -24148,25 +26237,32 @@ func (client *WebAppsClient) updateAzureStorageAccountsSlotHandleResponse(resp * // UpdateBackupConfiguration - Description for Updates the backup configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - request - Edited backup configuration. // - options - WebAppsClientUpdateBackupConfigurationOptions contains the optional parameters for the WebAppsClient.UpdateBackupConfiguration // method. func (client *WebAppsClient) UpdateBackupConfiguration(ctx context.Context, resourceGroupName string, name string, request BackupRequest, options *WebAppsClientUpdateBackupConfigurationOptions) (WebAppsClientUpdateBackupConfigurationResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateBackupConfiguration" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateBackupConfigurationCreateRequest(ctx, resourceGroupName, name, request, options) if err != nil { return WebAppsClientUpdateBackupConfigurationResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateBackupConfigurationResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateBackupConfigurationResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateBackupConfigurationResponse{}, err } - return client.updateBackupConfigurationHandleResponse(resp) + resp, err := client.updateBackupConfigurationHandleResponse(httpResp) + return resp, err } // updateBackupConfigurationCreateRequest creates the UpdateBackupConfiguration request. @@ -24189,10 +26285,13 @@ func (client *WebAppsClient) updateBackupConfigurationCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, request) + if err := runtime.MarshalAsJSON(req, request); err != nil { + return nil, err + } + return req, nil } // updateBackupConfigurationHandleResponse handles the UpdateBackupConfiguration response. @@ -24207,7 +26306,7 @@ func (client *WebAppsClient) updateBackupConfigurationHandleResponse(resp *http. // UpdateBackupConfigurationSlot - Description for Updates the backup configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will update the backup configuration for the production @@ -24216,18 +26315,25 @@ func (client *WebAppsClient) updateBackupConfigurationHandleResponse(resp *http. // - options - WebAppsClientUpdateBackupConfigurationSlotOptions contains the optional parameters for the WebAppsClient.UpdateBackupConfigurationSlot // method. func (client *WebAppsClient) UpdateBackupConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string, request BackupRequest, options *WebAppsClientUpdateBackupConfigurationSlotOptions) (WebAppsClientUpdateBackupConfigurationSlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateBackupConfigurationSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateBackupConfigurationSlotCreateRequest(ctx, resourceGroupName, name, slot, request, options) if err != nil { return WebAppsClientUpdateBackupConfigurationSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateBackupConfigurationSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateBackupConfigurationSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateBackupConfigurationSlotResponse{}, err } - return client.updateBackupConfigurationSlotHandleResponse(resp) + resp, err := client.updateBackupConfigurationSlotHandleResponse(httpResp) + return resp, err } // updateBackupConfigurationSlotCreateRequest creates the UpdateBackupConfigurationSlot request. @@ -24254,10 +26360,13 @@ func (client *WebAppsClient) updateBackupConfigurationSlotCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, request) + if err := runtime.MarshalAsJSON(req, request); err != nil { + return nil, err + } + return req, nil } // updateBackupConfigurationSlotHandleResponse handles the UpdateBackupConfigurationSlot response. @@ -24272,25 +26381,32 @@ func (client *WebAppsClient) updateBackupConfigurationSlotHandleResponse(resp *h // UpdateConfiguration - Description for Updates the configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - siteConfig - JSON representation of a SiteConfig object. See example. // - options - WebAppsClientUpdateConfigurationOptions contains the optional parameters for the WebAppsClient.UpdateConfiguration // method. func (client *WebAppsClient) UpdateConfiguration(ctx context.Context, resourceGroupName string, name string, siteConfig SiteConfigResource, options *WebAppsClientUpdateConfigurationOptions) (WebAppsClientUpdateConfigurationResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateConfiguration" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateConfigurationCreateRequest(ctx, resourceGroupName, name, siteConfig, options) if err != nil { return WebAppsClientUpdateConfigurationResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateConfigurationResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateConfigurationResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateConfigurationResponse{}, err } - return client.updateConfigurationHandleResponse(resp) + resp, err := client.updateConfigurationHandleResponse(httpResp) + return resp, err } // updateConfigurationCreateRequest creates the UpdateConfiguration request. @@ -24313,10 +26429,13 @@ func (client *WebAppsClient) updateConfigurationCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, siteConfig) + if err := runtime.MarshalAsJSON(req, siteConfig); err != nil { + return nil, err + } + return req, nil } // updateConfigurationHandleResponse handles the UpdateConfiguration response. @@ -24331,7 +26450,7 @@ func (client *WebAppsClient) updateConfigurationHandleResponse(resp *http.Respon // UpdateConfigurationSlot - Description for Updates the configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will update configuration for the production slot. @@ -24339,18 +26458,25 @@ func (client *WebAppsClient) updateConfigurationHandleResponse(resp *http.Respon // - options - WebAppsClientUpdateConfigurationSlotOptions contains the optional parameters for the WebAppsClient.UpdateConfigurationSlot // method. func (client *WebAppsClient) UpdateConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string, siteConfig SiteConfigResource, options *WebAppsClientUpdateConfigurationSlotOptions) (WebAppsClientUpdateConfigurationSlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateConfigurationSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateConfigurationSlotCreateRequest(ctx, resourceGroupName, name, slot, siteConfig, options) if err != nil { return WebAppsClientUpdateConfigurationSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateConfigurationSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateConfigurationSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateConfigurationSlotResponse{}, err } - return client.updateConfigurationSlotHandleResponse(resp) + resp, err := client.updateConfigurationSlotHandleResponse(httpResp) + return resp, err } // updateConfigurationSlotCreateRequest creates the UpdateConfigurationSlot request. @@ -24377,10 +26503,13 @@ func (client *WebAppsClient) updateConfigurationSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, siteConfig) + if err := runtime.MarshalAsJSON(req, siteConfig); err != nil { + return nil, err + } + return req, nil } // updateConfigurationSlotHandleResponse handles the UpdateConfigurationSlot response. @@ -24395,25 +26524,32 @@ func (client *WebAppsClient) updateConfigurationSlotHandleResponse(resp *http.Re // UpdateConnectionStrings - Description for Replaces the connection strings of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - connectionStrings - Connection strings of the app or deployment slot. See example. // - options - WebAppsClientUpdateConnectionStringsOptions contains the optional parameters for the WebAppsClient.UpdateConnectionStrings // method. func (client *WebAppsClient) UpdateConnectionStrings(ctx context.Context, resourceGroupName string, name string, connectionStrings ConnectionStringDictionary, options *WebAppsClientUpdateConnectionStringsOptions) (WebAppsClientUpdateConnectionStringsResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateConnectionStrings" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateConnectionStringsCreateRequest(ctx, resourceGroupName, name, connectionStrings, options) if err != nil { return WebAppsClientUpdateConnectionStringsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateConnectionStringsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateConnectionStringsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateConnectionStringsResponse{}, err } - return client.updateConnectionStringsHandleResponse(resp) + resp, err := client.updateConnectionStringsHandleResponse(httpResp) + return resp, err } // updateConnectionStringsCreateRequest creates the UpdateConnectionStrings request. @@ -24436,10 +26572,13 @@ func (client *WebAppsClient) updateConnectionStringsCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionStrings) + if err := runtime.MarshalAsJSON(req, connectionStrings); err != nil { + return nil, err + } + return req, nil } // updateConnectionStringsHandleResponse handles the UpdateConnectionStrings response. @@ -24454,7 +26593,7 @@ func (client *WebAppsClient) updateConnectionStringsHandleResponse(resp *http.Re // UpdateConnectionStringsSlot - Description for Replaces the connection strings of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will update the connection settings for the production @@ -24463,18 +26602,25 @@ func (client *WebAppsClient) updateConnectionStringsHandleResponse(resp *http.Re // - options - WebAppsClientUpdateConnectionStringsSlotOptions contains the optional parameters for the WebAppsClient.UpdateConnectionStringsSlot // method. func (client *WebAppsClient) UpdateConnectionStringsSlot(ctx context.Context, resourceGroupName string, name string, slot string, connectionStrings ConnectionStringDictionary, options *WebAppsClientUpdateConnectionStringsSlotOptions) (WebAppsClientUpdateConnectionStringsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateConnectionStringsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateConnectionStringsSlotCreateRequest(ctx, resourceGroupName, name, slot, connectionStrings, options) if err != nil { return WebAppsClientUpdateConnectionStringsSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateConnectionStringsSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateConnectionStringsSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateConnectionStringsSlotResponse{}, err } - return client.updateConnectionStringsSlotHandleResponse(resp) + resp, err := client.updateConnectionStringsSlotHandleResponse(httpResp) + return resp, err } // updateConnectionStringsSlotCreateRequest creates the UpdateConnectionStringsSlot request. @@ -24501,10 +26647,13 @@ func (client *WebAppsClient) updateConnectionStringsSlotCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionStrings) + if err := runtime.MarshalAsJSON(req, connectionStrings); err != nil { + return nil, err + } + return req, nil } // updateConnectionStringsSlotHandleResponse handles the UpdateConnectionStringsSlot response. @@ -24519,25 +26668,32 @@ func (client *WebAppsClient) updateConnectionStringsSlotHandleResponse(resp *htt // UpdateDiagnosticLogsConfig - Description for Updates the logging configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - siteLogsConfig - A SiteLogsConfig JSON object that contains the logging configuration to change in the "properties" property. // - options - WebAppsClientUpdateDiagnosticLogsConfigOptions contains the optional parameters for the WebAppsClient.UpdateDiagnosticLogsConfig // method. func (client *WebAppsClient) UpdateDiagnosticLogsConfig(ctx context.Context, resourceGroupName string, name string, siteLogsConfig SiteLogsConfig, options *WebAppsClientUpdateDiagnosticLogsConfigOptions) (WebAppsClientUpdateDiagnosticLogsConfigResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateDiagnosticLogsConfig" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateDiagnosticLogsConfigCreateRequest(ctx, resourceGroupName, name, siteLogsConfig, options) if err != nil { return WebAppsClientUpdateDiagnosticLogsConfigResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateDiagnosticLogsConfigResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateDiagnosticLogsConfigResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateDiagnosticLogsConfigResponse{}, err } - return client.updateDiagnosticLogsConfigHandleResponse(resp) + resp, err := client.updateDiagnosticLogsConfigHandleResponse(httpResp) + return resp, err } // updateDiagnosticLogsConfigCreateRequest creates the UpdateDiagnosticLogsConfig request. @@ -24560,10 +26716,13 @@ func (client *WebAppsClient) updateDiagnosticLogsConfigCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, siteLogsConfig) + if err := runtime.MarshalAsJSON(req, siteLogsConfig); err != nil { + return nil, err + } + return req, nil } // updateDiagnosticLogsConfigHandleResponse handles the UpdateDiagnosticLogsConfig response. @@ -24578,7 +26737,7 @@ func (client *WebAppsClient) updateDiagnosticLogsConfigHandleResponse(resp *http // UpdateDiagnosticLogsConfigSlot - Description for Updates the logging configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will update the logging configuration for the production @@ -24587,18 +26746,25 @@ func (client *WebAppsClient) updateDiagnosticLogsConfigHandleResponse(resp *http // - options - WebAppsClientUpdateDiagnosticLogsConfigSlotOptions contains the optional parameters for the WebAppsClient.UpdateDiagnosticLogsConfigSlot // method. func (client *WebAppsClient) UpdateDiagnosticLogsConfigSlot(ctx context.Context, resourceGroupName string, name string, slot string, siteLogsConfig SiteLogsConfig, options *WebAppsClientUpdateDiagnosticLogsConfigSlotOptions) (WebAppsClientUpdateDiagnosticLogsConfigSlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateDiagnosticLogsConfigSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateDiagnosticLogsConfigSlotCreateRequest(ctx, resourceGroupName, name, slot, siteLogsConfig, options) if err != nil { return WebAppsClientUpdateDiagnosticLogsConfigSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateDiagnosticLogsConfigSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateDiagnosticLogsConfigSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateDiagnosticLogsConfigSlotResponse{}, err } - return client.updateDiagnosticLogsConfigSlotHandleResponse(resp) + resp, err := client.updateDiagnosticLogsConfigSlotHandleResponse(httpResp) + return resp, err } // updateDiagnosticLogsConfigSlotCreateRequest creates the UpdateDiagnosticLogsConfigSlot request. @@ -24625,10 +26791,13 @@ func (client *WebAppsClient) updateDiagnosticLogsConfigSlotCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, siteLogsConfig) + if err := runtime.MarshalAsJSON(req, siteLogsConfig); err != nil { + return nil, err + } + return req, nil } // updateDiagnosticLogsConfigSlotHandleResponse handles the UpdateDiagnosticLogsConfigSlot response. @@ -24644,7 +26813,7 @@ func (client *WebAppsClient) updateDiagnosticLogsConfigSlotHandleResponse(resp * // ownership identifier. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - domainOwnershipIdentifierName - Name of domain ownership identifier. @@ -24652,18 +26821,25 @@ func (client *WebAppsClient) updateDiagnosticLogsConfigSlotHandleResponse(resp * // - options - WebAppsClientUpdateDomainOwnershipIdentifierOptions contains the optional parameters for the WebAppsClient.UpdateDomainOwnershipIdentifier // method. func (client *WebAppsClient) UpdateDomainOwnershipIdentifier(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier Identifier, options *WebAppsClientUpdateDomainOwnershipIdentifierOptions) (WebAppsClientUpdateDomainOwnershipIdentifierResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateDomainOwnershipIdentifier" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateDomainOwnershipIdentifierCreateRequest(ctx, resourceGroupName, name, domainOwnershipIdentifierName, domainOwnershipIdentifier, options) if err != nil { return WebAppsClientUpdateDomainOwnershipIdentifierResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateDomainOwnershipIdentifierResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateDomainOwnershipIdentifierResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateDomainOwnershipIdentifierResponse{}, err } - return client.updateDomainOwnershipIdentifierHandleResponse(resp) + resp, err := client.updateDomainOwnershipIdentifierHandleResponse(httpResp) + return resp, err } // updateDomainOwnershipIdentifierCreateRequest creates the UpdateDomainOwnershipIdentifier request. @@ -24690,10 +26866,13 @@ func (client *WebAppsClient) updateDomainOwnershipIdentifierCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, domainOwnershipIdentifier) + if err := runtime.MarshalAsJSON(req, domainOwnershipIdentifier); err != nil { + return nil, err + } + return req, nil } // updateDomainOwnershipIdentifierHandleResponse handles the UpdateDomainOwnershipIdentifier response. @@ -24709,7 +26888,7 @@ func (client *WebAppsClient) updateDomainOwnershipIdentifierHandleResponse(resp // existing ownership identifier. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - domainOwnershipIdentifierName - Name of domain ownership identifier. @@ -24718,18 +26897,25 @@ func (client *WebAppsClient) updateDomainOwnershipIdentifierHandleResponse(resp // - options - WebAppsClientUpdateDomainOwnershipIdentifierSlotOptions contains the optional parameters for the WebAppsClient.UpdateDomainOwnershipIdentifierSlot // method. func (client *WebAppsClient) UpdateDomainOwnershipIdentifierSlot(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string, domainOwnershipIdentifier Identifier, options *WebAppsClientUpdateDomainOwnershipIdentifierSlotOptions) (WebAppsClientUpdateDomainOwnershipIdentifierSlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateDomainOwnershipIdentifierSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateDomainOwnershipIdentifierSlotCreateRequest(ctx, resourceGroupName, name, domainOwnershipIdentifierName, slot, domainOwnershipIdentifier, options) if err != nil { return WebAppsClientUpdateDomainOwnershipIdentifierSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateDomainOwnershipIdentifierSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateDomainOwnershipIdentifierSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateDomainOwnershipIdentifierSlotResponse{}, err } - return client.updateDomainOwnershipIdentifierSlotHandleResponse(resp) + resp, err := client.updateDomainOwnershipIdentifierSlotHandleResponse(httpResp) + return resp, err } // updateDomainOwnershipIdentifierSlotCreateRequest creates the UpdateDomainOwnershipIdentifierSlot request. @@ -24760,10 +26946,13 @@ func (client *WebAppsClient) updateDomainOwnershipIdentifierSlotCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, domainOwnershipIdentifier) + if err := runtime.MarshalAsJSON(req, domainOwnershipIdentifier); err != nil { + return nil, err + } + return req, nil } // updateDomainOwnershipIdentifierSlotHandleResponse handles the UpdateDomainOwnershipIdentifierSlot response. @@ -24778,24 +26967,31 @@ func (client *WebAppsClient) updateDomainOwnershipIdentifierSlotHandleResponse(r // UpdateFtpAllowed - Description for Updates whether FTP is allowed on the site or not. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientUpdateFtpAllowedOptions contains the optional parameters for the WebAppsClient.UpdateFtpAllowed // method. func (client *WebAppsClient) UpdateFtpAllowed(ctx context.Context, resourceGroupName string, name string, csmPublishingAccessPoliciesEntity CsmPublishingCredentialsPoliciesEntity, options *WebAppsClientUpdateFtpAllowedOptions) (WebAppsClientUpdateFtpAllowedResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateFtpAllowed" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateFtpAllowedCreateRequest(ctx, resourceGroupName, name, csmPublishingAccessPoliciesEntity, options) if err != nil { return WebAppsClientUpdateFtpAllowedResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateFtpAllowedResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateFtpAllowedResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateFtpAllowedResponse{}, err } - return client.updateFtpAllowedHandleResponse(resp) + resp, err := client.updateFtpAllowedHandleResponse(httpResp) + return resp, err } // updateFtpAllowedCreateRequest creates the UpdateFtpAllowed request. @@ -24818,10 +27014,13 @@ func (client *WebAppsClient) updateFtpAllowedCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, csmPublishingAccessPoliciesEntity) + if err := runtime.MarshalAsJSON(req, csmPublishingAccessPoliciesEntity); err != nil { + return nil, err + } + return req, nil } // updateFtpAllowedHandleResponse handles the UpdateFtpAllowed response. @@ -24836,24 +27035,31 @@ func (client *WebAppsClient) updateFtpAllowedHandleResponse(resp *http.Response) // UpdateFtpAllowedSlot - Description for Updates whether FTP is allowed on the site or not. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientUpdateFtpAllowedSlotOptions contains the optional parameters for the WebAppsClient.UpdateFtpAllowedSlot // method. func (client *WebAppsClient) UpdateFtpAllowedSlot(ctx context.Context, resourceGroupName string, name string, slot string, csmPublishingAccessPoliciesEntity CsmPublishingCredentialsPoliciesEntity, options *WebAppsClientUpdateFtpAllowedSlotOptions) (WebAppsClientUpdateFtpAllowedSlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateFtpAllowedSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateFtpAllowedSlotCreateRequest(ctx, resourceGroupName, name, slot, csmPublishingAccessPoliciesEntity, options) if err != nil { return WebAppsClientUpdateFtpAllowedSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateFtpAllowedSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateFtpAllowedSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateFtpAllowedSlotResponse{}, err } - return client.updateFtpAllowedSlotHandleResponse(resp) + resp, err := client.updateFtpAllowedSlotHandleResponse(httpResp) + return resp, err } // updateFtpAllowedSlotCreateRequest creates the UpdateFtpAllowedSlot request. @@ -24880,10 +27086,13 @@ func (client *WebAppsClient) updateFtpAllowedSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, csmPublishingAccessPoliciesEntity) + if err := runtime.MarshalAsJSON(req, csmPublishingAccessPoliciesEntity); err != nil { + return nil, err + } + return req, nil } // updateFtpAllowedSlotHandleResponse handles the UpdateFtpAllowedSlot response. @@ -24898,7 +27107,7 @@ func (client *WebAppsClient) updateFtpAllowedSlotHandleResponse(resp *http.Respo // UpdateHybridConnection - Description for Creates a new Hybrid Connection using a Service Bus relay. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - The name of the web app. // - namespaceName - The namespace for this hybrid connection. @@ -24907,18 +27116,25 @@ func (client *WebAppsClient) updateFtpAllowedSlotHandleResponse(resp *http.Respo // - options - WebAppsClientUpdateHybridConnectionOptions contains the optional parameters for the WebAppsClient.UpdateHybridConnection // method. func (client *WebAppsClient) UpdateHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection, options *WebAppsClientUpdateHybridConnectionOptions) (WebAppsClientUpdateHybridConnectionResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateHybridConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateHybridConnectionCreateRequest(ctx, resourceGroupName, name, namespaceName, relayName, connectionEnvelope, options) if err != nil { return WebAppsClientUpdateHybridConnectionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateHybridConnectionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateHybridConnectionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateHybridConnectionResponse{}, err } - return client.updateHybridConnectionHandleResponse(resp) + resp, err := client.updateHybridConnectionHandleResponse(httpResp) + return resp, err } // updateHybridConnectionCreateRequest creates the UpdateHybridConnection request. @@ -24949,10 +27165,13 @@ func (client *WebAppsClient) updateHybridConnectionCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil } // updateHybridConnectionHandleResponse handles the UpdateHybridConnection response. @@ -24967,7 +27186,7 @@ func (client *WebAppsClient) updateHybridConnectionHandleResponse(resp *http.Res // UpdateHybridConnectionSlot - Description for Creates a new Hybrid Connection using a Service Bus relay. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - The name of the web app. // - namespaceName - The namespace for this hybrid connection. @@ -24977,18 +27196,25 @@ func (client *WebAppsClient) updateHybridConnectionHandleResponse(resp *http.Res // - options - WebAppsClientUpdateHybridConnectionSlotOptions contains the optional parameters for the WebAppsClient.UpdateHybridConnectionSlot // method. func (client *WebAppsClient) UpdateHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string, connectionEnvelope HybridConnection, options *WebAppsClientUpdateHybridConnectionSlotOptions) (WebAppsClientUpdateHybridConnectionSlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateHybridConnectionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateHybridConnectionSlotCreateRequest(ctx, resourceGroupName, name, namespaceName, relayName, slot, connectionEnvelope, options) if err != nil { return WebAppsClientUpdateHybridConnectionSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateHybridConnectionSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateHybridConnectionSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateHybridConnectionSlotResponse{}, err } - return client.updateHybridConnectionSlotHandleResponse(resp) + resp, err := client.updateHybridConnectionSlotHandleResponse(httpResp) + return resp, err } // updateHybridConnectionSlotCreateRequest creates the UpdateHybridConnectionSlot request. @@ -25023,10 +27249,13 @@ func (client *WebAppsClient) updateHybridConnectionSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil } // updateHybridConnectionSlotHandleResponse handles the UpdateHybridConnectionSlot response. @@ -25041,24 +27270,31 @@ func (client *WebAppsClient) updateHybridConnectionSlotHandleResponse(resp *http // UpdateMetadata - Description for Replaces the metadata of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - metadata - Edited metadata of the app or deployment slot. See example. // - options - WebAppsClientUpdateMetadataOptions contains the optional parameters for the WebAppsClient.UpdateMetadata method. func (client *WebAppsClient) UpdateMetadata(ctx context.Context, resourceGroupName string, name string, metadata StringDictionary, options *WebAppsClientUpdateMetadataOptions) (WebAppsClientUpdateMetadataResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateMetadata" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateMetadataCreateRequest(ctx, resourceGroupName, name, metadata, options) if err != nil { return WebAppsClientUpdateMetadataResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateMetadataResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateMetadataResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateMetadataResponse{}, err } - return client.updateMetadataHandleResponse(resp) + resp, err := client.updateMetadataHandleResponse(httpResp) + return resp, err } // updateMetadataCreateRequest creates the UpdateMetadata request. @@ -25081,10 +27317,13 @@ func (client *WebAppsClient) updateMetadataCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, metadata) + if err := runtime.MarshalAsJSON(req, metadata); err != nil { + return nil, err + } + return req, nil } // updateMetadataHandleResponse handles the UpdateMetadata response. @@ -25099,7 +27338,7 @@ func (client *WebAppsClient) updateMetadataHandleResponse(resp *http.Response) ( // UpdateMetadataSlot - Description for Replaces the metadata of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will update the metadata for the production slot. @@ -25107,18 +27346,25 @@ func (client *WebAppsClient) updateMetadataHandleResponse(resp *http.Response) ( // - options - WebAppsClientUpdateMetadataSlotOptions contains the optional parameters for the WebAppsClient.UpdateMetadataSlot // method. func (client *WebAppsClient) UpdateMetadataSlot(ctx context.Context, resourceGroupName string, name string, slot string, metadata StringDictionary, options *WebAppsClientUpdateMetadataSlotOptions) (WebAppsClientUpdateMetadataSlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateMetadataSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateMetadataSlotCreateRequest(ctx, resourceGroupName, name, slot, metadata, options) if err != nil { return WebAppsClientUpdateMetadataSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateMetadataSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateMetadataSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateMetadataSlotResponse{}, err } - return client.updateMetadataSlotHandleResponse(resp) + resp, err := client.updateMetadataSlotHandleResponse(httpResp) + return resp, err } // updateMetadataSlotCreateRequest creates the UpdateMetadataSlot request. @@ -25145,10 +27391,13 @@ func (client *WebAppsClient) updateMetadataSlotCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, metadata) + if err := runtime.MarshalAsJSON(req, metadata); err != nil { + return nil, err + } + return req, nil } // updateMetadataSlotHandleResponse handles the UpdateMetadataSlot response. @@ -25163,7 +27412,7 @@ func (client *WebAppsClient) updateMetadataSlotHandleResponse(resp *http.Respons // UpdatePremierAddOn - Description for Updates a named add-on of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - premierAddOnName - Add-on name. @@ -25171,18 +27420,25 @@ func (client *WebAppsClient) updateMetadataSlotHandleResponse(resp *http.Respons // - options - WebAppsClientUpdatePremierAddOnOptions contains the optional parameters for the WebAppsClient.UpdatePremierAddOn // method. func (client *WebAppsClient) UpdatePremierAddOn(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, premierAddOn PremierAddOnPatchResource, options *WebAppsClientUpdatePremierAddOnOptions) (WebAppsClientUpdatePremierAddOnResponse, error) { + var err error + const operationName = "WebAppsClient.UpdatePremierAddOn" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updatePremierAddOnCreateRequest(ctx, resourceGroupName, name, premierAddOnName, premierAddOn, options) if err != nil { return WebAppsClientUpdatePremierAddOnResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdatePremierAddOnResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdatePremierAddOnResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdatePremierAddOnResponse{}, err } - return client.updatePremierAddOnHandleResponse(resp) + resp, err := client.updatePremierAddOnHandleResponse(httpResp) + return resp, err } // updatePremierAddOnCreateRequest creates the UpdatePremierAddOn request. @@ -25209,10 +27465,13 @@ func (client *WebAppsClient) updatePremierAddOnCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, premierAddOn) + if err := runtime.MarshalAsJSON(req, premierAddOn); err != nil { + return nil, err + } + return req, nil } // updatePremierAddOnHandleResponse handles the UpdatePremierAddOn response. @@ -25227,7 +27486,7 @@ func (client *WebAppsClient) updatePremierAddOnHandleResponse(resp *http.Respons // UpdatePremierAddOnSlot - Description for Updates a named add-on of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - premierAddOnName - Add-on name. @@ -25237,18 +27496,25 @@ func (client *WebAppsClient) updatePremierAddOnHandleResponse(resp *http.Respons // - options - WebAppsClientUpdatePremierAddOnSlotOptions contains the optional parameters for the WebAppsClient.UpdatePremierAddOnSlot // method. func (client *WebAppsClient) UpdatePremierAddOnSlot(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string, premierAddOn PremierAddOnPatchResource, options *WebAppsClientUpdatePremierAddOnSlotOptions) (WebAppsClientUpdatePremierAddOnSlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdatePremierAddOnSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updatePremierAddOnSlotCreateRequest(ctx, resourceGroupName, name, premierAddOnName, slot, premierAddOn, options) if err != nil { return WebAppsClientUpdatePremierAddOnSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdatePremierAddOnSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdatePremierAddOnSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdatePremierAddOnSlotResponse{}, err } - return client.updatePremierAddOnSlotHandleResponse(resp) + resp, err := client.updatePremierAddOnSlotHandleResponse(httpResp) + return resp, err } // updatePremierAddOnSlotCreateRequest creates the UpdatePremierAddOnSlot request. @@ -25279,10 +27545,13 @@ func (client *WebAppsClient) updatePremierAddOnSlotCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, premierAddOn) + if err := runtime.MarshalAsJSON(req, premierAddOn); err != nil { + return nil, err + } + return req, nil } // updatePremierAddOnSlotHandleResponse handles the UpdatePremierAddOnSlot response. @@ -25298,7 +27567,7 @@ func (client *WebAppsClient) updatePremierAddOnSlotHandleResponse(resp *http.Res // one (PATCH). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - entityName - Name of the hybrid connection configuration. @@ -25306,18 +27575,25 @@ func (client *WebAppsClient) updatePremierAddOnSlotHandleResponse(resp *http.Res // - options - WebAppsClientUpdateRelayServiceConnectionOptions contains the optional parameters for the WebAppsClient.UpdateRelayServiceConnection // method. func (client *WebAppsClient) UpdateRelayServiceConnection(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity, options *WebAppsClientUpdateRelayServiceConnectionOptions) (WebAppsClientUpdateRelayServiceConnectionResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateRelayServiceConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateRelayServiceConnectionCreateRequest(ctx, resourceGroupName, name, entityName, connectionEnvelope, options) if err != nil { return WebAppsClientUpdateRelayServiceConnectionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateRelayServiceConnectionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateRelayServiceConnectionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateRelayServiceConnectionResponse{}, err } - return client.updateRelayServiceConnectionHandleResponse(resp) + resp, err := client.updateRelayServiceConnectionHandleResponse(httpResp) + return resp, err } // updateRelayServiceConnectionCreateRequest creates the UpdateRelayServiceConnection request. @@ -25344,10 +27620,13 @@ func (client *WebAppsClient) updateRelayServiceConnectionCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil } // updateRelayServiceConnectionHandleResponse handles the UpdateRelayServiceConnection response. @@ -25363,7 +27642,7 @@ func (client *WebAppsClient) updateRelayServiceConnectionHandleResponse(resp *ht // one (PATCH). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - entityName - Name of the hybrid connection configuration. @@ -25373,18 +27652,25 @@ func (client *WebAppsClient) updateRelayServiceConnectionHandleResponse(resp *ht // - options - WebAppsClientUpdateRelayServiceConnectionSlotOptions contains the optional parameters for the WebAppsClient.UpdateRelayServiceConnectionSlot // method. func (client *WebAppsClient) UpdateRelayServiceConnectionSlot(ctx context.Context, resourceGroupName string, name string, entityName string, slot string, connectionEnvelope RelayServiceConnectionEntity, options *WebAppsClientUpdateRelayServiceConnectionSlotOptions) (WebAppsClientUpdateRelayServiceConnectionSlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateRelayServiceConnectionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateRelayServiceConnectionSlotCreateRequest(ctx, resourceGroupName, name, entityName, slot, connectionEnvelope, options) if err != nil { return WebAppsClientUpdateRelayServiceConnectionSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateRelayServiceConnectionSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateRelayServiceConnectionSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateRelayServiceConnectionSlotResponse{}, err } - return client.updateRelayServiceConnectionSlotHandleResponse(resp) + resp, err := client.updateRelayServiceConnectionSlotHandleResponse(httpResp) + return resp, err } // updateRelayServiceConnectionSlotCreateRequest creates the UpdateRelayServiceConnectionSlot request. @@ -25415,10 +27701,13 @@ func (client *WebAppsClient) updateRelayServiceConnectionSlotCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil } // updateRelayServiceConnectionSlotHandleResponse handles the UpdateRelayServiceConnectionSlot response. @@ -25433,24 +27722,31 @@ func (client *WebAppsClient) updateRelayServiceConnectionSlotHandleResponse(resp // UpdateScmAllowed - Description for Updates whether user publishing credentials are allowed on the site or not. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientUpdateScmAllowedOptions contains the optional parameters for the WebAppsClient.UpdateScmAllowed // method. func (client *WebAppsClient) UpdateScmAllowed(ctx context.Context, resourceGroupName string, name string, csmPublishingAccessPoliciesEntity CsmPublishingCredentialsPoliciesEntity, options *WebAppsClientUpdateScmAllowedOptions) (WebAppsClientUpdateScmAllowedResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateScmAllowed" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateScmAllowedCreateRequest(ctx, resourceGroupName, name, csmPublishingAccessPoliciesEntity, options) if err != nil { return WebAppsClientUpdateScmAllowedResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateScmAllowedResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateScmAllowedResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateScmAllowedResponse{}, err } - return client.updateScmAllowedHandleResponse(resp) + resp, err := client.updateScmAllowedHandleResponse(httpResp) + return resp, err } // updateScmAllowedCreateRequest creates the UpdateScmAllowed request. @@ -25473,10 +27769,13 @@ func (client *WebAppsClient) updateScmAllowedCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, csmPublishingAccessPoliciesEntity) + if err := runtime.MarshalAsJSON(req, csmPublishingAccessPoliciesEntity); err != nil { + return nil, err + } + return req, nil } // updateScmAllowedHandleResponse handles the UpdateScmAllowed response. @@ -25491,24 +27790,31 @@ func (client *WebAppsClient) updateScmAllowedHandleResponse(resp *http.Response) // UpdateScmAllowedSlot - Description for Updates whether user publishing credentials are allowed on the site or not. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - options - WebAppsClientUpdateScmAllowedSlotOptions contains the optional parameters for the WebAppsClient.UpdateScmAllowedSlot // method. func (client *WebAppsClient) UpdateScmAllowedSlot(ctx context.Context, resourceGroupName string, name string, slot string, csmPublishingAccessPoliciesEntity CsmPublishingCredentialsPoliciesEntity, options *WebAppsClientUpdateScmAllowedSlotOptions) (WebAppsClientUpdateScmAllowedSlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateScmAllowedSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateScmAllowedSlotCreateRequest(ctx, resourceGroupName, name, slot, csmPublishingAccessPoliciesEntity, options) if err != nil { return WebAppsClientUpdateScmAllowedSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateScmAllowedSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateScmAllowedSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateScmAllowedSlotResponse{}, err } - return client.updateScmAllowedSlotHandleResponse(resp) + resp, err := client.updateScmAllowedSlotHandleResponse(httpResp) + return resp, err } // updateScmAllowedSlotCreateRequest creates the UpdateScmAllowedSlot request. @@ -25535,10 +27841,13 @@ func (client *WebAppsClient) updateScmAllowedSlotCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, csmPublishingAccessPoliciesEntity) + if err := runtime.MarshalAsJSON(req, csmPublishingAccessPoliciesEntity); err != nil { + return nil, err + } + return req, nil } // updateScmAllowedSlotHandleResponse handles the UpdateScmAllowedSlot response. @@ -25553,25 +27862,32 @@ func (client *WebAppsClient) updateScmAllowedSlotHandleResponse(resp *http.Respo // UpdateSitePushSettings - Description for Updates the Push settings associated with web app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - pushSettings - Push settings associated with web app. // - options - WebAppsClientUpdateSitePushSettingsOptions contains the optional parameters for the WebAppsClient.UpdateSitePushSettings // method. func (client *WebAppsClient) UpdateSitePushSettings(ctx context.Context, resourceGroupName string, name string, pushSettings PushSettings, options *WebAppsClientUpdateSitePushSettingsOptions) (WebAppsClientUpdateSitePushSettingsResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateSitePushSettings" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateSitePushSettingsCreateRequest(ctx, resourceGroupName, name, pushSettings, options) if err != nil { return WebAppsClientUpdateSitePushSettingsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateSitePushSettingsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateSitePushSettingsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateSitePushSettingsResponse{}, err } - return client.updateSitePushSettingsHandleResponse(resp) + resp, err := client.updateSitePushSettingsHandleResponse(httpResp) + return resp, err } // updateSitePushSettingsCreateRequest creates the UpdateSitePushSettings request. @@ -25594,10 +27910,13 @@ func (client *WebAppsClient) updateSitePushSettingsCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, pushSettings) + if err := runtime.MarshalAsJSON(req, pushSettings); err != nil { + return nil, err + } + return req, nil } // updateSitePushSettingsHandleResponse handles the UpdateSitePushSettings response. @@ -25612,7 +27931,7 @@ func (client *WebAppsClient) updateSitePushSettingsHandleResponse(resp *http.Res // UpdateSitePushSettingsSlot - Description for Updates the Push settings associated with web app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of web app. // - slot - Name of web app slot. If not specified then will default to production slot. @@ -25620,18 +27939,25 @@ func (client *WebAppsClient) updateSitePushSettingsHandleResponse(resp *http.Res // - options - WebAppsClientUpdateSitePushSettingsSlotOptions contains the optional parameters for the WebAppsClient.UpdateSitePushSettingsSlot // method. func (client *WebAppsClient) UpdateSitePushSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string, pushSettings PushSettings, options *WebAppsClientUpdateSitePushSettingsSlotOptions) (WebAppsClientUpdateSitePushSettingsSlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateSitePushSettingsSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateSitePushSettingsSlotCreateRequest(ctx, resourceGroupName, name, slot, pushSettings, options) if err != nil { return WebAppsClientUpdateSitePushSettingsSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateSitePushSettingsSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateSitePushSettingsSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateSitePushSettingsSlotResponse{}, err } - return client.updateSitePushSettingsSlotHandleResponse(resp) + resp, err := client.updateSitePushSettingsSlotHandleResponse(httpResp) + return resp, err } // updateSitePushSettingsSlotCreateRequest creates the UpdateSitePushSettingsSlot request. @@ -25658,10 +27984,13 @@ func (client *WebAppsClient) updateSitePushSettingsSlotCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, pushSettings) + if err := runtime.MarshalAsJSON(req, pushSettings); err != nil { + return nil, err + } + return req, nil } // updateSitePushSettingsSlotHandleResponse handles the UpdateSitePushSettingsSlot response. @@ -25677,7 +28006,7 @@ func (client *WebAppsClient) updateSitePushSettingsSlotHandleResponse(resp *http // app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter. // - slot - Name of the deployment slot to create or update. By default, this API attempts to create or modify the production @@ -25685,18 +28014,25 @@ func (client *WebAppsClient) updateSitePushSettingsSlotHandleResponse(resp *http // - siteEnvelope - A JSON representation of the app properties. See example. // - options - WebAppsClientUpdateSlotOptions contains the optional parameters for the WebAppsClient.UpdateSlot method. func (client *WebAppsClient) UpdateSlot(ctx context.Context, resourceGroupName string, name string, slot string, siteEnvelope SitePatchResource, options *WebAppsClientUpdateSlotOptions) (WebAppsClientUpdateSlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateSlotCreateRequest(ctx, resourceGroupName, name, slot, siteEnvelope, options) if err != nil { return WebAppsClientUpdateSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return WebAppsClientUpdateSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateSlotResponse{}, err } - return client.updateSlotHandleResponse(resp) + resp, err := client.updateSlotHandleResponse(httpResp) + return resp, err } // updateSlotCreateRequest creates the UpdateSlot request. @@ -25723,10 +28059,13 @@ func (client *WebAppsClient) updateSlotCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, siteEnvelope) + if err := runtime.MarshalAsJSON(req, siteEnvelope); err != nil { + return nil, err + } + return req, nil } // updateSlotHandleResponse handles the UpdateSlot response. @@ -25742,25 +28081,32 @@ func (client *WebAppsClient) updateSlotHandleResponse(resp *http.Response) (WebA // with the slot during swap operation. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slotConfigNames - Names of application settings and connection strings. See example. // - options - WebAppsClientUpdateSlotConfigurationNamesOptions contains the optional parameters for the WebAppsClient.UpdateSlotConfigurationNames // method. func (client *WebAppsClient) UpdateSlotConfigurationNames(ctx context.Context, resourceGroupName string, name string, slotConfigNames SlotConfigNamesResource, options *WebAppsClientUpdateSlotConfigurationNamesOptions) (WebAppsClientUpdateSlotConfigurationNamesResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateSlotConfigurationNames" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateSlotConfigurationNamesCreateRequest(ctx, resourceGroupName, name, slotConfigNames, options) if err != nil { return WebAppsClientUpdateSlotConfigurationNamesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateSlotConfigurationNamesResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateSlotConfigurationNamesResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateSlotConfigurationNamesResponse{}, err } - return client.updateSlotConfigurationNamesHandleResponse(resp) + resp, err := client.updateSlotConfigurationNamesHandleResponse(httpResp) + return resp, err } // updateSlotConfigurationNamesCreateRequest creates the UpdateSlotConfigurationNames request. @@ -25783,10 +28129,13 @@ func (client *WebAppsClient) updateSlotConfigurationNamesCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, slotConfigNames) + if err := runtime.MarshalAsJSON(req, slotConfigNames); err != nil { + return nil, err + } + return req, nil } // updateSlotConfigurationNamesHandleResponse handles the UpdateSlotConfigurationNames response. @@ -25801,25 +28150,32 @@ func (client *WebAppsClient) updateSlotConfigurationNamesHandleResponse(resp *ht // UpdateSourceControl - Description for Updates the source control configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - siteSourceControl - JSON representation of a SiteSourceControl object. See example. // - options - WebAppsClientUpdateSourceControlOptions contains the optional parameters for the WebAppsClient.UpdateSourceControl // method. func (client *WebAppsClient) UpdateSourceControl(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl, options *WebAppsClientUpdateSourceControlOptions) (WebAppsClientUpdateSourceControlResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateSourceControl" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateSourceControlCreateRequest(ctx, resourceGroupName, name, siteSourceControl, options) if err != nil { return WebAppsClientUpdateSourceControlResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateSourceControlResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return WebAppsClientUpdateSourceControlResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateSourceControlResponse{}, err } - return client.updateSourceControlHandleResponse(resp) + resp, err := client.updateSourceControlHandleResponse(httpResp) + return resp, err } // updateSourceControlCreateRequest creates the UpdateSourceControl request. @@ -25842,10 +28198,13 @@ func (client *WebAppsClient) updateSourceControlCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, siteSourceControl) + if err := runtime.MarshalAsJSON(req, siteSourceControl); err != nil { + return nil, err + } + return req, nil } // updateSourceControlHandleResponse handles the UpdateSourceControl response. @@ -25860,7 +28219,7 @@ func (client *WebAppsClient) updateSourceControlHandleResponse(resp *http.Respon // UpdateSourceControlSlot - Description for Updates the source control configuration of an app. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will update the source control configuration for @@ -25869,18 +28228,25 @@ func (client *WebAppsClient) updateSourceControlHandleResponse(resp *http.Respon // - options - WebAppsClientUpdateSourceControlSlotOptions contains the optional parameters for the WebAppsClient.UpdateSourceControlSlot // method. func (client *WebAppsClient) UpdateSourceControlSlot(ctx context.Context, resourceGroupName string, name string, slot string, siteSourceControl SiteSourceControl, options *WebAppsClientUpdateSourceControlSlotOptions) (WebAppsClientUpdateSourceControlSlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateSourceControlSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateSourceControlSlotCreateRequest(ctx, resourceGroupName, name, slot, siteSourceControl, options) if err != nil { return WebAppsClientUpdateSourceControlSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateSourceControlSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - return WebAppsClientUpdateSourceControlSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateSourceControlSlotResponse{}, err } - return client.updateSourceControlSlotHandleResponse(resp) + resp, err := client.updateSourceControlSlotHandleResponse(httpResp) + return resp, err } // updateSourceControlSlotCreateRequest creates the UpdateSourceControlSlot request. @@ -25907,10 +28273,13 @@ func (client *WebAppsClient) updateSourceControlSlotCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, siteSourceControl) + if err := runtime.MarshalAsJSON(req, siteSourceControl); err != nil { + return nil, err + } + return req, nil } // updateSourceControlSlotHandleResponse handles the UpdateSourceControlSlot response. @@ -25927,25 +28296,32 @@ func (client *WebAppsClient) updateSourceControlSlotHandleResponse(resp *http.Re // delegated, and is not in use by another App Service Plan other than the one this App is in. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - connectionEnvelope - Properties of the Virtual Network connection. See example. // - options - WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckOptions contains the optional parameters for the WebAppsClient.UpdateSwiftVirtualNetworkConnectionWithCheck // method. func (client *WebAppsClient) UpdateSwiftVirtualNetworkConnectionWithCheck(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork, options *WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckOptions) (WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateSwiftVirtualNetworkConnectionWithCheck" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateSwiftVirtualNetworkConnectionWithCheckCreateRequest(ctx, resourceGroupName, name, connectionEnvelope, options) if err != nil { return WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckResponse{}, err } - return client.updateSwiftVirtualNetworkConnectionWithCheckHandleResponse(resp) + resp, err := client.updateSwiftVirtualNetworkConnectionWithCheckHandleResponse(httpResp) + return resp, err } // updateSwiftVirtualNetworkConnectionWithCheckCreateRequest creates the UpdateSwiftVirtualNetworkConnectionWithCheck request. @@ -25968,10 +28344,13 @@ func (client *WebAppsClient) updateSwiftVirtualNetworkConnectionWithCheckCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil } // updateSwiftVirtualNetworkConnectionWithCheckHandleResponse handles the UpdateSwiftVirtualNetworkConnectionWithCheck response. @@ -25989,7 +28368,7 @@ func (client *WebAppsClient) updateSwiftVirtualNetworkConnectionWithCheckHandleR // delegated, and is not in use by another App Service Plan other than the one this App is in. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - slot - Name of the deployment slot. If a slot is not specified, the API will add or update connections for the production @@ -25998,18 +28377,25 @@ func (client *WebAppsClient) updateSwiftVirtualNetworkConnectionWithCheckHandleR // - options - WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions contains the optional parameters for the // WebAppsClient.UpdateSwiftVirtualNetworkConnectionWithCheckSlot method. func (client *WebAppsClient) UpdateSwiftVirtualNetworkConnectionWithCheckSlot(ctx context.Context, resourceGroupName string, name string, slot string, connectionEnvelope SwiftVirtualNetwork, options *WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotOptions) (WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateSwiftVirtualNetworkConnectionWithCheckSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateSwiftVirtualNetworkConnectionWithCheckSlotCreateRequest(ctx, resourceGroupName, name, slot, connectionEnvelope, options) if err != nil { return WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponse{}, err } - return client.updateSwiftVirtualNetworkConnectionWithCheckSlotHandleResponse(resp) + resp, err := client.updateSwiftVirtualNetworkConnectionWithCheckSlotHandleResponse(httpResp) + return resp, err } // updateSwiftVirtualNetworkConnectionWithCheckSlotCreateRequest creates the UpdateSwiftVirtualNetworkConnectionWithCheckSlot request. @@ -26036,10 +28422,13 @@ func (client *WebAppsClient) updateSwiftVirtualNetworkConnectionWithCheckSlotCre return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil } // updateSwiftVirtualNetworkConnectionWithCheckSlotHandleResponse handles the UpdateSwiftVirtualNetworkConnectionWithCheckSlot response. @@ -26055,7 +28444,7 @@ func (client *WebAppsClient) updateSwiftVirtualNetworkConnectionWithCheckSlotHan // properties (PATCH). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - vnetName - Name of an existing Virtual Network. @@ -26063,18 +28452,25 @@ func (client *WebAppsClient) updateSwiftVirtualNetworkConnectionWithCheckSlotHan // - options - WebAppsClientUpdateVnetConnectionOptions contains the optional parameters for the WebAppsClient.UpdateVnetConnection // method. func (client *WebAppsClient) UpdateVnetConnection(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfoResource, options *WebAppsClientUpdateVnetConnectionOptions) (WebAppsClientUpdateVnetConnectionResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateVnetConnection" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateVnetConnectionCreateRequest(ctx, resourceGroupName, name, vnetName, connectionEnvelope, options) if err != nil { return WebAppsClientUpdateVnetConnectionResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateVnetConnectionResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateVnetConnectionResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateVnetConnectionResponse{}, err } - return client.updateVnetConnectionHandleResponse(resp) + resp, err := client.updateVnetConnectionHandleResponse(httpResp) + return resp, err } // updateVnetConnectionCreateRequest creates the UpdateVnetConnection request. @@ -26101,10 +28497,13 @@ func (client *WebAppsClient) updateVnetConnectionCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil } // updateVnetConnectionHandleResponse handles the UpdateVnetConnection response. @@ -26119,7 +28518,7 @@ func (client *WebAppsClient) updateVnetConnectionHandleResponse(resp *http.Respo // UpdateVnetConnectionGateway - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - vnetName - Name of the Virtual Network. @@ -26128,18 +28527,25 @@ func (client *WebAppsClient) updateVnetConnectionHandleResponse(resp *http.Respo // - options - WebAppsClientUpdateVnetConnectionGatewayOptions contains the optional parameters for the WebAppsClient.UpdateVnetConnectionGateway // method. func (client *WebAppsClient) UpdateVnetConnectionGateway(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway, options *WebAppsClientUpdateVnetConnectionGatewayOptions) (WebAppsClientUpdateVnetConnectionGatewayResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateVnetConnectionGateway" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateVnetConnectionGatewayCreateRequest(ctx, resourceGroupName, name, vnetName, gatewayName, connectionEnvelope, options) if err != nil { return WebAppsClientUpdateVnetConnectionGatewayResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateVnetConnectionGatewayResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateVnetConnectionGatewayResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateVnetConnectionGatewayResponse{}, err } - return client.updateVnetConnectionGatewayHandleResponse(resp) + resp, err := client.updateVnetConnectionGatewayHandleResponse(httpResp) + return resp, err } // updateVnetConnectionGatewayCreateRequest creates the UpdateVnetConnectionGateway request. @@ -26170,10 +28576,13 @@ func (client *WebAppsClient) updateVnetConnectionGatewayCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil } // updateVnetConnectionGatewayHandleResponse handles the UpdateVnetConnectionGateway response. @@ -26188,7 +28597,7 @@ func (client *WebAppsClient) updateVnetConnectionGatewayHandleResponse(resp *htt // UpdateVnetConnectionGatewaySlot - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - vnetName - Name of the Virtual Network. @@ -26199,18 +28608,25 @@ func (client *WebAppsClient) updateVnetConnectionGatewayHandleResponse(resp *htt // - options - WebAppsClientUpdateVnetConnectionGatewaySlotOptions contains the optional parameters for the WebAppsClient.UpdateVnetConnectionGatewaySlot // method. func (client *WebAppsClient) UpdateVnetConnectionGatewaySlot(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, slot string, connectionEnvelope VnetGateway, options *WebAppsClientUpdateVnetConnectionGatewaySlotOptions) (WebAppsClientUpdateVnetConnectionGatewaySlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateVnetConnectionGatewaySlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateVnetConnectionGatewaySlotCreateRequest(ctx, resourceGroupName, name, vnetName, gatewayName, slot, connectionEnvelope, options) if err != nil { return WebAppsClientUpdateVnetConnectionGatewaySlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateVnetConnectionGatewaySlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateVnetConnectionGatewaySlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateVnetConnectionGatewaySlotResponse{}, err } - return client.updateVnetConnectionGatewaySlotHandleResponse(resp) + resp, err := client.updateVnetConnectionGatewaySlotHandleResponse(httpResp) + return resp, err } // updateVnetConnectionGatewaySlotCreateRequest creates the UpdateVnetConnectionGatewaySlot request. @@ -26245,10 +28661,13 @@ func (client *WebAppsClient) updateVnetConnectionGatewaySlotCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil } // updateVnetConnectionGatewaySlotHandleResponse handles the UpdateVnetConnectionGatewaySlot response. @@ -26264,7 +28683,7 @@ func (client *WebAppsClient) updateVnetConnectionGatewaySlotHandleResponse(resp // properties (PATCH). // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Name of the app. // - vnetName - Name of an existing Virtual Network. @@ -26274,18 +28693,25 @@ func (client *WebAppsClient) updateVnetConnectionGatewaySlotHandleResponse(resp // - options - WebAppsClientUpdateVnetConnectionSlotOptions contains the optional parameters for the WebAppsClient.UpdateVnetConnectionSlot // method. func (client *WebAppsClient) UpdateVnetConnectionSlot(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string, connectionEnvelope VnetInfoResource, options *WebAppsClientUpdateVnetConnectionSlotOptions) (WebAppsClientUpdateVnetConnectionSlotResponse, error) { + var err error + const operationName = "WebAppsClient.UpdateVnetConnectionSlot" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateVnetConnectionSlotCreateRequest(ctx, resourceGroupName, name, vnetName, slot, connectionEnvelope, options) if err != nil { return WebAppsClientUpdateVnetConnectionSlotResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebAppsClientUpdateVnetConnectionSlotResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebAppsClientUpdateVnetConnectionSlotResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebAppsClientUpdateVnetConnectionSlotResponse{}, err } - return client.updateVnetConnectionSlotHandleResponse(resp) + resp, err := client.updateVnetConnectionSlotHandleResponse(httpResp) + return resp, err } // updateVnetConnectionSlotCreateRequest creates the UpdateVnetConnectionSlot request. @@ -26316,10 +28742,13 @@ func (client *WebAppsClient) updateVnetConnectionSlotCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, connectionEnvelope) + if err := runtime.MarshalAsJSON(req, connectionEnvelope); err != nil { + return nil, err + } + return req, nil } // updateVnetConnectionSlotHandleResponse handles the UpdateVnetConnectionSlot response. diff --git a/sdk/resourcemanager/appservice/armappservice/webapps_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/webapps_client_example_test.go deleted file mode 100644 index 6e7f3d10393c..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/webapps_client_example_test.go +++ /dev/null @@ -1,4327 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappservice_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListWebApps.json -func ExampleWebAppsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWebAppsClient().NewListPager(nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.WebAppCollection = armappservice.WebAppCollection{ - // Value: []*armappservice.Site{ - // { - // Name: to.Ptr("sitef6141"), - // Type: to.Ptr("Microsoft.Web/sites"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141"), - // Kind: to.Ptr("app"), - // Location: to.Ptr("East US"), - // Properties: &armappservice.SiteProperties{ - // AvailabilityState: to.Ptr(armappservice.SiteAvailabilityStateNormal), - // ClientAffinityEnabled: to.Ptr(true), - // ClientCertEnabled: to.Ptr(false), - // ClientCertMode: to.Ptr(armappservice.ClientCertModeRequired), - // ContainerSize: to.Ptr[int32](0), - // CustomDomainVerificationID: to.Ptr("7F3BB652450EF7AD0B6AA33064586E4A9CE823A46DF0B2EC6443A68086E84153"), - // DailyMemoryTimeQuota: to.Ptr[int32](0), - // DefaultHostName: to.Ptr("sitef6141.azurewebsites.net"), - // Enabled: to.Ptr(true), - // EnabledHostNames: []*string{ - // to.Ptr("sitef6141.azurewebsites.net"), - // to.Ptr("sitef6141.scm.azurewebsites.net")}, - // HostNameSSLStates: []*armappservice.HostNameSSLState{ - // { - // Name: to.Ptr("sitef6141.azurewebsites.net"), - // HostType: to.Ptr(armappservice.HostTypeStandard), - // SSLState: to.Ptr(armappservice.SSLStateDisabled), - // }, - // { - // Name: to.Ptr("sitef6141.scm.azurewebsites.net"), - // HostType: to.Ptr(armappservice.HostTypeRepository), - // SSLState: to.Ptr(armappservice.SSLStateDisabled), - // }}, - // HostNames: []*string{ - // to.Ptr("sitef6141.azurewebsites.net")}, - // HostNamesDisabled: to.Ptr(false), - // HTTPSOnly: to.Ptr(false), - // HyperV: to.Ptr(false), - // IsXenon: to.Ptr(false), - // KeyVaultReferenceIdentity: to.Ptr("SystemAssigned"), - // LastModifiedTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-04T17:33:11.641Z"); return t}()), - // OutboundIPAddresses: to.Ptr("70.37.102.201,20.225.43.144"), - // PossibleOutboundIPAddresses: to.Ptr("70.37.102.201,20.225.43.144,20.225.184.122,20.225.184.188"), - // RedundancyMode: to.Ptr(armappservice.RedundancyModeNone), - // RepositorySiteName: to.Ptr("sitef6141"), - // Reserved: to.Ptr(false), - // ResourceGroup: to.Ptr("testrg123"), - // ScmSiteAlsoStopped: to.Ptr(false), - // ServerFarmID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp"), - // SiteConfig: &armappservice.SiteConfig{ - // AcrUseManagedIdentityCreds: to.Ptr(false), - // AlwaysOn: to.Ptr(false), - // AppCommandLine: to.Ptr(""), - // AutoHealEnabled: to.Ptr(false), - // AzureStorageAccounts: map[string]*armappservice.AzureStorageInfoValue{ - // }, - // DefaultDocuments: []*string{ - // to.Ptr("Default.htm"), - // to.Ptr("Default.html"), - // to.Ptr("Default.asp"), - // to.Ptr("index.htm"), - // to.Ptr("index.html"), - // to.Ptr("iisstart.htm"), - // to.Ptr("default.aspx"), - // to.Ptr("index.php"), - // to.Ptr("hostingstart.html")}, - // DetailedErrorLoggingEnabled: to.Ptr(false), - // FtpsState: to.Ptr(armappservice.FtpsStateAllAllowed), - // FunctionAppScaleLimit: to.Ptr[int32](0), - // FunctionsRuntimeScaleMonitoringEnabled: to.Ptr(false), - // Http20Enabled: to.Ptr(false), - // HTTPLoggingEnabled: to.Ptr(false), - // LinuxFxVersion: to.Ptr(""), - // LoadBalancing: to.Ptr(armappservice.SiteLoadBalancingLeastRequests), - // LogsDirectorySizeLimit: to.Ptr[int32](35), - // ManagedPipelineMode: to.Ptr(armappservice.ManagedPipelineModeIntegrated), - // MinTLSVersion: to.Ptr(armappservice.SupportedTLSVersionsOne2), - // MinimumElasticInstanceCount: to.Ptr[int32](0), - // NetFrameworkVersion: to.Ptr("v4.0"), - // NodeVersion: to.Ptr(""), - // NumberOfWorkers: to.Ptr[int32](1), - // PhpVersion: to.Ptr("5.6"), - // PowerShellVersion: to.Ptr(""), - // PythonVersion: to.Ptr(""), - // RemoteDebuggingEnabled: to.Ptr(false), - // RequestTracingEnabled: to.Ptr(false), - // ScmMinTLSVersion: to.Ptr(armappservice.SupportedTLSVersionsOne2), - // Use32BitWorkerProcess: to.Ptr(true), - // VirtualApplications: []*armappservice.VirtualApplication{ - // { - // PhysicalPath: to.Ptr("site\\wwwroot"), - // PreloadEnabled: to.Ptr(false), - // VirtualPath: to.Ptr("/"), - // }}, - // VnetName: to.Ptr(""), - // VnetPrivatePortsCount: to.Ptr[int32](0), - // VnetRouteAllEnabled: to.Ptr(false), - // WebSocketsEnabled: to.Ptr(false), - // }, - // State: to.Ptr("Running"), - // StorageAccountRequired: to.Ptr(false), - // UsageState: to.Ptr(armappservice.UsageStateNormal), - // VnetContentShareEnabled: to.Ptr(false), - // VnetImagePullEnabled: to.Ptr(false), - // VnetRouteAllEnabled: to.Ptr(false), - // }, - // }, - // { - // Name: to.Ptr("sitef7252"), - // Type: to.Ptr("Microsoft.Web/sites"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef7252"), - // Kind: to.Ptr("app"), - // Location: to.Ptr("East US"), - // Properties: &armappservice.SiteProperties{ - // AvailabilityState: to.Ptr(armappservice.SiteAvailabilityStateNormal), - // ClientAffinityEnabled: to.Ptr(true), - // ClientCertEnabled: to.Ptr(false), - // ClientCertMode: to.Ptr(armappservice.ClientCertModeRequired), - // ContainerSize: to.Ptr[int32](0), - // CustomDomainVerificationID: to.Ptr("7F3BB652450EF7AD0B6AA33064586E4A9CE823A46DF0B2EC6443A68086E84153"), - // DailyMemoryTimeQuota: to.Ptr[int32](0), - // DefaultHostName: to.Ptr("sitef7252.azurewebsites.net"), - // Enabled: to.Ptr(true), - // EnabledHostNames: []*string{ - // to.Ptr("sitef7252.azurewebsites.net"), - // to.Ptr("sitef7252.scm.azurewebsites.net")}, - // HostNameSSLStates: []*armappservice.HostNameSSLState{ - // { - // Name: to.Ptr("sitef7252.azurewebsites.net"), - // HostType: to.Ptr(armappservice.HostTypeStandard), - // SSLState: to.Ptr(armappservice.SSLStateDisabled), - // }, - // { - // Name: to.Ptr("sitef7252.scm.azurewebsites.net"), - // HostType: to.Ptr(armappservice.HostTypeRepository), - // SSLState: to.Ptr(armappservice.SSLStateDisabled), - // }}, - // HostNames: []*string{ - // to.Ptr("sitef7252.azurewebsites.net")}, - // HostNamesDisabled: to.Ptr(false), - // HTTPSOnly: to.Ptr(false), - // HyperV: to.Ptr(false), - // IsXenon: to.Ptr(false), - // KeyVaultReferenceIdentity: to.Ptr("SystemAssigned"), - // LastModifiedTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-04T17:33:11.641Z"); return t}()), - // OutboundIPAddresses: to.Ptr("70.37.102.201,20.225.43.144"), - // PossibleOutboundIPAddresses: to.Ptr("70.37.102.201,20.225.43.144,20.225.184.122,20.225.184.188"), - // RedundancyMode: to.Ptr(armappservice.RedundancyModeNone), - // RepositorySiteName: to.Ptr("sitef7252"), - // Reserved: to.Ptr(false), - // ResourceGroup: to.Ptr("testrg123"), - // ScmSiteAlsoStopped: to.Ptr(false), - // ServerFarmID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp"), - // SiteConfig: &armappservice.SiteConfig{ - // AcrUseManagedIdentityCreds: to.Ptr(false), - // AlwaysOn: to.Ptr(false), - // AppCommandLine: to.Ptr(""), - // AutoHealEnabled: to.Ptr(false), - // AzureStorageAccounts: map[string]*armappservice.AzureStorageInfoValue{ - // }, - // DefaultDocuments: []*string{ - // to.Ptr("Default.htm"), - // to.Ptr("Default.html"), - // to.Ptr("Default.asp"), - // to.Ptr("index.htm"), - // to.Ptr("index.html"), - // to.Ptr("iisstart.htm"), - // to.Ptr("default.aspx"), - // to.Ptr("index.php"), - // to.Ptr("hostingstart.html")}, - // DetailedErrorLoggingEnabled: to.Ptr(false), - // FtpsState: to.Ptr(armappservice.FtpsStateAllAllowed), - // FunctionAppScaleLimit: to.Ptr[int32](0), - // FunctionsRuntimeScaleMonitoringEnabled: to.Ptr(false), - // Http20Enabled: to.Ptr(false), - // HTTPLoggingEnabled: to.Ptr(false), - // LinuxFxVersion: to.Ptr(""), - // LoadBalancing: to.Ptr(armappservice.SiteLoadBalancingLeastRequests), - // LogsDirectorySizeLimit: to.Ptr[int32](35), - // ManagedPipelineMode: to.Ptr(armappservice.ManagedPipelineModeIntegrated), - // MinTLSVersion: to.Ptr(armappservice.SupportedTLSVersionsOne2), - // MinimumElasticInstanceCount: to.Ptr[int32](0), - // NetFrameworkVersion: to.Ptr("v4.0"), - // NodeVersion: to.Ptr(""), - // NumberOfWorkers: to.Ptr[int32](1), - // PhpVersion: to.Ptr("5.6"), - // PowerShellVersion: to.Ptr(""), - // PythonVersion: to.Ptr(""), - // RemoteDebuggingEnabled: to.Ptr(false), - // RequestTracingEnabled: to.Ptr(false), - // ScmMinTLSVersion: to.Ptr(armappservice.SupportedTLSVersionsOne2), - // Use32BitWorkerProcess: to.Ptr(true), - // VirtualApplications: []*armappservice.VirtualApplication{ - // { - // PhysicalPath: to.Ptr("site\\wwwroot"), - // PreloadEnabled: to.Ptr(false), - // VirtualPath: to.Ptr("/"), - // }}, - // VnetName: to.Ptr(""), - // VnetPrivatePortsCount: to.Ptr[int32](0), - // VnetRouteAllEnabled: to.Ptr(false), - // WebSocketsEnabled: to.Ptr(false), - // }, - // State: to.Ptr("Running"), - // StorageAccountRequired: to.Ptr(false), - // UsageState: to.Ptr(armappservice.UsageStateNormal), - // VnetContentShareEnabled: to.Ptr(false), - // VnetImagePullEnabled: to.Ptr(false), - // VnetRouteAllEnabled: to.Ptr(false), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListWebAppsByResourceGroup.json -func ExampleWebAppsClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWebAppsClient().NewListByResourceGroupPager("testrg123", &armappservice.WebAppsClientListByResourceGroupOptions{IncludeSlots: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.WebAppCollection = armappservice.WebAppCollection{ - // Value: []*armappservice.Site{ - // { - // Name: to.Ptr("sitef6141"), - // Type: to.Ptr("Microsoft.Web/sites"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141"), - // Kind: to.Ptr("app"), - // Location: to.Ptr("East US"), - // Properties: &armappservice.SiteProperties{ - // AvailabilityState: to.Ptr(armappservice.SiteAvailabilityStateNormal), - // ClientAffinityEnabled: to.Ptr(true), - // ClientCertEnabled: to.Ptr(false), - // ClientCertMode: to.Ptr(armappservice.ClientCertModeRequired), - // ContainerSize: to.Ptr[int32](0), - // CustomDomainVerificationID: to.Ptr("7F3BB652450EF7AD0B6AA33064586E4A9CE823A46DF0B2EC6443A68086E84153"), - // DailyMemoryTimeQuota: to.Ptr[int32](0), - // DefaultHostName: to.Ptr("sitef6141.azurewebsites.net"), - // Enabled: to.Ptr(true), - // EnabledHostNames: []*string{ - // to.Ptr("sitef6141.azurewebsites.net"), - // to.Ptr("sitef6141.scm.azurewebsites.net")}, - // HostNameSSLStates: []*armappservice.HostNameSSLState{ - // { - // Name: to.Ptr("sitef6141.azurewebsites.net"), - // HostType: to.Ptr(armappservice.HostTypeStandard), - // SSLState: to.Ptr(armappservice.SSLStateDisabled), - // }, - // { - // Name: to.Ptr("sitef6141.scm.azurewebsites.net"), - // HostType: to.Ptr(armappservice.HostTypeRepository), - // SSLState: to.Ptr(armappservice.SSLStateDisabled), - // }}, - // HostNames: []*string{ - // to.Ptr("sitef6141.azurewebsites.net")}, - // HostNamesDisabled: to.Ptr(false), - // HTTPSOnly: to.Ptr(false), - // HyperV: to.Ptr(false), - // IsXenon: to.Ptr(false), - // KeyVaultReferenceIdentity: to.Ptr("SystemAssigned"), - // LastModifiedTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-04T17:33:11.641Z"); return t}()), - // OutboundIPAddresses: to.Ptr("70.37.102.201,20.225.43.144"), - // PossibleOutboundIPAddresses: to.Ptr("70.37.102.201,20.225.43.144,20.225.184.122,20.225.184.188"), - // RedundancyMode: to.Ptr(armappservice.RedundancyModeNone), - // RepositorySiteName: to.Ptr("sitef6141"), - // Reserved: to.Ptr(false), - // ResourceGroup: to.Ptr("testrg123"), - // ScmSiteAlsoStopped: to.Ptr(false), - // ServerFarmID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp"), - // SiteConfig: &armappservice.SiteConfig{ - // AcrUseManagedIdentityCreds: to.Ptr(false), - // AlwaysOn: to.Ptr(false), - // AppCommandLine: to.Ptr(""), - // AutoHealEnabled: to.Ptr(false), - // AzureStorageAccounts: map[string]*armappservice.AzureStorageInfoValue{ - // }, - // DefaultDocuments: []*string{ - // to.Ptr("Default.htm"), - // to.Ptr("Default.html"), - // to.Ptr("Default.asp"), - // to.Ptr("index.htm"), - // to.Ptr("index.html"), - // to.Ptr("iisstart.htm"), - // to.Ptr("default.aspx"), - // to.Ptr("index.php"), - // to.Ptr("hostingstart.html")}, - // DetailedErrorLoggingEnabled: to.Ptr(false), - // FtpsState: to.Ptr(armappservice.FtpsStateAllAllowed), - // FunctionAppScaleLimit: to.Ptr[int32](0), - // FunctionsRuntimeScaleMonitoringEnabled: to.Ptr(false), - // Http20Enabled: to.Ptr(false), - // HTTPLoggingEnabled: to.Ptr(false), - // LinuxFxVersion: to.Ptr(""), - // LoadBalancing: to.Ptr(armappservice.SiteLoadBalancingLeastRequests), - // LogsDirectorySizeLimit: to.Ptr[int32](35), - // ManagedPipelineMode: to.Ptr(armappservice.ManagedPipelineModeIntegrated), - // MinTLSVersion: to.Ptr(armappservice.SupportedTLSVersionsOne2), - // MinimumElasticInstanceCount: to.Ptr[int32](0), - // NetFrameworkVersion: to.Ptr("v4.0"), - // NodeVersion: to.Ptr(""), - // NumberOfWorkers: to.Ptr[int32](1), - // PhpVersion: to.Ptr("5.6"), - // PowerShellVersion: to.Ptr(""), - // PythonVersion: to.Ptr(""), - // RemoteDebuggingEnabled: to.Ptr(false), - // RequestTracingEnabled: to.Ptr(false), - // ScmMinTLSVersion: to.Ptr(armappservice.SupportedTLSVersionsOne2), - // Use32BitWorkerProcess: to.Ptr(true), - // VirtualApplications: []*armappservice.VirtualApplication{ - // { - // PhysicalPath: to.Ptr("site\\wwwroot"), - // PreloadEnabled: to.Ptr(false), - // VirtualPath: to.Ptr("/"), - // }}, - // VnetName: to.Ptr(""), - // VnetPrivatePortsCount: to.Ptr[int32](0), - // VnetRouteAllEnabled: to.Ptr(false), - // WebSocketsEnabled: to.Ptr(false), - // }, - // State: to.Ptr("Running"), - // StorageAccountRequired: to.Ptr(false), - // UsageState: to.Ptr(armappservice.UsageStateNormal), - // VnetContentShareEnabled: to.Ptr(false), - // VnetImagePullEnabled: to.Ptr(false), - // VnetRouteAllEnabled: to.Ptr(false), - // }, - // }, - // { - // Name: to.Ptr("sitef7252"), - // Type: to.Ptr("Microsoft.Web/sites"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef7252"), - // Kind: to.Ptr("app"), - // Location: to.Ptr("East US"), - // Properties: &armappservice.SiteProperties{ - // AvailabilityState: to.Ptr(armappservice.SiteAvailabilityStateNormal), - // ClientAffinityEnabled: to.Ptr(true), - // ClientCertEnabled: to.Ptr(false), - // ClientCertMode: to.Ptr(armappservice.ClientCertModeRequired), - // ContainerSize: to.Ptr[int32](0), - // CustomDomainVerificationID: to.Ptr("7F3BB652450EF7AD0B6AA33064586E4A9CE823A46DF0B2EC6443A68086E84153"), - // DailyMemoryTimeQuota: to.Ptr[int32](0), - // DefaultHostName: to.Ptr("sitef7252.azurewebsites.net"), - // Enabled: to.Ptr(true), - // EnabledHostNames: []*string{ - // to.Ptr("sitef7252.azurewebsites.net"), - // to.Ptr("sitef7252.scm.azurewebsites.net")}, - // HostNameSSLStates: []*armappservice.HostNameSSLState{ - // { - // Name: to.Ptr("sitef7252.azurewebsites.net"), - // HostType: to.Ptr(armappservice.HostTypeStandard), - // SSLState: to.Ptr(armappservice.SSLStateDisabled), - // }, - // { - // Name: to.Ptr("sitef7252.scm.azurewebsites.net"), - // HostType: to.Ptr(armappservice.HostTypeRepository), - // SSLState: to.Ptr(armappservice.SSLStateDisabled), - // }}, - // HostNames: []*string{ - // to.Ptr("sitef7252.azurewebsites.net")}, - // HostNamesDisabled: to.Ptr(false), - // HTTPSOnly: to.Ptr(false), - // HyperV: to.Ptr(false), - // IsXenon: to.Ptr(false), - // KeyVaultReferenceIdentity: to.Ptr("SystemAssigned"), - // LastModifiedTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-04T17:33:11.641Z"); return t}()), - // OutboundIPAddresses: to.Ptr("70.37.102.201,20.225.43.144"), - // PossibleOutboundIPAddresses: to.Ptr("70.37.102.201,20.225.43.144,20.225.184.122,20.225.184.188"), - // RedundancyMode: to.Ptr(armappservice.RedundancyModeNone), - // RepositorySiteName: to.Ptr("sitef7252"), - // Reserved: to.Ptr(false), - // ResourceGroup: to.Ptr("testrg123"), - // ScmSiteAlsoStopped: to.Ptr(false), - // ServerFarmID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp"), - // SiteConfig: &armappservice.SiteConfig{ - // AcrUseManagedIdentityCreds: to.Ptr(false), - // AlwaysOn: to.Ptr(false), - // AppCommandLine: to.Ptr(""), - // AutoHealEnabled: to.Ptr(false), - // AzureStorageAccounts: map[string]*armappservice.AzureStorageInfoValue{ - // }, - // DefaultDocuments: []*string{ - // to.Ptr("Default.htm"), - // to.Ptr("Default.html"), - // to.Ptr("Default.asp"), - // to.Ptr("index.htm"), - // to.Ptr("index.html"), - // to.Ptr("iisstart.htm"), - // to.Ptr("default.aspx"), - // to.Ptr("index.php"), - // to.Ptr("hostingstart.html")}, - // DetailedErrorLoggingEnabled: to.Ptr(false), - // FtpsState: to.Ptr(armappservice.FtpsStateAllAllowed), - // FunctionAppScaleLimit: to.Ptr[int32](0), - // FunctionsRuntimeScaleMonitoringEnabled: to.Ptr(false), - // Http20Enabled: to.Ptr(false), - // HTTPLoggingEnabled: to.Ptr(false), - // LinuxFxVersion: to.Ptr(""), - // LoadBalancing: to.Ptr(armappservice.SiteLoadBalancingLeastRequests), - // LogsDirectorySizeLimit: to.Ptr[int32](35), - // ManagedPipelineMode: to.Ptr(armappservice.ManagedPipelineModeIntegrated), - // MinTLSVersion: to.Ptr(armappservice.SupportedTLSVersionsOne2), - // MinimumElasticInstanceCount: to.Ptr[int32](0), - // NetFrameworkVersion: to.Ptr("v4.0"), - // NodeVersion: to.Ptr(""), - // NumberOfWorkers: to.Ptr[int32](1), - // PhpVersion: to.Ptr("5.6"), - // PowerShellVersion: to.Ptr(""), - // PythonVersion: to.Ptr(""), - // RemoteDebuggingEnabled: to.Ptr(false), - // RequestTracingEnabled: to.Ptr(false), - // ScmMinTLSVersion: to.Ptr(armappservice.SupportedTLSVersionsOne2), - // Use32BitWorkerProcess: to.Ptr(true), - // VirtualApplications: []*armappservice.VirtualApplication{ - // { - // PhysicalPath: to.Ptr("site\\wwwroot"), - // PreloadEnabled: to.Ptr(false), - // VirtualPath: to.Ptr("/"), - // }}, - // VnetName: to.Ptr(""), - // VnetPrivatePortsCount: to.Ptr[int32](0), - // VnetRouteAllEnabled: to.Ptr(false), - // WebSocketsEnabled: to.Ptr(false), - // }, - // State: to.Ptr("Running"), - // StorageAccountRequired: to.Ptr(false), - // UsageState: to.Ptr(armappservice.UsageStateNormal), - // VnetContentShareEnabled: to.Ptr(false), - // VnetImagePullEnabled: to.Ptr(false), - // VnetRouteAllEnabled: to.Ptr(false), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetWebApp.json -func ExampleWebAppsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebAppsClient().Get(ctx, "testrg123", "sitef6141", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Site = armappservice.Site{ - // Name: to.Ptr("sitef6141"), - // Type: to.Ptr("Microsoft.Web/sites"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141"), - // Kind: to.Ptr("app"), - // Location: to.Ptr("East US"), - // Properties: &armappservice.SiteProperties{ - // AvailabilityState: to.Ptr(armappservice.SiteAvailabilityStateNormal), - // ClientAffinityEnabled: to.Ptr(true), - // ClientCertEnabled: to.Ptr(false), - // ClientCertMode: to.Ptr(armappservice.ClientCertModeRequired), - // ContainerSize: to.Ptr[int32](0), - // CustomDomainVerificationID: to.Ptr("7F3BB652450EF7AD0B6AA33064586E4A9CE823A46DF0B2EC6443A68086E84153"), - // DailyMemoryTimeQuota: to.Ptr[int32](0), - // DefaultHostName: to.Ptr("sitef6141.azurewebsites.net"), - // Enabled: to.Ptr(true), - // EnabledHostNames: []*string{ - // to.Ptr("sitef6141.azurewebsites.net"), - // to.Ptr("sitef6141.scm.azurewebsites.net")}, - // HostNameSSLStates: []*armappservice.HostNameSSLState{ - // { - // Name: to.Ptr("sitef6141.azurewebsites.net"), - // HostType: to.Ptr(armappservice.HostTypeStandard), - // SSLState: to.Ptr(armappservice.SSLStateDisabled), - // }, - // { - // Name: to.Ptr("sitef6141.scm.azurewebsites.net"), - // HostType: to.Ptr(armappservice.HostTypeRepository), - // SSLState: to.Ptr(armappservice.SSLStateDisabled), - // }}, - // HostNames: []*string{ - // to.Ptr("sitef6141.azurewebsites.net")}, - // HostNamesDisabled: to.Ptr(false), - // HTTPSOnly: to.Ptr(false), - // HyperV: to.Ptr(false), - // IsXenon: to.Ptr(false), - // KeyVaultReferenceIdentity: to.Ptr("SystemAssigned"), - // LastModifiedTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-04T17:33:11.641Z"); return t}()), - // OutboundIPAddresses: to.Ptr("70.37.102.201,20.225.43.144"), - // PossibleOutboundIPAddresses: to.Ptr("70.37.102.201,20.225.43.144,20.225.184.122,20.225.184.188"), - // RedundancyMode: to.Ptr(armappservice.RedundancyModeNone), - // RepositorySiteName: to.Ptr("sitef6141"), - // Reserved: to.Ptr(false), - // ResourceGroup: to.Ptr("testrg123"), - // ScmSiteAlsoStopped: to.Ptr(false), - // ServerFarmID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp"), - // SiteConfig: &armappservice.SiteConfig{ - // AcrUseManagedIdentityCreds: to.Ptr(false), - // AlwaysOn: to.Ptr(false), - // AppCommandLine: to.Ptr(""), - // AutoHealEnabled: to.Ptr(false), - // AzureStorageAccounts: map[string]*armappservice.AzureStorageInfoValue{ - // }, - // DefaultDocuments: []*string{ - // to.Ptr("Default.htm"), - // to.Ptr("Default.html"), - // to.Ptr("Default.asp"), - // to.Ptr("index.htm"), - // to.Ptr("index.html"), - // to.Ptr("iisstart.htm"), - // to.Ptr("default.aspx"), - // to.Ptr("index.php"), - // to.Ptr("hostingstart.html")}, - // DetailedErrorLoggingEnabled: to.Ptr(false), - // FtpsState: to.Ptr(armappservice.FtpsStateAllAllowed), - // FunctionAppScaleLimit: to.Ptr[int32](0), - // FunctionsRuntimeScaleMonitoringEnabled: to.Ptr(false), - // Http20Enabled: to.Ptr(false), - // HTTPLoggingEnabled: to.Ptr(false), - // LinuxFxVersion: to.Ptr(""), - // LoadBalancing: to.Ptr(armappservice.SiteLoadBalancingLeastRequests), - // LogsDirectorySizeLimit: to.Ptr[int32](35), - // ManagedPipelineMode: to.Ptr(armappservice.ManagedPipelineModeIntegrated), - // MinTLSVersion: to.Ptr(armappservice.SupportedTLSVersionsOne2), - // MinimumElasticInstanceCount: to.Ptr[int32](0), - // NetFrameworkVersion: to.Ptr("v4.0"), - // NodeVersion: to.Ptr(""), - // NumberOfWorkers: to.Ptr[int32](1), - // PhpVersion: to.Ptr("5.6"), - // PowerShellVersion: to.Ptr(""), - // PythonVersion: to.Ptr(""), - // RemoteDebuggingEnabled: to.Ptr(false), - // RequestTracingEnabled: to.Ptr(false), - // ScmMinTLSVersion: to.Ptr(armappservice.SupportedTLSVersionsOne2), - // Use32BitWorkerProcess: to.Ptr(true), - // VirtualApplications: []*armappservice.VirtualApplication{ - // { - // PhysicalPath: to.Ptr("site\\wwwroot"), - // PreloadEnabled: to.Ptr(false), - // VirtualPath: to.Ptr("/"), - // }}, - // VnetName: to.Ptr(""), - // VnetPrivatePortsCount: to.Ptr[int32](0), - // VnetRouteAllEnabled: to.Ptr(false), - // WebSocketsEnabled: to.Ptr(false), - // }, - // State: to.Ptr("Running"), - // StorageAccountRequired: to.Ptr(false), - // UsageState: to.Ptr(armappservice.UsageStateNormal), - // VnetContentShareEnabled: to.Ptr(false), - // VnetImagePullEnabled: to.Ptr(false), - // VnetRouteAllEnabled: to.Ptr(false), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/CloneWebApp.json -func ExampleWebAppsClient_BeginCreateOrUpdate_cloneWebApp() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewWebAppsClient().BeginCreateOrUpdate(ctx, "testrg123", "sitef6141", armappservice.Site{ - Kind: to.Ptr("app"), - Location: to.Ptr("East US"), - Properties: &armappservice.SiteProperties{ - CloningInfo: &armappservice.CloningInfo{ - AppSettingsOverrides: map[string]*string{ - "Setting1": to.Ptr("NewValue1"), - "Setting3": to.Ptr("NewValue5"), - }, - CloneCustomHostNames: to.Ptr(true), - CloneSourceControl: to.Ptr(true), - ConfigureLoadBalancing: to.Ptr(false), - HostingEnvironment: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg456/providers/Microsoft.Web/hostingenvironments/aseforsites"), - Overwrite: to.Ptr(false), - SourceWebAppID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg456/providers/Microsoft.Web/sites/srcsiteg478"), - SourceWebAppLocation: to.Ptr("West Europe"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Site = armappservice.Site{ - // Name: to.Ptr("sitef6141"), - // Type: to.Ptr("Microsoft.Web/sites"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141"), - // Kind: to.Ptr("app"), - // Location: to.Ptr("East US"), - // Properties: &armappservice.SiteProperties{ - // AvailabilityState: to.Ptr(armappservice.SiteAvailabilityStateNormal), - // ClientAffinityEnabled: to.Ptr(true), - // ClientCertEnabled: to.Ptr(false), - // ClientCertMode: to.Ptr(armappservice.ClientCertModeRequired), - // ContainerSize: to.Ptr[int32](0), - // CustomDomainVerificationID: to.Ptr("7F3BB652450EF7AD0B6AA33064586E4A9CE823A46DF0B2EC6443A68086E84153"), - // DailyMemoryTimeQuota: to.Ptr[int32](0), - // DefaultHostName: to.Ptr("sitef6141.azurewebsites.net"), - // Enabled: to.Ptr(true), - // EnabledHostNames: []*string{ - // to.Ptr("sitef6141.azurewebsites.net"), - // to.Ptr("sitef6141.scm.azurewebsites.net")}, - // HostNameSSLStates: []*armappservice.HostNameSSLState{ - // { - // Name: to.Ptr("sitef6141.azurewebsites.net"), - // HostType: to.Ptr(armappservice.HostTypeStandard), - // SSLState: to.Ptr(armappservice.SSLStateDisabled), - // }, - // { - // Name: to.Ptr("sitef6141.scm.azurewebsites.net"), - // HostType: to.Ptr(armappservice.HostTypeRepository), - // SSLState: to.Ptr(armappservice.SSLStateDisabled), - // }}, - // HostNames: []*string{ - // to.Ptr("sitef6141.azurewebsites.net")}, - // HostNamesDisabled: to.Ptr(false), - // HTTPSOnly: to.Ptr(false), - // HyperV: to.Ptr(false), - // IsXenon: to.Ptr(false), - // KeyVaultReferenceIdentity: to.Ptr("SystemAssigned"), - // LastModifiedTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-04T17:33:11.641Z"); return t}()), - // OutboundIPAddresses: to.Ptr("70.37.102.201,20.225.43.144"), - // PossibleOutboundIPAddresses: to.Ptr("70.37.102.201,20.225.43.144,20.225.184.122,20.225.184.188"), - // RedundancyMode: to.Ptr(armappservice.RedundancyModeNone), - // RepositorySiteName: to.Ptr("sitef6141"), - // Reserved: to.Ptr(false), - // ResourceGroup: to.Ptr("testrg123"), - // ScmSiteAlsoStopped: to.Ptr(false), - // ServerFarmID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp"), - // SiteConfig: &armappservice.SiteConfig{ - // AcrUseManagedIdentityCreds: to.Ptr(false), - // AlwaysOn: to.Ptr(false), - // AppCommandLine: to.Ptr(""), - // AutoHealEnabled: to.Ptr(false), - // AzureStorageAccounts: map[string]*armappservice.AzureStorageInfoValue{ - // }, - // DefaultDocuments: []*string{ - // to.Ptr("Default.htm"), - // to.Ptr("Default.html"), - // to.Ptr("Default.asp"), - // to.Ptr("index.htm"), - // to.Ptr("index.html"), - // to.Ptr("iisstart.htm"), - // to.Ptr("default.aspx"), - // to.Ptr("index.php"), - // to.Ptr("hostingstart.html")}, - // DetailedErrorLoggingEnabled: to.Ptr(false), - // FtpsState: to.Ptr(armappservice.FtpsStateAllAllowed), - // FunctionAppScaleLimit: to.Ptr[int32](0), - // FunctionsRuntimeScaleMonitoringEnabled: to.Ptr(false), - // Http20Enabled: to.Ptr(false), - // HTTPLoggingEnabled: to.Ptr(false), - // LinuxFxVersion: to.Ptr(""), - // LoadBalancing: to.Ptr(armappservice.SiteLoadBalancingLeastRequests), - // LogsDirectorySizeLimit: to.Ptr[int32](35), - // ManagedPipelineMode: to.Ptr(armappservice.ManagedPipelineModeIntegrated), - // MinTLSVersion: to.Ptr(armappservice.SupportedTLSVersionsOne2), - // MinimumElasticInstanceCount: to.Ptr[int32](0), - // NetFrameworkVersion: to.Ptr("v4.0"), - // NodeVersion: to.Ptr(""), - // NumberOfWorkers: to.Ptr[int32](1), - // PhpVersion: to.Ptr("5.6"), - // PowerShellVersion: to.Ptr(""), - // PythonVersion: to.Ptr(""), - // RemoteDebuggingEnabled: to.Ptr(false), - // RequestTracingEnabled: to.Ptr(false), - // ScmMinTLSVersion: to.Ptr(armappservice.SupportedTLSVersionsOne2), - // Use32BitWorkerProcess: to.Ptr(true), - // VirtualApplications: []*armappservice.VirtualApplication{ - // { - // PhysicalPath: to.Ptr("site\\wwwroot"), - // PreloadEnabled: to.Ptr(false), - // VirtualPath: to.Ptr("/"), - // }}, - // VnetName: to.Ptr(""), - // VnetPrivatePortsCount: to.Ptr[int32](0), - // VnetRouteAllEnabled: to.Ptr(false), - // WebSocketsEnabled: to.Ptr(false), - // }, - // State: to.Ptr("Running"), - // StorageAccountRequired: to.Ptr(false), - // UsageState: to.Ptr(armappservice.UsageStateNormal), - // VnetContentShareEnabled: to.Ptr(false), - // VnetImagePullEnabled: to.Ptr(false), - // VnetRouteAllEnabled: to.Ptr(false), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/CreateOrUpdateWebApp.json -func ExampleWebAppsClient_BeginCreateOrUpdate_createOrUpdateWebApp() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewWebAppsClient().BeginCreateOrUpdate(ctx, "testrg123", "sitef6141", armappservice.Site{ - Kind: to.Ptr("app"), - Location: to.Ptr("East US"), - Properties: &armappservice.SiteProperties{ - ServerFarmID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Site = armappservice.Site{ - // Name: to.Ptr("sitef6141"), - // Type: to.Ptr("Microsoft.Web/sites"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141"), - // Kind: to.Ptr("app"), - // Location: to.Ptr("East US"), - // Properties: &armappservice.SiteProperties{ - // AvailabilityState: to.Ptr(armappservice.SiteAvailabilityStateNormal), - // ClientAffinityEnabled: to.Ptr(true), - // ClientCertEnabled: to.Ptr(false), - // ClientCertMode: to.Ptr(armappservice.ClientCertModeRequired), - // ContainerSize: to.Ptr[int32](0), - // CustomDomainVerificationID: to.Ptr("7F3BB652450EF7AD0B6AA33064586E4A9CE823A46DF0B2EC6443A68086E84153"), - // DailyMemoryTimeQuota: to.Ptr[int32](0), - // DefaultHostName: to.Ptr("sitef6141.azurewebsites.net"), - // Enabled: to.Ptr(true), - // EnabledHostNames: []*string{ - // to.Ptr("sitef6141.azurewebsites.net"), - // to.Ptr("sitef6141.scm.azurewebsites.net")}, - // HostNameSSLStates: []*armappservice.HostNameSSLState{ - // { - // Name: to.Ptr("sitef6141.azurewebsites.net"), - // HostType: to.Ptr(armappservice.HostTypeStandard), - // SSLState: to.Ptr(armappservice.SSLStateDisabled), - // }, - // { - // Name: to.Ptr("sitef6141.scm.azurewebsites.net"), - // HostType: to.Ptr(armappservice.HostTypeRepository), - // SSLState: to.Ptr(armappservice.SSLStateDisabled), - // }}, - // HostNames: []*string{ - // to.Ptr("sitef6141.azurewebsites.net")}, - // HostNamesDisabled: to.Ptr(false), - // HTTPSOnly: to.Ptr(false), - // HyperV: to.Ptr(false), - // IsXenon: to.Ptr(false), - // KeyVaultReferenceIdentity: to.Ptr("SystemAssigned"), - // LastModifiedTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-04T17:33:11.641Z"); return t}()), - // OutboundIPAddresses: to.Ptr("70.37.102.201,20.225.43.144"), - // PossibleOutboundIPAddresses: to.Ptr("70.37.102.201,20.225.43.144,20.225.184.122,20.225.184.188"), - // RedundancyMode: to.Ptr(armappservice.RedundancyModeNone), - // RepositorySiteName: to.Ptr("sitef6141"), - // Reserved: to.Ptr(false), - // ResourceGroup: to.Ptr("testrg123"), - // ScmSiteAlsoStopped: to.Ptr(false), - // ServerFarmID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp"), - // SiteConfig: &armappservice.SiteConfig{ - // AcrUseManagedIdentityCreds: to.Ptr(false), - // AlwaysOn: to.Ptr(false), - // AppCommandLine: to.Ptr(""), - // AutoHealEnabled: to.Ptr(false), - // AzureStorageAccounts: map[string]*armappservice.AzureStorageInfoValue{ - // }, - // DefaultDocuments: []*string{ - // to.Ptr("Default.htm"), - // to.Ptr("Default.html"), - // to.Ptr("Default.asp"), - // to.Ptr("index.htm"), - // to.Ptr("index.html"), - // to.Ptr("iisstart.htm"), - // to.Ptr("default.aspx"), - // to.Ptr("index.php"), - // to.Ptr("hostingstart.html")}, - // DetailedErrorLoggingEnabled: to.Ptr(false), - // FtpsState: to.Ptr(armappservice.FtpsStateAllAllowed), - // FunctionAppScaleLimit: to.Ptr[int32](0), - // FunctionsRuntimeScaleMonitoringEnabled: to.Ptr(false), - // Http20Enabled: to.Ptr(false), - // HTTPLoggingEnabled: to.Ptr(false), - // LinuxFxVersion: to.Ptr(""), - // LoadBalancing: to.Ptr(armappservice.SiteLoadBalancingLeastRequests), - // LogsDirectorySizeLimit: to.Ptr[int32](35), - // ManagedPipelineMode: to.Ptr(armappservice.ManagedPipelineModeIntegrated), - // MinTLSVersion: to.Ptr(armappservice.SupportedTLSVersionsOne2), - // MinimumElasticInstanceCount: to.Ptr[int32](0), - // NetFrameworkVersion: to.Ptr("v4.0"), - // NodeVersion: to.Ptr(""), - // NumberOfWorkers: to.Ptr[int32](1), - // PhpVersion: to.Ptr("5.6"), - // PowerShellVersion: to.Ptr(""), - // PythonVersion: to.Ptr(""), - // RemoteDebuggingEnabled: to.Ptr(false), - // RequestTracingEnabled: to.Ptr(false), - // ScmMinTLSVersion: to.Ptr(armappservice.SupportedTLSVersionsOne2), - // Use32BitWorkerProcess: to.Ptr(true), - // VirtualApplications: []*armappservice.VirtualApplication{ - // { - // PhysicalPath: to.Ptr("site\\wwwroot"), - // PreloadEnabled: to.Ptr(false), - // VirtualPath: to.Ptr("/"), - // }}, - // VnetName: to.Ptr(""), - // VnetPrivatePortsCount: to.Ptr[int32](0), - // VnetRouteAllEnabled: to.Ptr(false), - // WebSocketsEnabled: to.Ptr(false), - // }, - // State: to.Ptr("Running"), - // StorageAccountRequired: to.Ptr(false), - // UsageState: to.Ptr(armappservice.UsageStateNormal), - // VnetContentShareEnabled: to.Ptr(false), - // VnetImagePullEnabled: to.Ptr(false), - // VnetRouteAllEnabled: to.Ptr(false), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/DeleteWebApp.json -func ExampleWebAppsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewWebAppsClient().Delete(ctx, "testrg123", "sitef6141", &armappservice.WebAppsClientDeleteOptions{DeleteMetrics: nil, - DeleteEmptyServerFarm: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/UpdateWebApp.json -func ExampleWebAppsClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebAppsClient().Update(ctx, "testrg123", "sitef6141", armappservice.SitePatchResource{ - Properties: &armappservice.SitePatchResourceProperties{ - ServerFarmID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Site = armappservice.Site{ - // Name: to.Ptr("sitef6141"), - // Type: to.Ptr("Microsoft.Web/sites"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141"), - // Kind: to.Ptr("app"), - // Location: to.Ptr("East US"), - // Properties: &armappservice.SiteProperties{ - // AvailabilityState: to.Ptr(armappservice.SiteAvailabilityStateNormal), - // ClientAffinityEnabled: to.Ptr(true), - // ClientCertEnabled: to.Ptr(false), - // ClientCertMode: to.Ptr(armappservice.ClientCertModeRequired), - // ContainerSize: to.Ptr[int32](0), - // CustomDomainVerificationID: to.Ptr("7F3BB652450EF7AD0B6AA33064586E4A9CE823A46DF0B2EC6443A68086E84153"), - // DailyMemoryTimeQuota: to.Ptr[int32](0), - // DefaultHostName: to.Ptr("sitef6141.azurewebsites.net"), - // Enabled: to.Ptr(true), - // EnabledHostNames: []*string{ - // to.Ptr("sitef6141.azurewebsites.net"), - // to.Ptr("sitef6141.scm.azurewebsites.net")}, - // HostNameSSLStates: []*armappservice.HostNameSSLState{ - // { - // Name: to.Ptr("sitef6141.azurewebsites.net"), - // HostType: to.Ptr(armappservice.HostTypeStandard), - // SSLState: to.Ptr(armappservice.SSLStateDisabled), - // }, - // { - // Name: to.Ptr("sitef6141.scm.azurewebsites.net"), - // HostType: to.Ptr(armappservice.HostTypeRepository), - // SSLState: to.Ptr(armappservice.SSLStateDisabled), - // }}, - // HostNames: []*string{ - // to.Ptr("sitef6141.azurewebsites.net")}, - // HostNamesDisabled: to.Ptr(false), - // HTTPSOnly: to.Ptr(false), - // HyperV: to.Ptr(false), - // IsXenon: to.Ptr(false), - // KeyVaultReferenceIdentity: to.Ptr("SystemAssigned"), - // LastModifiedTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-04T17:33:11.641Z"); return t}()), - // OutboundIPAddresses: to.Ptr("70.37.102.201,20.225.43.144"), - // PossibleOutboundIPAddresses: to.Ptr("70.37.102.201,20.225.43.144,20.225.184.122,20.225.184.188"), - // RedundancyMode: to.Ptr(armappservice.RedundancyModeNone), - // RepositorySiteName: to.Ptr("sitef6141"), - // Reserved: to.Ptr(false), - // ResourceGroup: to.Ptr("testrg123"), - // ScmSiteAlsoStopped: to.Ptr(false), - // ServerFarmID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp"), - // SiteConfig: &armappservice.SiteConfig{ - // AcrUseManagedIdentityCreds: to.Ptr(false), - // AlwaysOn: to.Ptr(false), - // AppCommandLine: to.Ptr(""), - // AutoHealEnabled: to.Ptr(false), - // AzureStorageAccounts: map[string]*armappservice.AzureStorageInfoValue{ - // }, - // DefaultDocuments: []*string{ - // to.Ptr("Default.htm"), - // to.Ptr("Default.html"), - // to.Ptr("Default.asp"), - // to.Ptr("index.htm"), - // to.Ptr("index.html"), - // to.Ptr("iisstart.htm"), - // to.Ptr("default.aspx"), - // to.Ptr("index.php"), - // to.Ptr("hostingstart.html")}, - // DetailedErrorLoggingEnabled: to.Ptr(false), - // FtpsState: to.Ptr(armappservice.FtpsStateAllAllowed), - // FunctionAppScaleLimit: to.Ptr[int32](0), - // FunctionsRuntimeScaleMonitoringEnabled: to.Ptr(false), - // Http20Enabled: to.Ptr(false), - // HTTPLoggingEnabled: to.Ptr(false), - // LinuxFxVersion: to.Ptr(""), - // LoadBalancing: to.Ptr(armappservice.SiteLoadBalancingLeastRequests), - // LogsDirectorySizeLimit: to.Ptr[int32](35), - // ManagedPipelineMode: to.Ptr(armappservice.ManagedPipelineModeIntegrated), - // MinTLSVersion: to.Ptr(armappservice.SupportedTLSVersionsOne2), - // MinimumElasticInstanceCount: to.Ptr[int32](0), - // NetFrameworkVersion: to.Ptr("v4.0"), - // NodeVersion: to.Ptr(""), - // NumberOfWorkers: to.Ptr[int32](1), - // PhpVersion: to.Ptr("5.6"), - // PowerShellVersion: to.Ptr(""), - // PythonVersion: to.Ptr(""), - // RemoteDebuggingEnabled: to.Ptr(false), - // RequestTracingEnabled: to.Ptr(false), - // ScmMinTLSVersion: to.Ptr(armappservice.SupportedTLSVersionsOne2), - // Use32BitWorkerProcess: to.Ptr(true), - // VirtualApplications: []*armappservice.VirtualApplication{ - // { - // PhysicalPath: to.Ptr("site\\wwwroot"), - // PreloadEnabled: to.Ptr(false), - // VirtualPath: to.Ptr("/"), - // }}, - // VnetName: to.Ptr(""), - // VnetPrivatePortsCount: to.Ptr[int32](0), - // VnetRouteAllEnabled: to.Ptr(false), - // WebSocketsEnabled: to.Ptr(false), - // }, - // State: to.Ptr("Running"), - // StorageAccountRequired: to.Ptr(false), - // UsageState: to.Ptr(armappservice.UsageStateNormal), - // VnetContentShareEnabled: to.Ptr(false), - // VnetImagePullEnabled: to.Ptr(false), - // VnetRouteAllEnabled: to.Ptr(false), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AnalyzeCustomHostName.json -func ExampleWebAppsClient_AnalyzeCustomHostname() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebAppsClient().AnalyzeCustomHostname(ctx, "testrg123", "sitef6141", &armappservice.WebAppsClientAnalyzeCustomHostnameOptions{HostName: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CustomHostnameAnalysisResult = armappservice.CustomHostnameAnalysisResult{ - // Name: to.Ptr("sitef6141"), - // Type: to.Ptr("Microsoft.Web/sites"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141"), - // Properties: &armappservice.CustomHostnameAnalysisResultProperties{ - // CNameRecords: []*string{ - // to.Ptr("siteog.azurewebsites.net")}, - // ConflictingAppResourceID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/siteog"), - // CustomDomainVerificationFailureInfo: &armappservice.ErrorEntity{ - // Code: to.Ptr("07198"), - // Message: to.Ptr("Custom domain verification failed on conflicting CNAMEs."), - // }, - // CustomDomainVerificationTest: to.Ptr(armappservice.DNSVerificationTestResultPassed), - // HasConflictAcrossSubscription: to.Ptr(true), - // HasConflictOnScaleUnit: to.Ptr(false), - // IsHostnameAlreadyVerified: to.Ptr(true), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ApplySlotConfig.json -func ExampleWebAppsClient_ApplySlotConfigToProduction() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewWebAppsClient().ApplySlotConfigToProduction(ctx, "testrg123", "sitef6141", armappservice.CsmSlotEntity{ - PreserveVnet: to.Ptr(true), - TargetSlot: to.Ptr("staging"), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/BackupWebApp.json -func ExampleWebAppsClient_Backup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebAppsClient().Backup(ctx, "testrg123", "sitef6141", armappservice.BackupRequest{ - Properties: &armappservice.BackupRequestProperties{ - BackupName: to.Ptr("abcdwe"), - BackupSchedule: &armappservice.BackupSchedule{ - FrequencyInterval: to.Ptr[int32](7), - FrequencyUnit: to.Ptr(armappservice.FrequencyUnitDay), - KeepAtLeastOneBackup: to.Ptr(true), - RetentionPeriodInDays: to.Ptr[int32](30), - StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-02T17:33:11.641Z"); return t }()), - }, - Databases: []*armappservice.DatabaseBackupSetting{ - { - Name: to.Ptr("backenddb"), - ConnectionString: to.Ptr("DSN=data-source-name[;SERVER=value] [;PWD=value] [;UID=value] [;=]"), - ConnectionStringName: to.Ptr("backend"), - DatabaseType: to.Ptr(armappservice.DatabaseTypeSQLAzure), - }, - { - Name: to.Ptr("statsdb"), - ConnectionString: to.Ptr("DSN=data-source-name[;SERVER=value] [;PWD=value] [;UID=value] [;=]"), - ConnectionStringName: to.Ptr("stats"), - DatabaseType: to.Ptr(armappservice.DatabaseTypeSQLAzure), - }}, - Enabled: to.Ptr(true), - StorageAccountURL: to.Ptr("DefaultEndpointsProtocol=https;AccountName=storagesample;AccountKey="), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.BackupItem = armappservice.BackupItem{ - // Name: to.Ptr("sitef6141"), - // Type: to.Ptr("Microsoft.Web/sites"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141"), - // Properties: &armappservice.BackupItemProperties{ - // Name: to.Ptr("sitef6141_2022-09-01"), - // BlobName: to.Ptr("sitef6141_2022-09-01"), - // Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-03T17:33:11.641Z"); return t}()), - // Databases: []*armappservice.DatabaseBackupSetting{ - // { - // Name: to.Ptr("backenddb"), - // ConnectionString: to.Ptr("DSN=data-source-name[;SERVER=value] [;PWD=value] [;UID=value] [;=]"), - // ConnectionStringName: to.Ptr("backend"), - // DatabaseType: to.Ptr(armappservice.DatabaseTypeSQLAzure), - // }, - // { - // Name: to.Ptr("statsdb"), - // ConnectionString: to.Ptr("DSN=data-source-name[;SERVER=value] [;PWD=value] [;UID=value] [;=]"), - // ConnectionStringName: to.Ptr("stats"), - // DatabaseType: to.Ptr(armappservice.DatabaseTypeSQLAzure), - // }}, - // FinishedTimeStamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-02T17:33:11.641Z"); return t}()), - // BackupID: to.Ptr[int32](12345), - // LastRestoreTimeStamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-04T17:33:11.641Z"); return t}()), - // Log: to.Ptr("Succeeded"), - // Scheduled: to.Ptr(true), - // SizeInBytes: to.Ptr[int64](56091883), - // Status: to.Ptr(armappservice.BackupItemStatusInProgress), - // StorageAccountURL: to.Ptr("DefaultEndpointsProtocol=https;AccountName=storagesample;AccountKey="), - // WebsiteSizeInBytes: to.Ptr[int64](56091883), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListWebAppBackups.json -func ExampleWebAppsClient_NewListBackupsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWebAppsClient().NewListBackupsPager("testrg123", "sitef6141", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.BackupItemCollection = armappservice.BackupItemCollection{ - // Value: []*armappservice.BackupItem{ - // { - // Name: to.Ptr("sitef6141"), - // Type: to.Ptr("Microsoft.Web/sites"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141/backups/12345"), - // Properties: &armappservice.BackupItemProperties{ - // Name: to.Ptr("sitef6141_2022-09-01"), - // BlobName: to.Ptr("sitef6141_2022-09-01"), - // Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-03T17:33:11.641Z"); return t}()), - // Databases: []*armappservice.DatabaseBackupSetting{ - // { - // Name: to.Ptr("backenddb"), - // ConnectionString: to.Ptr("DSN=data-source-name[;SERVER=value] [;PWD=value] [;UID=value] [;=]"), - // ConnectionStringName: to.Ptr("backend"), - // DatabaseType: to.Ptr(armappservice.DatabaseTypeSQLAzure), - // }, - // { - // Name: to.Ptr("statsdb"), - // ConnectionString: to.Ptr("DSN=data-source-name[;SERVER=value] [;PWD=value] [;UID=value] [;=]"), - // ConnectionStringName: to.Ptr("stats"), - // DatabaseType: to.Ptr(armappservice.DatabaseTypeSQLAzure), - // }}, - // FinishedTimeStamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-05T17:33:11.641Z"); return t}()), - // BackupID: to.Ptr[int32](12345), - // LastRestoreTimeStamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-04T17:33:11.641Z"); return t}()), - // Log: to.Ptr("Succeeded"), - // Scheduled: to.Ptr(true), - // SizeInBytes: to.Ptr[int64](56091883), - // Status: to.Ptr(armappservice.BackupItemStatusInProgress), - // StorageAccountURL: to.Ptr("DefaultEndpointsProtocol=https;AccountName=storagesample;AccountKey="), - // WebsiteSizeInBytes: to.Ptr[int64](56091883), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetWebAppBackup.json -func ExampleWebAppsClient_GetBackupStatus() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebAppsClient().GetBackupStatus(ctx, "testrg123", "sitef6141", "12345", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.BackupItem = armappservice.BackupItem{ - // Name: to.Ptr("sitef6141"), - // Type: to.Ptr("Microsoft.Web/sites"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141/backups/12345"), - // Properties: &armappservice.BackupItemProperties{ - // Name: to.Ptr("sitef6141_2022-09-01"), - // BlobName: to.Ptr("sitef6141_2022-09-01"), - // Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-03T17:33:11.641Z"); return t}()), - // Databases: []*armappservice.DatabaseBackupSetting{ - // { - // Name: to.Ptr("backenddb"), - // ConnectionString: to.Ptr("DSN=data-source-name[;SERVER=value] [;PWD=value] [;UID=value] [;=]"), - // ConnectionStringName: to.Ptr("backend"), - // DatabaseType: to.Ptr(armappservice.DatabaseTypeSQLAzure), - // }, - // { - // Name: to.Ptr("statsdb"), - // ConnectionString: to.Ptr("DSN=data-source-name[;SERVER=value] [;PWD=value] [;UID=value] [;=]"), - // ConnectionStringName: to.Ptr("stats"), - // DatabaseType: to.Ptr(armappservice.DatabaseTypeSQLAzure), - // }}, - // FinishedTimeStamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-05T17:33:11.641Z"); return t}()), - // BackupID: to.Ptr[int32](12345), - // LastRestoreTimeStamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-04T17:33:11.641Z"); return t}()), - // Log: to.Ptr("Succeeded"), - // Scheduled: to.Ptr(true), - // SizeInBytes: to.Ptr[int64](56091883), - // Status: to.Ptr(armappservice.BackupItemStatusInProgress), - // StorageAccountURL: to.Ptr("DefaultEndpointsProtocol=https;AccountName=storagesample;AccountKey="), - // WebsiteSizeInBytes: to.Ptr[int64](56091883), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/DeleteWebAppBackup.json -func ExampleWebAppsClient_DeleteBackup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewWebAppsClient().DeleteBackup(ctx, "testrg123", "sitef6141", "12345", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetWebAppBackupWithSecrets.json -func ExampleWebAppsClient_ListBackupStatusSecrets() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebAppsClient().ListBackupStatusSecrets(ctx, "testrg123", "sitef6141", "12345", armappservice.BackupRequest{ - Properties: &armappservice.BackupRequestProperties{ - BackupName: to.Ptr("abcdwe"), - BackupSchedule: &armappservice.BackupSchedule{ - FrequencyInterval: to.Ptr[int32](7), - FrequencyUnit: to.Ptr(armappservice.FrequencyUnitDay), - KeepAtLeastOneBackup: to.Ptr(true), - RetentionPeriodInDays: to.Ptr[int32](30), - StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-02T17:33:11.641Z"); return t }()), - }, - Databases: []*armappservice.DatabaseBackupSetting{ - { - Name: to.Ptr("backenddb"), - ConnectionString: to.Ptr("DSN=data-source-name[;SERVER=value] [;PWD=value] [;UID=value] [;=]"), - ConnectionStringName: to.Ptr("backend"), - DatabaseType: to.Ptr(armappservice.DatabaseTypeSQLAzure), - }, - { - Name: to.Ptr("statsdb"), - ConnectionString: to.Ptr("DSN=data-source-name[;SERVER=value] [;PWD=value] [;UID=value] [;=]"), - ConnectionStringName: to.Ptr("stats"), - DatabaseType: to.Ptr(armappservice.DatabaseTypeSQLAzure), - }}, - Enabled: to.Ptr(true), - StorageAccountURL: to.Ptr("DefaultEndpointsProtocol=https;AccountName=storagesample;AccountKey="), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.BackupItem = armappservice.BackupItem{ - // Name: to.Ptr("sitef6141"), - // Type: to.Ptr("Microsoft.Web/sites"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141/backups/12345"), - // Properties: &armappservice.BackupItemProperties{ - // Name: to.Ptr("sitef6141_2022-09-01"), - // BlobName: to.Ptr("sitef6141_2022-09-01"), - // Created: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-03T17:33:11.641Z"); return t}()), - // Databases: []*armappservice.DatabaseBackupSetting{ - // { - // Name: to.Ptr("backenddb"), - // ConnectionString: to.Ptr("DSN=data-source-name[;SERVER=value] [;PWD=value] [;UID=value] [;=]"), - // ConnectionStringName: to.Ptr("backend"), - // DatabaseType: to.Ptr(armappservice.DatabaseTypeSQLAzure), - // }, - // { - // Name: to.Ptr("statsdb"), - // ConnectionString: to.Ptr("DSN=data-source-name[;SERVER=value] [;PWD=value] [;UID=value] [;=]"), - // ConnectionStringName: to.Ptr("stats"), - // DatabaseType: to.Ptr(armappservice.DatabaseTypeSQLAzure), - // }}, - // FinishedTimeStamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-05T17:33:11.641Z"); return t}()), - // BackupID: to.Ptr[int32](12345), - // LastRestoreTimeStamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-04T17:33:11.641Z"); return t}()), - // Log: to.Ptr("Succeeded"), - // Scheduled: to.Ptr(true), - // SizeInBytes: to.Ptr[int64](56091883), - // Status: to.Ptr(armappservice.BackupItemStatusInProgress), - // StorageAccountURL: to.Ptr("DefaultEndpointsProtocol=https;AccountName=storagesample;AccountKey="), - // WebsiteSizeInBytes: to.Ptr[int64](56091883), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/RestoreWebAppBackup.json -func ExampleWebAppsClient_BeginRestore() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewWebAppsClient().BeginRestore(ctx, "testrg123", "sitef6141", "123244", armappservice.RestoreRequest{ - Properties: &armappservice.RestoreRequestProperties{ - Databases: []*armappservice.DatabaseBackupSetting{ - { - Name: to.Ptr("backenddb"), - ConnectionString: to.Ptr("DSN=data-source-name[;SERVER=value] [;PWD=value] [;UID=value] [;=]"), - ConnectionStringName: to.Ptr("backend"), - DatabaseType: to.Ptr(armappservice.DatabaseTypeSQLAzure), - }, - { - Name: to.Ptr("statsdb"), - ConnectionString: to.Ptr("DSN=data-source-name[;SERVER=value] [;PWD=value] [;UID=value] [;=]"), - ConnectionStringName: to.Ptr("stats"), - DatabaseType: to.Ptr(armappservice.DatabaseTypeSQLAzure), - }}, - Overwrite: to.Ptr(true), - SiteName: to.Ptr("sitef6141"), - StorageAccountURL: to.Ptr("DefaultEndpointsProtocol=https;AccountName=storagesample;AccountKey="), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListPublishingCredentialsPolicies.json -func ExampleWebAppsClient_NewListBasicPublishingCredentialsPoliciesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWebAppsClient().NewListBasicPublishingCredentialsPoliciesPager("testrg123", "testsite", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.PublishingCredentialsPoliciesCollection = armappservice.PublishingCredentialsPoliciesCollection{ - // Value: []*armappservice.CsmPublishingCredentialsPoliciesEntity{ - // { - // Name: to.Ptr("ftp"), - // Type: to.Ptr("Microsoft.Web/sites/basicPublishingCredentialsPolicies"), - // ID: to.Ptr("/subscriptions/3fb8d758-2e2c-42e9-a528-a8acdfe87237/resourceGroups/testrg123/providers/Microsoft.Web/sites/testsite/basicPublishingCredentialsPolicies/ftp"), - // Properties: &armappservice.CsmPublishingCredentialsPoliciesEntityProperties{ - // Allow: to.Ptr(true), - // }, - // }, - // { - // Name: to.Ptr("scm"), - // Type: to.Ptr("Microsoft.Web/sites/basicPublishingCredentialsPolicies"), - // ID: to.Ptr("/subscriptions/3fb8d758-2e2c-42e9-a528-a8acdfe87237/resourceGroups/testrg123/providers/Microsoft.Web/sites/testsite/basicPublishingCredentialsPolicies/scm"), - // Properties: &armappservice.CsmPublishingCredentialsPoliciesEntityProperties{ - // Allow: to.Ptr(true), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetPublishingCredentialsPolicy.json -func ExampleWebAppsClient_GetFtpAllowed() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebAppsClient().GetFtpAllowed(ctx, "rg", "testSite", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CsmPublishingCredentialsPoliciesEntity = armappservice.CsmPublishingCredentialsPoliciesEntity{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/sites/testSite/basicPublishingCredentialsPolicies/ftp"), - // Properties: &armappservice.CsmPublishingCredentialsPoliciesEntityProperties{ - // Allow: to.Ptr(false), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/UpdatePublishingCredentialsPolicy.json -func ExampleWebAppsClient_UpdateFtpAllowed() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebAppsClient().UpdateFtpAllowed(ctx, "rg", "testSite", armappservice.CsmPublishingCredentialsPoliciesEntity{ - Properties: &armappservice.CsmPublishingCredentialsPoliciesEntityProperties{ - Allow: to.Ptr(true), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CsmPublishingCredentialsPoliciesEntity = armappservice.CsmPublishingCredentialsPoliciesEntity{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/sites/testSite/basicPublishingCredentialsPolicies/ftp"), - // Properties: &armappservice.CsmPublishingCredentialsPoliciesEntityProperties{ - // Allow: to.Ptr(true), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListWebAppConfigurations.json -func ExampleWebAppsClient_NewListConfigurationsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWebAppsClient().NewListConfigurationsPager("testrg123", "sitef6141", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.SiteConfigResourceCollection = armappservice.SiteConfigResourceCollection{ - // Value: []*armappservice.SiteConfigResource{ - // { - // Name: to.Ptr("web"), - // Type: to.Ptr("Microsoft.Web/sites/config"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141/config/web"), - // Kind: to.Ptr("app"), - // Properties: &armappservice.SiteConfig{ - // AcrUseManagedIdentityCreds: to.Ptr(false), - // AlwaysOn: to.Ptr(false), - // AppCommandLine: to.Ptr(""), - // AutoHealEnabled: to.Ptr(false), - // AzureStorageAccounts: map[string]*armappservice.AzureStorageInfoValue{ - // }, - // DefaultDocuments: []*string{ - // to.Ptr("Default.htm"), - // to.Ptr("Default.html"), - // to.Ptr("Default.asp"), - // to.Ptr("index.htm"), - // to.Ptr("index.html"), - // to.Ptr("iisstart.htm"), - // to.Ptr("default.aspx"), - // to.Ptr("index.php"), - // to.Ptr("hostingstart.html")}, - // DetailedErrorLoggingEnabled: to.Ptr(false), - // FtpsState: to.Ptr(armappservice.FtpsStateAllAllowed), - // FunctionAppScaleLimit: to.Ptr[int32](0), - // FunctionsRuntimeScaleMonitoringEnabled: to.Ptr(false), - // Http20Enabled: to.Ptr(false), - // HTTPLoggingEnabled: to.Ptr(false), - // LinuxFxVersion: to.Ptr(""), - // LoadBalancing: to.Ptr(armappservice.SiteLoadBalancingLeastRequests), - // LogsDirectorySizeLimit: to.Ptr[int32](35), - // ManagedPipelineMode: to.Ptr(armappservice.ManagedPipelineModeIntegrated), - // MinTLSVersion: to.Ptr(armappservice.SupportedTLSVersionsOne2), - // MinimumElasticInstanceCount: to.Ptr[int32](0), - // NetFrameworkVersion: to.Ptr("v4.0"), - // NodeVersion: to.Ptr(""), - // NumberOfWorkers: to.Ptr[int32](1), - // PhpVersion: to.Ptr("5.6"), - // PowerShellVersion: to.Ptr(""), - // PythonVersion: to.Ptr(""), - // RemoteDebuggingEnabled: to.Ptr(false), - // RequestTracingEnabled: to.Ptr(false), - // ScmMinTLSVersion: to.Ptr(armappservice.SupportedTLSVersionsOne2), - // Use32BitWorkerProcess: to.Ptr(true), - // VirtualApplications: []*armappservice.VirtualApplication{ - // { - // PhysicalPath: to.Ptr("site\\wwwroot"), - // PreloadEnabled: to.Ptr(false), - // VirtualPath: to.Ptr("/"), - // }}, - // VnetName: to.Ptr(""), - // VnetPrivatePortsCount: to.Ptr[int32](0), - // VnetRouteAllEnabled: to.Ptr(false), - // WebSocketsEnabled: to.Ptr(false), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/UpdateAppSettings.json -func ExampleWebAppsClient_UpdateApplicationSettings() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebAppsClient().UpdateApplicationSettings(ctx, "testrg123", "sitef6141", armappservice.StringDictionary{ - Properties: map[string]*string{ - "Setting1": to.Ptr("Value1"), - "Setting2": to.Ptr("Value2"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.StringDictionary = armappservice.StringDictionary{ - // Name: to.Ptr("appsettings"), - // Type: to.Ptr("Microsoft.Web/sites/config"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141/config/appsettings"), - // Kind: to.Ptr("app"), - // Properties: map[string]*string{ - // "Setting1": to.Ptr("Value1"), - // "Setting2": to.Ptr("Value2"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListAppSettings.json -func ExampleWebAppsClient_ListApplicationSettings() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebAppsClient().ListApplicationSettings(ctx, "testrg123", "sitef6141", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.StringDictionary = armappservice.StringDictionary{ - // Name: to.Ptr("appsettings"), - // Type: to.Ptr("Microsoft.Web/sites/config"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141/config/appsettings"), - // Kind: to.Ptr("app"), - // Properties: map[string]*string{ - // "Setting1": to.Ptr("Value1"), - // "Setting2": to.Ptr("Value2"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/UpdateAuthSettings.json -func ExampleWebAppsClient_UpdateAuthSettings() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebAppsClient().UpdateAuthSettings(ctx, "testrg123", "sitef6141", armappservice.SiteAuthSettings{ - Properties: &armappservice.SiteAuthSettingsProperties{ - AllowedExternalRedirectUrls: []*string{ - to.Ptr("sitef6141.customdomain.net"), - to.Ptr("sitef6141.customdomain.info")}, - ClientID: to.Ptr("42d795a9-8abb-4d06-8534-39528af40f8e.apps.googleusercontent.com"), - DefaultProvider: to.Ptr(armappservice.BuiltInAuthenticationProviderGoogle), - Enabled: to.Ptr(true), - RuntimeVersion: to.Ptr("~1"), - TokenRefreshExtensionHours: to.Ptr[float64](120), - TokenStoreEnabled: to.Ptr(true), - UnauthenticatedClientAction: to.Ptr(armappservice.UnauthenticatedClientActionRedirectToLoginPage), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SiteAuthSettings = armappservice.SiteAuthSettings{ - // Name: to.Ptr("authsettings"), - // Type: to.Ptr("Microsoft.Web/sites/authsettings"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141/config/authsettings"), - // Kind: to.Ptr("app"), - // Properties: &armappservice.SiteAuthSettingsProperties{ - // AllowedExternalRedirectUrls: []*string{ - // to.Ptr("sitef6141.customdomain.net"), - // to.Ptr("sitef6141.customdomain.info")}, - // ClientID: to.Ptr("42d795a9-8abb-4d06-8534-39528af40f8e.apps.googleusercontent.com"), - // DefaultProvider: to.Ptr(armappservice.BuiltInAuthenticationProviderGoogle), - // Enabled: to.Ptr(true), - // RuntimeVersion: to.Ptr("~1"), - // TokenRefreshExtensionHours: to.Ptr[float64](120), - // TokenStoreEnabled: to.Ptr(true), - // UnauthenticatedClientAction: to.Ptr(armappservice.UnauthenticatedClientActionRedirectToLoginPage), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListAuthSettings.json -func ExampleWebAppsClient_GetAuthSettings() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebAppsClient().GetAuthSettings(ctx, "testrg123", "sitef6141", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SiteAuthSettings = armappservice.SiteAuthSettings{ - // Name: to.Ptr("authsettings"), - // Type: to.Ptr("Microsoft.Web/sites/authsettings"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141/config/authsettings"), - // Kind: to.Ptr("app"), - // Properties: &armappservice.SiteAuthSettingsProperties{ - // AllowedExternalRedirectUrls: []*string{ - // to.Ptr("sitef6141.customdomain.net"), - // to.Ptr("sitef6141.customdomain.info")}, - // ClientID: to.Ptr("42d795a9-8abb-4d06-8534-39528af40f8e.apps.googleusercontent.com"), - // DefaultProvider: to.Ptr(armappservice.BuiltInAuthenticationProviderGoogle), - // Enabled: to.Ptr(true), - // RuntimeVersion: to.Ptr("~1"), - // TokenRefreshExtensionHours: to.Ptr[float64](120), - // TokenStoreEnabled: to.Ptr(true), - // UnauthenticatedClientAction: to.Ptr(armappservice.UnauthenticatedClientActionRedirectToLoginPage), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetAuthSettingsV2WithoutSecrets.json -func ExampleWebAppsClient_GetAuthSettingsV2WithoutSecrets() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebAppsClient().GetAuthSettingsV2WithoutSecrets(ctx, "testrg123", "sitef6141", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SiteAuthSettingsV2 = armappservice.SiteAuthSettingsV2{ - // Name: to.Ptr("authsettingsv2"), - // Type: to.Ptr("Microsoft.Web/sites/authsettingsv2"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141/config/authsettingsv2"), - // Kind: to.Ptr("app"), - // Properties: &armappservice.SiteAuthSettingsV2Properties{ - // GlobalValidation: &armappservice.GlobalValidation{ - // ExcludedPaths: []*string{ - // to.Ptr("/nosecrets/Path")}, - // RequireAuthentication: to.Ptr(true), - // UnauthenticatedClientAction: to.Ptr(armappservice.UnauthenticatedClientActionV2Return403), - // }, - // HTTPSettings: &armappservice.HTTPSettings{ - // ForwardProxy: &armappservice.ForwardProxy{ - // Convention: to.Ptr(armappservice.ForwardProxyConventionStandard), - // CustomHostHeaderName: to.Ptr("authHeader"), - // CustomProtoHeaderName: to.Ptr("customProtoHeader"), - // }, - // RequireHTTPS: to.Ptr(true), - // Routes: &armappservice.HTTPSettingsRoutes{ - // APIPrefix: to.Ptr("/authv2/"), - // }, - // }, - // IdentityProviders: &armappservice.IdentityProviders{ - // Google: &armappservice.Google{ - // Enabled: to.Ptr(true), - // Login: &armappservice.LoginScopes{ - // Scopes: []*string{ - // to.Ptr("admin")}, - // }, - // Registration: &armappservice.ClientRegistration{ - // ClientID: to.Ptr("42d795a9-8abb-4d06-8534-39528af40f8e.apps.googleusercontent.com"), - // ClientSecretSettingName: to.Ptr("ClientSecret"), - // }, - // Validation: &armappservice.AllowedAudiencesValidation{ - // AllowedAudiences: []*string{ - // to.Ptr("https://example.com")}, - // }, - // }, - // }, - // Login: &armappservice.Login{ - // AllowedExternalRedirectUrls: []*string{ - // to.Ptr("https://someurl.com")}, - // CookieExpiration: &armappservice.CookieExpiration{ - // Convention: to.Ptr(armappservice.CookieExpirationConventionIdentityProviderDerived), - // TimeToExpiration: to.Ptr("2022:09-01T00:00Z"), - // }, - // Nonce: &armappservice.Nonce{ - // ValidateNonce: to.Ptr(true), - // }, - // PreserveURLFragmentsForLogins: to.Ptr(true), - // Routes: &armappservice.LoginRoutes{ - // LogoutEndpoint: to.Ptr("https://app.com/logout"), - // }, - // TokenStore: &armappservice.TokenStore{ - // Enabled: to.Ptr(true), - // FileSystem: &armappservice.FileSystemTokenStore{ - // Directory: to.Ptr("/wwwroot/sites/example"), - // }, - // TokenRefreshExtensionHours: to.Ptr[float64](96), - // }, - // }, - // Platform: &armappservice.AuthPlatform{ - // ConfigFilePath: to.Ptr("/auth/config.json"), - // Enabled: to.Ptr(true), - // RuntimeVersion: to.Ptr("~1"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/UpdateAuthSettingsV2.json -func ExampleWebAppsClient_UpdateAuthSettingsV2() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebAppsClient().UpdateAuthSettingsV2(ctx, "testrg123", "sitef6141", armappservice.SiteAuthSettingsV2{ - Properties: &armappservice.SiteAuthSettingsV2Properties{ - GlobalValidation: &armappservice.GlobalValidation{ - ExcludedPaths: []*string{ - to.Ptr("/nosecrets/Path")}, - RequireAuthentication: to.Ptr(true), - UnauthenticatedClientAction: to.Ptr(armappservice.UnauthenticatedClientActionV2Return403), - }, - HTTPSettings: &armappservice.HTTPSettings{ - ForwardProxy: &armappservice.ForwardProxy{ - Convention: to.Ptr(armappservice.ForwardProxyConventionStandard), - CustomHostHeaderName: to.Ptr("authHeader"), - CustomProtoHeaderName: to.Ptr("customProtoHeader"), - }, - RequireHTTPS: to.Ptr(true), - Routes: &armappservice.HTTPSettingsRoutes{ - APIPrefix: to.Ptr("/authv2/"), - }, - }, - IdentityProviders: &armappservice.IdentityProviders{ - Google: &armappservice.Google{ - Enabled: to.Ptr(true), - Login: &armappservice.LoginScopes{ - Scopes: []*string{ - to.Ptr("admin")}, - }, - Registration: &armappservice.ClientRegistration{ - ClientID: to.Ptr("42d795a9-8abb-4d06-8534-39528af40f8e.apps.googleusercontent.com"), - ClientSecretSettingName: to.Ptr("ClientSecret"), - }, - Validation: &armappservice.AllowedAudiencesValidation{ - AllowedAudiences: []*string{ - to.Ptr("https://example.com")}, - }, - }, - }, - Login: &armappservice.Login{ - AllowedExternalRedirectUrls: []*string{ - to.Ptr("https://someurl.com")}, - CookieExpiration: &armappservice.CookieExpiration{ - Convention: to.Ptr(armappservice.CookieExpirationConventionIdentityProviderDerived), - TimeToExpiration: to.Ptr("2022:09-01T00:00Z"), - }, - Nonce: &armappservice.Nonce{ - ValidateNonce: to.Ptr(true), - }, - PreserveURLFragmentsForLogins: to.Ptr(true), - Routes: &armappservice.LoginRoutes{ - LogoutEndpoint: to.Ptr("https://app.com/logout"), - }, - TokenStore: &armappservice.TokenStore{ - Enabled: to.Ptr(true), - FileSystem: &armappservice.FileSystemTokenStore{ - Directory: to.Ptr("/wwwroot/sites/example"), - }, - TokenRefreshExtensionHours: to.Ptr[float64](96), - }, - }, - Platform: &armappservice.AuthPlatform{ - ConfigFilePath: to.Ptr("/auth/config.json"), - Enabled: to.Ptr(true), - RuntimeVersion: to.Ptr("~1"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SiteAuthSettingsV2 = armappservice.SiteAuthSettingsV2{ - // Name: to.Ptr("authsettingsv2"), - // Type: to.Ptr("Microsoft.Web/sites/authsettingsv2"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141/config/authsettingsv2"), - // Kind: to.Ptr("app"), - // Properties: &armappservice.SiteAuthSettingsV2Properties{ - // GlobalValidation: &armappservice.GlobalValidation{ - // ExcludedPaths: []*string{ - // to.Ptr("/nosecrets/Path")}, - // RequireAuthentication: to.Ptr(true), - // UnauthenticatedClientAction: to.Ptr(armappservice.UnauthenticatedClientActionV2Return403), - // }, - // HTTPSettings: &armappservice.HTTPSettings{ - // ForwardProxy: &armappservice.ForwardProxy{ - // Convention: to.Ptr(armappservice.ForwardProxyConventionStandard), - // CustomHostHeaderName: to.Ptr("authHeader"), - // CustomProtoHeaderName: to.Ptr("customProtoHeader"), - // }, - // RequireHTTPS: to.Ptr(true), - // Routes: &armappservice.HTTPSettingsRoutes{ - // APIPrefix: to.Ptr("/authv2/"), - // }, - // }, - // IdentityProviders: &armappservice.IdentityProviders{ - // Google: &armappservice.Google{ - // Enabled: to.Ptr(true), - // Login: &armappservice.LoginScopes{ - // Scopes: []*string{ - // to.Ptr("admin")}, - // }, - // Registration: &armappservice.ClientRegistration{ - // ClientID: to.Ptr("42d795a9-8abb-4d06-8534-39528af40f8e.apps.googleusercontent.com"), - // ClientSecretSettingName: to.Ptr("ClientSecret"), - // }, - // Validation: &armappservice.AllowedAudiencesValidation{ - // AllowedAudiences: []*string{ - // to.Ptr("https://example.com")}, - // }, - // }, - // }, - // Login: &armappservice.Login{ - // AllowedExternalRedirectUrls: []*string{ - // to.Ptr("https://someurl.com")}, - // CookieExpiration: &armappservice.CookieExpiration{ - // Convention: to.Ptr(armappservice.CookieExpirationConventionIdentityProviderDerived), - // TimeToExpiration: to.Ptr("2022:09-01T00:00Z"), - // }, - // Nonce: &armappservice.Nonce{ - // ValidateNonce: to.Ptr(true), - // }, - // PreserveURLFragmentsForLogins: to.Ptr(true), - // Routes: &armappservice.LoginRoutes{ - // LogoutEndpoint: to.Ptr("https://app.com/logout"), - // }, - // TokenStore: &armappservice.TokenStore{ - // Enabled: to.Ptr(true), - // FileSystem: &armappservice.FileSystemTokenStore{ - // Directory: to.Ptr("/wwwroot/sites/example"), - // }, - // TokenRefreshExtensionHours: to.Ptr[float64](96), - // }, - // }, - // Platform: &armappservice.AuthPlatform{ - // ConfigFilePath: to.Ptr("/auth/config.json"), - // Enabled: to.Ptr(true), - // RuntimeVersion: to.Ptr("~1"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListAuthSettingsV2.json -func ExampleWebAppsClient_GetAuthSettingsV2() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebAppsClient().GetAuthSettingsV2(ctx, "testrg123", "sitef6141", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SiteAuthSettingsV2 = armappservice.SiteAuthSettingsV2{ - // Name: to.Ptr("authsettingsv2"), - // Type: to.Ptr("Microsoft.Web/sites/authsettingsv2"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141/config/authsettingsv2"), - // Kind: to.Ptr("app"), - // Properties: &armappservice.SiteAuthSettingsV2Properties{ - // GlobalValidation: &armappservice.GlobalValidation{ - // ExcludedPaths: []*string{ - // to.Ptr("/nosecrets/Path")}, - // RequireAuthentication: to.Ptr(true), - // UnauthenticatedClientAction: to.Ptr(armappservice.UnauthenticatedClientActionV2Return403), - // }, - // HTTPSettings: &armappservice.HTTPSettings{ - // ForwardProxy: &armappservice.ForwardProxy{ - // Convention: to.Ptr(armappservice.ForwardProxyConventionStandard), - // CustomHostHeaderName: to.Ptr("authHeader"), - // CustomProtoHeaderName: to.Ptr("customProtoHeader"), - // }, - // RequireHTTPS: to.Ptr(true), - // Routes: &armappservice.HTTPSettingsRoutes{ - // APIPrefix: to.Ptr("/authv2/"), - // }, - // }, - // IdentityProviders: &armappservice.IdentityProviders{ - // Google: &armappservice.Google{ - // Enabled: to.Ptr(true), - // Login: &armappservice.LoginScopes{ - // Scopes: []*string{ - // to.Ptr("admin")}, - // }, - // Registration: &armappservice.ClientRegistration{ - // ClientID: to.Ptr("42d795a9-8abb-4d06-8534-39528af40f8e.apps.googleusercontent.com"), - // ClientSecretSettingName: to.Ptr("ClientSecret"), - // }, - // Validation: &armappservice.AllowedAudiencesValidation{ - // AllowedAudiences: []*string{ - // to.Ptr("https://example.com")}, - // }, - // }, - // }, - // Login: &armappservice.Login{ - // AllowedExternalRedirectUrls: []*string{ - // to.Ptr("https://someurl.com")}, - // CookieExpiration: &armappservice.CookieExpiration{ - // Convention: to.Ptr(armappservice.CookieExpirationConventionIdentityProviderDerived), - // TimeToExpiration: to.Ptr("2022:09-01T00:00Z"), - // }, - // Nonce: &armappservice.Nonce{ - // ValidateNonce: to.Ptr(true), - // }, - // PreserveURLFragmentsForLogins: to.Ptr(true), - // Routes: &armappservice.LoginRoutes{ - // LogoutEndpoint: to.Ptr("https://app.com/logout"), - // }, - // TokenStore: &armappservice.TokenStore{ - // Enabled: to.Ptr(true), - // FileSystem: &armappservice.FileSystemTokenStore{ - // Directory: to.Ptr("/wwwroot/sites/example"), - // }, - // TokenRefreshExtensionHours: to.Ptr[float64](96), - // }, - // }, - // Platform: &armappservice.AuthPlatform{ - // ConfigFilePath: to.Ptr("/auth/config.json"), - // Enabled: to.Ptr(true), - // RuntimeVersion: to.Ptr("~1"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/UpdateAzureStorageAccounts.json -func ExampleWebAppsClient_UpdateAzureStorageAccounts() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebAppsClient().UpdateAzureStorageAccounts(ctx, "testrg123", "sitef6141", armappservice.AzureStoragePropertyDictionaryResource{ - Properties: map[string]*armappservice.AzureStorageInfoValue{ - "account1": { - Type: to.Ptr(armappservice.AzureStorageTypeAzureFiles), - AccessKey: to.Ptr("26515^%@#*"), - AccountName: to.Ptr("testsa"), - MountPath: to.Ptr("/mounts/a/files"), - ShareName: to.Ptr("web"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.AzureStoragePropertyDictionaryResource = armappservice.AzureStoragePropertyDictionaryResource{ - // Name: to.Ptr("web"), - // Type: to.Ptr("Microsoft.Web/sites/config"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141/config/web"), - // Kind: to.Ptr("app"), - // Properties: map[string]*armappservice.AzureStorageInfoValue{ - // "account1": &armappservice.AzureStorageInfoValue{ - // Type: to.Ptr(armappservice.AzureStorageTypeAzureFiles), - // AccountName: to.Ptr("testsa"), - // MountPath: to.Ptr("/mounts/a/files"), - // ShareName: to.Ptr("web"), - // State: to.Ptr(armappservice.AzureStorageStateOk), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetKeyVaultReferencesForAppSettings.json -func ExampleWebAppsClient_NewGetAppSettingsKeyVaultReferencesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWebAppsClient().NewGetAppSettingsKeyVaultReferencesPager("testrg123", "testc6282", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.APIKVReferenceCollection = armappservice.APIKVReferenceCollection{ - // Value: []*armappservice.APIKVReference{ - // { - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/testc6282/config/configreferences/appsettings/secretName"), - // Properties: &armappservice.APIKVReferenceProperties{ - // SecretName: to.Ptr("secretName"), - // SecretVersion: to.Ptr("secretVersion"), - // VaultName: to.Ptr("keyVaultName"), - // }, - // }, - // { - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/testc6282/config/configreferences/appsettings/secretName2"), - // Properties: &armappservice.APIKVReferenceProperties{ - // SecretName: to.Ptr("secretName2"), - // SecretVersion: to.Ptr("secretVersion2"), - // VaultName: to.Ptr("keyVaultName"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetKeyVaultReferencesForAppSetting.json -func ExampleWebAppsClient_GetAppSettingKeyVaultReference() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebAppsClient().GetAppSettingKeyVaultReference(ctx, "testrg123", "testc6282", "setting", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.APIKVReference = armappservice.APIKVReference{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/testc6282/config/configreferences/appsettings/setting"), - // Properties: &armappservice.APIKVReferenceProperties{ - // SecretName: to.Ptr("secretName"), - // SecretVersion: to.Ptr("secretVersion"), - // VaultName: to.Ptr("keyVaultName"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetSiteConfig.json -func ExampleWebAppsClient_GetConfiguration() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebAppsClient().GetConfiguration(ctx, "testrg123", "sitef6141", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SiteConfigResource = armappservice.SiteConfigResource{ - // Name: to.Ptr("web"), - // Type: to.Ptr("Microsoft.Web/sites/config"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141/config/web"), - // Kind: to.Ptr("app"), - // Properties: &armappservice.SiteConfig{ - // AcrUseManagedIdentityCreds: to.Ptr(false), - // AlwaysOn: to.Ptr(false), - // AppCommandLine: to.Ptr(""), - // AutoHealEnabled: to.Ptr(false), - // AzureStorageAccounts: map[string]*armappservice.AzureStorageInfoValue{ - // }, - // DefaultDocuments: []*string{ - // to.Ptr("Default.htm"), - // to.Ptr("Default.html"), - // to.Ptr("Default.asp"), - // to.Ptr("index.htm"), - // to.Ptr("index.html"), - // to.Ptr("iisstart.htm"), - // to.Ptr("default.aspx"), - // to.Ptr("index.php"), - // to.Ptr("hostingstart.html")}, - // DetailedErrorLoggingEnabled: to.Ptr(false), - // FtpsState: to.Ptr(armappservice.FtpsStateAllAllowed), - // FunctionAppScaleLimit: to.Ptr[int32](0), - // FunctionsRuntimeScaleMonitoringEnabled: to.Ptr(false), - // Http20Enabled: to.Ptr(false), - // HTTPLoggingEnabled: to.Ptr(false), - // LinuxFxVersion: to.Ptr(""), - // LoadBalancing: to.Ptr(armappservice.SiteLoadBalancingLeastRequests), - // LogsDirectorySizeLimit: to.Ptr[int32](35), - // ManagedPipelineMode: to.Ptr(armappservice.ManagedPipelineModeIntegrated), - // MinTLSVersion: to.Ptr(armappservice.SupportedTLSVersionsOne2), - // MinimumElasticInstanceCount: to.Ptr[int32](0), - // NetFrameworkVersion: to.Ptr("v4.0"), - // NodeVersion: to.Ptr(""), - // NumberOfWorkers: to.Ptr[int32](1), - // PhpVersion: to.Ptr("5.6"), - // PowerShellVersion: to.Ptr(""), - // PythonVersion: to.Ptr(""), - // RemoteDebuggingEnabled: to.Ptr(false), - // RequestTracingEnabled: to.Ptr(false), - // ScmMinTLSVersion: to.Ptr(armappservice.SupportedTLSVersionsOne2), - // Use32BitWorkerProcess: to.Ptr(true), - // VirtualApplications: []*armappservice.VirtualApplication{ - // { - // PhysicalPath: to.Ptr("site\\wwwroot"), - // PreloadEnabled: to.Ptr(false), - // VirtualPath: to.Ptr("/"), - // }}, - // VnetName: to.Ptr(""), - // VnetPrivatePortsCount: to.Ptr[int32](0), - // VnetRouteAllEnabled: to.Ptr(false), - // WebSocketsEnabled: to.Ptr(false), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/UpdateSiteConfig.json -func ExampleWebAppsClient_CreateOrUpdateConfiguration() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebAppsClient().CreateOrUpdateConfiguration(ctx, "testrg123", "sitef6141", armappservice.SiteConfigResource{ - Properties: &armappservice.SiteConfig{ - AcrUseManagedIdentityCreds: to.Ptr(false), - AlwaysOn: to.Ptr(false), - AppCommandLine: to.Ptr(""), - AutoHealEnabled: to.Ptr(false), - AzureStorageAccounts: map[string]*armappservice.AzureStorageInfoValue{}, - DefaultDocuments: []*string{ - to.Ptr("Default.htm"), - to.Ptr("Default.html"), - to.Ptr("Default.asp"), - to.Ptr("index.htm"), - to.Ptr("index.html"), - to.Ptr("iisstart.htm"), - to.Ptr("default.aspx"), - to.Ptr("index.php"), - to.Ptr("hostingstart.html")}, - DetailedErrorLoggingEnabled: to.Ptr(false), - FtpsState: to.Ptr(armappservice.FtpsStateAllAllowed), - FunctionAppScaleLimit: to.Ptr[int32](0), - FunctionsRuntimeScaleMonitoringEnabled: to.Ptr(false), - Http20Enabled: to.Ptr(false), - HTTPLoggingEnabled: to.Ptr(false), - LinuxFxVersion: to.Ptr(""), - LoadBalancing: to.Ptr(armappservice.SiteLoadBalancingLeastRequests), - LogsDirectorySizeLimit: to.Ptr[int32](35), - ManagedPipelineMode: to.Ptr(armappservice.ManagedPipelineModeIntegrated), - MinTLSVersion: to.Ptr(armappservice.SupportedTLSVersionsOne2), - MinimumElasticInstanceCount: to.Ptr[int32](0), - NetFrameworkVersion: to.Ptr("v4.0"), - NodeVersion: to.Ptr(""), - NumberOfWorkers: to.Ptr[int32](1), - PhpVersion: to.Ptr("5.6"), - PowerShellVersion: to.Ptr(""), - PythonVersion: to.Ptr(""), - RemoteDebuggingEnabled: to.Ptr(false), - RequestTracingEnabled: to.Ptr(false), - ScmMinTLSVersion: to.Ptr(armappservice.SupportedTLSVersionsOne2), - Use32BitWorkerProcess: to.Ptr(true), - VirtualApplications: []*armappservice.VirtualApplication{ - { - PhysicalPath: to.Ptr("site\\wwwroot"), - PreloadEnabled: to.Ptr(false), - VirtualPath: to.Ptr("/"), - }}, - VnetName: to.Ptr(""), - VnetPrivatePortsCount: to.Ptr[int32](0), - VnetRouteAllEnabled: to.Ptr(false), - WebSocketsEnabled: to.Ptr(false), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.SiteConfigResource = armappservice.SiteConfigResource{ - // Name: to.Ptr("web"), - // Type: to.Ptr("Microsoft.Web/sites/config"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141/config/web"), - // Kind: to.Ptr("app"), - // Properties: &armappservice.SiteConfig{ - // AcrUseManagedIdentityCreds: to.Ptr(false), - // AlwaysOn: to.Ptr(false), - // AppCommandLine: to.Ptr(""), - // AutoHealEnabled: to.Ptr(false), - // AzureStorageAccounts: map[string]*armappservice.AzureStorageInfoValue{ - // }, - // DefaultDocuments: []*string{ - // to.Ptr("Default.htm"), - // to.Ptr("Default.html"), - // to.Ptr("Default.asp"), - // to.Ptr("index.htm"), - // to.Ptr("index.html"), - // to.Ptr("iisstart.htm"), - // to.Ptr("default.aspx"), - // to.Ptr("index.php"), - // to.Ptr("hostingstart.html")}, - // DetailedErrorLoggingEnabled: to.Ptr(false), - // FtpsState: to.Ptr(armappservice.FtpsStateAllAllowed), - // FunctionAppScaleLimit: to.Ptr[int32](0), - // FunctionsRuntimeScaleMonitoringEnabled: to.Ptr(false), - // Http20Enabled: to.Ptr(false), - // HTTPLoggingEnabled: to.Ptr(false), - // LinuxFxVersion: to.Ptr(""), - // LoadBalancing: to.Ptr(armappservice.SiteLoadBalancingLeastRequests), - // LogsDirectorySizeLimit: to.Ptr[int32](35), - // ManagedPipelineMode: to.Ptr(armappservice.ManagedPipelineModeIntegrated), - // MinTLSVersion: to.Ptr(armappservice.SupportedTLSVersionsOne2), - // MinimumElasticInstanceCount: to.Ptr[int32](0), - // NetFrameworkVersion: to.Ptr("v4.0"), - // NodeVersion: to.Ptr(""), - // NumberOfWorkers: to.Ptr[int32](1), - // PhpVersion: to.Ptr("5.6"), - // PowerShellVersion: to.Ptr(""), - // PythonVersion: to.Ptr(""), - // RemoteDebuggingEnabled: to.Ptr(false), - // RequestTracingEnabled: to.Ptr(false), - // ScmMinTLSVersion: to.Ptr(armappservice.SupportedTLSVersionsOne2), - // Use32BitWorkerProcess: to.Ptr(true), - // VirtualApplications: []*armappservice.VirtualApplication{ - // { - // PhysicalPath: to.Ptr("site\\wwwroot"), - // PreloadEnabled: to.Ptr(false), - // VirtualPath: to.Ptr("/"), - // }}, - // VnetName: to.Ptr(""), - // VnetPrivatePortsCount: to.Ptr[int32](0), - // VnetRouteAllEnabled: to.Ptr(false), - // WebSocketsEnabled: to.Ptr(false), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListSiteDeploymentStatus.json -func ExampleWebAppsClient_NewListProductionSiteDeploymentStatusesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWebAppsClient().NewListProductionSiteDeploymentStatusesPager("rg", "testSite", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.CsmDeploymentStatusCollection = armappservice.CsmDeploymentStatusCollection{ - // Value: []*armappservice.CsmDeploymentStatus{ - // }, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetSiteDeploymentStatus.json -func ExampleWebAppsClient_BeginGetProductionSiteDeploymentStatus() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewWebAppsClient().BeginGetProductionSiteDeploymentStatus(ctx, "rg", "testSite", "eacfd68b-3bbd-4ad9-99c5-98614d89c8e5", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CsmDeploymentStatus = armappservice.CsmDeploymentStatus{ - // Name: to.Ptr("eacfd68b-3bbd-4ad9-99c5-98614d89c8e5"), - // Type: to.Ptr("Microsoft.Web/sites/deploymentStatus"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/sites/testSite/deploymentStatus/eacfd68b-3bbd-4ad9-99c5-98614d89c8e5"), - // Properties: &armappservice.CsmDeploymentStatusProperties{ - // DeploymentID: to.Ptr("eacfd68b-3bbd-4ad9-99c5-98614d89c8e5"), - // FailedInstancesLogs: []*string{ - // }, - // NumberOfInstancesFailed: to.Ptr[int32](0), - // NumberOfInstancesInProgress: to.Ptr[int32](0), - // NumberOfInstancesSuccessful: to.Ptr[int32](1), - // Status: to.Ptr(armappservice.DeploymentBuildStatusRuntimeSuccessful), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetSiteInstanceInfo.json -func ExampleWebAppsClient_GetInstanceInfo() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebAppsClient().GetInstanceInfo(ctx, "testrg123", "tests346", "134987120", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.WebSiteInstanceStatus = armappservice.WebSiteInstanceStatus{ - // Name: to.Ptr("134987120"), - // Type: to.Ptr("Microsoft.Web/sites/instances"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/tests346/slot/staging/instances/134987120"), - // Properties: &armappservice.WebSiteInstanceStatusProperties{ - // Containers: map[string]*armappservice.ContainerInfo{ - // "c1": &armappservice.ContainerInfo{ - // CurrentTimeStamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2013-10-21T13:28:06.419Z"); return t}()), - // }, - // }, - // DetectorURL: to.Ptr("testsec579"), - // State: to.Ptr(armappservice.SiteRuntimeStateREADY), - // StatusURL: to.Ptr("https://sampleurl"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListSlotBackups.json -func ExampleWebAppsClient_NewListSiteBackupsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWebAppsClient().NewListSiteBackupsPager("testrg123", "tests346", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.BackupItemCollection = armappservice.BackupItemCollection{ - // Value: []*armappservice.BackupItem{ - // { - // Name: to.Ptr("tests346/staging"), - // Type: to.Ptr("Microsoft.Web/sites/slots"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/tests346/slot/staging"), - // Properties: &armappservice.BackupItemProperties{ - // BlobName: to.Ptr("blob1"), - // Status: to.Ptr(armappservice.BackupItemStatusInProgress), - // StorageAccountURL: to.Ptr("https://blobstorage.windows.net"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetWebSiteNetworkTraceOperation.json -func ExampleWebAppsClient_GetNetworkTraceOperation() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebAppsClient().GetNetworkTraceOperation(ctx, "testrg123", "SampleApp", "c291433b-53ad-4c49-8cae-0a293eae1c6d", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.NetworkTraceArray = []*armappservice.NetworkTrace{ - // { - // Path: to.Ptr("D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_02_01T00_00_00.zip"), - // Message: to.Ptr("Trace file has been saved as D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_02_01T00_00_00.zip"), - // Status: to.Ptr("Succeeded"), - // }} -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/StartWebSiteNetworkTraceOperation.json -func ExampleWebAppsClient_BeginStartWebSiteNetworkTraceOperation() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewWebAppsClient().BeginStartWebSiteNetworkTraceOperation(ctx, "testrg123", "SampleApp", &armappservice.WebAppsClientBeginStartWebSiteNetworkTraceOperationOptions{DurationInSeconds: to.Ptr[int32](60), - MaxFrameLength: nil, - SasURL: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.NetworkTraceArray = []*armappservice.NetworkTrace{ - // { - // Path: to.Ptr("D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_02_01T00_00_00.zip"), - // Message: to.Ptr("Trace file has been saved as D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_02_01T00_00_00.zip"), - // Status: to.Ptr("Succeeded"), - // }} -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/StopWebSiteNetworkTrace.json -func ExampleWebAppsClient_StopWebSiteNetworkTrace() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewWebAppsClient().StopWebSiteNetworkTrace(ctx, "testrg123", "SampleApp", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetWebSiteNetworkTraces.json -func ExampleWebAppsClient_GetNetworkTraces() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebAppsClient().GetNetworkTraces(ctx, "testrg123", "SampleApp", "c291433b-53ad-4c49-8cae-0a293eae1c6d", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.NetworkTraceArray = []*armappservice.NetworkTrace{ - // { - // Path: to.Ptr("D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_02_01T00_00_00.zip"), - // Message: to.Ptr("Trace file has been saved as D:\\home\\LogFiles\\networktrace\\10.0.0.1_2018_02_01T00_00_00.zip"), - // Status: to.Ptr("Succeeded"), - // }} -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetSitePrivateEndpointConnection.json -func ExampleWebAppsClient_GetPrivateEndpointConnection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebAppsClient().GetPrivateEndpointConnection(ctx, "rg", "testSite", "connection", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.RemotePrivateEndpointConnectionARMResource = armappservice.RemotePrivateEndpointConnectionARMResource{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/sites/testSite/privateEndpointConnections/connection"), - // Properties: &armappservice.RemotePrivateEndpointConnectionARMResourceProperties{ - // PrivateEndpoint: &armappservice.ArmIDWrapper{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"), - // }, - // PrivateLinkServiceConnectionState: &armappservice.PrivateLinkConnectionState{ - // Description: to.Ptr("Approved by admin."), - // ActionsRequired: to.Ptr(""), - // Status: to.Ptr("Approved"), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ApproveRejectSitePrivateEndpointConnection.json -func ExampleWebAppsClient_BeginApproveOrRejectPrivateEndpointConnection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewWebAppsClient().BeginApproveOrRejectPrivateEndpointConnection(ctx, "rg", "testSite", "connection", armappservice.PrivateLinkConnectionApprovalRequestResource{ - Properties: &armappservice.PrivateLinkConnectionApprovalRequest{ - PrivateLinkServiceConnectionState: &armappservice.PrivateLinkConnectionState{ - Description: to.Ptr("Approved by admin."), - ActionsRequired: to.Ptr(""), - Status: to.Ptr("Approved"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.RemotePrivateEndpointConnectionARMResource = armappservice.RemotePrivateEndpointConnectionARMResource{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/sites/testSite/privateEndpointConnections/connection"), - // Properties: &armappservice.RemotePrivateEndpointConnectionARMResourceProperties{ - // PrivateEndpoint: &armappservice.ArmIDWrapper{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"), - // }, - // PrivateLinkServiceConnectionState: &armappservice.PrivateLinkConnectionState{ - // Description: to.Ptr("Approved by admin."), - // ActionsRequired: to.Ptr(""), - // Status: to.Ptr("Approved"), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/DeleteSitePrivateEndpointConnection.json -func ExampleWebAppsClient_BeginDeletePrivateEndpointConnection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewWebAppsClient().BeginDeletePrivateEndpointConnection(ctx, "rg", "testSite", "connection", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Interface = map[string]any{ - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetSitePrivateLinkResources.json -func ExampleWebAppsClient_GetPrivateLinkResources() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebAppsClient().GetPrivateLinkResources(ctx, "rg", "testSite", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PrivateLinkResourcesWrapper = armappservice.PrivateLinkResourcesWrapper{ - // Value: []*armappservice.PrivateLinkResource{ - // { - // Name: to.Ptr("site"), - // Type: to.Ptr("Microsoft.Web/sites/privateLinkResources"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/sites/testSite/privateLinkResources/site"), - // Properties: &armappservice.PrivateLinkResourceProperties{ - // GroupID: to.Ptr("sites"), - // RequiredMembers: []*string{ - // to.Ptr("sites")}, - // RequiredZoneNames: []*string{ - // to.Ptr("privatelink.testsite.azurewebsites.net")}, - // }, - // }}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListWebAppSlots.json -func ExampleWebAppsClient_NewListSlotsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWebAppsClient().NewListSlotsPager("testrg123", "sitef6141", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.WebAppCollection = armappservice.WebAppCollection{ - // Value: []*armappservice.Site{ - // { - // Name: to.Ptr("sitef6141/staging"), - // Type: to.Ptr("Microsoft.Web/sites/slots"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141/slots/staging"), - // Kind: to.Ptr("app"), - // Location: to.Ptr("East US"), - // Properties: &armappservice.SiteProperties{ - // AvailabilityState: to.Ptr(armappservice.SiteAvailabilityStateNormal), - // ClientAffinityEnabled: to.Ptr(true), - // ClientCertEnabled: to.Ptr(false), - // ClientCertMode: to.Ptr(armappservice.ClientCertModeRequired), - // ContainerSize: to.Ptr[int32](0), - // CustomDomainVerificationID: to.Ptr("7F3BB652450EF7AD0B6AA33064586E4A9CE823A46DF0B2EC6443A68086E84153"), - // DailyMemoryTimeQuota: to.Ptr[int32](0), - // DefaultHostName: to.Ptr("sitef6141-staging.azurewebsites.net"), - // Enabled: to.Ptr(true), - // EnabledHostNames: []*string{ - // to.Ptr("sitef6141-staging.azurewebsites.net"), - // to.Ptr("sitef6141-staging.scm.azurewebsites.net")}, - // HostNameSSLStates: []*armappservice.HostNameSSLState{ - // { - // Name: to.Ptr("sitef6141-staging.azurewebsites.net"), - // HostType: to.Ptr(armappservice.HostTypeStandard), - // SSLState: to.Ptr(armappservice.SSLStateDisabled), - // }, - // { - // Name: to.Ptr("sitef6141-staging.scm.azurewebsites.net"), - // HostType: to.Ptr(armappservice.HostTypeRepository), - // SSLState: to.Ptr(armappservice.SSLStateDisabled), - // }}, - // HostNames: []*string{ - // to.Ptr("sitef6141-staging.azurewebsites.net")}, - // HostNamesDisabled: to.Ptr(false), - // HTTPSOnly: to.Ptr(false), - // HyperV: to.Ptr(false), - // IsXenon: to.Ptr(false), - // KeyVaultReferenceIdentity: to.Ptr("SystemAssigned"), - // LastModifiedTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-04T17:33:11.641Z"); return t}()), - // OutboundIPAddresses: to.Ptr("70.37.102.201,20.225.43.144"), - // PossibleOutboundIPAddresses: to.Ptr("70.37.102.201,20.225.43.144,20.225.184.122,20.225.184.188"), - // RedundancyMode: to.Ptr(armappservice.RedundancyModeNone), - // RepositorySiteName: to.Ptr("sitef6141"), - // Reserved: to.Ptr(false), - // ResourceGroup: to.Ptr("testrg123"), - // ScmSiteAlsoStopped: to.Ptr(false), - // ServerFarmID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp"), - // SiteConfig: &armappservice.SiteConfig{ - // AcrUseManagedIdentityCreds: to.Ptr(false), - // AlwaysOn: to.Ptr(false), - // AppCommandLine: to.Ptr(""), - // AutoHealEnabled: to.Ptr(false), - // AzureStorageAccounts: map[string]*armappservice.AzureStorageInfoValue{ - // }, - // DefaultDocuments: []*string{ - // to.Ptr("Default.htm"), - // to.Ptr("Default.html"), - // to.Ptr("Default.asp"), - // to.Ptr("index.htm"), - // to.Ptr("index.html"), - // to.Ptr("iisstart.htm"), - // to.Ptr("default.aspx"), - // to.Ptr("index.php"), - // to.Ptr("hostingstart.html")}, - // DetailedErrorLoggingEnabled: to.Ptr(false), - // FtpsState: to.Ptr(armappservice.FtpsStateAllAllowed), - // FunctionAppScaleLimit: to.Ptr[int32](0), - // FunctionsRuntimeScaleMonitoringEnabled: to.Ptr(false), - // Http20Enabled: to.Ptr(false), - // HTTPLoggingEnabled: to.Ptr(false), - // LinuxFxVersion: to.Ptr(""), - // LoadBalancing: to.Ptr(armappservice.SiteLoadBalancingLeastRequests), - // LogsDirectorySizeLimit: to.Ptr[int32](35), - // ManagedPipelineMode: to.Ptr(armappservice.ManagedPipelineModeIntegrated), - // MinTLSVersion: to.Ptr(armappservice.SupportedTLSVersionsOne2), - // MinimumElasticInstanceCount: to.Ptr[int32](0), - // NetFrameworkVersion: to.Ptr("v4.0"), - // NodeVersion: to.Ptr(""), - // NumberOfWorkers: to.Ptr[int32](1), - // PhpVersion: to.Ptr("5.6"), - // PowerShellVersion: to.Ptr(""), - // PythonVersion: to.Ptr(""), - // RemoteDebuggingEnabled: to.Ptr(false), - // RequestTracingEnabled: to.Ptr(false), - // ScmMinTLSVersion: to.Ptr(armappservice.SupportedTLSVersionsOne2), - // Use32BitWorkerProcess: to.Ptr(true), - // VirtualApplications: []*armappservice.VirtualApplication{ - // { - // PhysicalPath: to.Ptr("site\\wwwroot"), - // PreloadEnabled: to.Ptr(false), - // VirtualPath: to.Ptr("/"), - // }}, - // VnetName: to.Ptr(""), - // VnetPrivatePortsCount: to.Ptr[int32](0), - // VnetRouteAllEnabled: to.Ptr(false), - // WebSocketsEnabled: to.Ptr(false), - // }, - // State: to.Ptr("Running"), - // StorageAccountRequired: to.Ptr(false), - // UsageState: to.Ptr(armappservice.UsageStateNormal), - // VnetContentShareEnabled: to.Ptr(false), - // VnetImagePullEnabled: to.Ptr(false), - // VnetRouteAllEnabled: to.Ptr(false), - // }, - // }, - // { - // Name: to.Ptr("sitef6141/qa"), - // Type: to.Ptr("Microsoft.Web/sites/slots"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141/slots/qa"), - // Kind: to.Ptr("app"), - // Location: to.Ptr("East US"), - // Properties: &armappservice.SiteProperties{ - // AvailabilityState: to.Ptr(armappservice.SiteAvailabilityStateNormal), - // ClientAffinityEnabled: to.Ptr(true), - // ClientCertEnabled: to.Ptr(false), - // ClientCertMode: to.Ptr(armappservice.ClientCertModeRequired), - // ContainerSize: to.Ptr[int32](0), - // CustomDomainVerificationID: to.Ptr("7F3BB652450EF7AD0B6AA33064586E4A9CE823A46DF0B2EC6443A68086E84153"), - // DailyMemoryTimeQuota: to.Ptr[int32](0), - // DefaultHostName: to.Ptr("sitef6141-qa.azurewebsites.net"), - // Enabled: to.Ptr(true), - // EnabledHostNames: []*string{ - // to.Ptr("sitef6141-staging.azurewebsites.net"), - // to.Ptr("sitef6141-staging.scm.azurewebsites.net")}, - // HostNameSSLStates: []*armappservice.HostNameSSLState{ - // { - // Name: to.Ptr("sitef6141-qa.azurewebsites.net"), - // HostType: to.Ptr(armappservice.HostTypeStandard), - // SSLState: to.Ptr(armappservice.SSLStateDisabled), - // }, - // { - // Name: to.Ptr("sitef6141-qa.scm.azurewebsites.net"), - // HostType: to.Ptr(armappservice.HostTypeRepository), - // SSLState: to.Ptr(armappservice.SSLStateDisabled), - // }}, - // HostNames: []*string{ - // to.Ptr("sitef6141-qa.azurewebsites.net")}, - // HostNamesDisabled: to.Ptr(false), - // HTTPSOnly: to.Ptr(false), - // HyperV: to.Ptr(false), - // IsXenon: to.Ptr(false), - // KeyVaultReferenceIdentity: to.Ptr("SystemAssigned"), - // LastModifiedTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-04T17:33:11.641Z"); return t}()), - // OutboundIPAddresses: to.Ptr("70.37.102.201,20.225.43.144"), - // PossibleOutboundIPAddresses: to.Ptr("70.37.102.201,20.225.43.144,20.225.184.122,20.225.184.188"), - // RedundancyMode: to.Ptr(armappservice.RedundancyModeNone), - // RepositorySiteName: to.Ptr("sitef6141"), - // Reserved: to.Ptr(false), - // ResourceGroup: to.Ptr("testrg123"), - // ScmSiteAlsoStopped: to.Ptr(false), - // ServerFarmID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp"), - // SiteConfig: &armappservice.SiteConfig{ - // AcrUseManagedIdentityCreds: to.Ptr(false), - // AlwaysOn: to.Ptr(false), - // AppCommandLine: to.Ptr(""), - // AutoHealEnabled: to.Ptr(false), - // AzureStorageAccounts: map[string]*armappservice.AzureStorageInfoValue{ - // }, - // DefaultDocuments: []*string{ - // to.Ptr("Default.htm"), - // to.Ptr("Default.html"), - // to.Ptr("Default.asp"), - // to.Ptr("index.htm"), - // to.Ptr("index.html"), - // to.Ptr("iisstart.htm"), - // to.Ptr("default.aspx"), - // to.Ptr("index.php"), - // to.Ptr("hostingstart.html")}, - // DetailedErrorLoggingEnabled: to.Ptr(false), - // FtpsState: to.Ptr(armappservice.FtpsStateAllAllowed), - // FunctionAppScaleLimit: to.Ptr[int32](0), - // FunctionsRuntimeScaleMonitoringEnabled: to.Ptr(false), - // Http20Enabled: to.Ptr(false), - // HTTPLoggingEnabled: to.Ptr(false), - // LinuxFxVersion: to.Ptr(""), - // LoadBalancing: to.Ptr(armappservice.SiteLoadBalancingLeastRequests), - // LogsDirectorySizeLimit: to.Ptr[int32](35), - // ManagedPipelineMode: to.Ptr(armappservice.ManagedPipelineModeIntegrated), - // MinTLSVersion: to.Ptr(armappservice.SupportedTLSVersionsOne2), - // MinimumElasticInstanceCount: to.Ptr[int32](0), - // NetFrameworkVersion: to.Ptr("v4.0"), - // NodeVersion: to.Ptr(""), - // NumberOfWorkers: to.Ptr[int32](1), - // PhpVersion: to.Ptr("5.6"), - // PowerShellVersion: to.Ptr(""), - // PythonVersion: to.Ptr(""), - // RemoteDebuggingEnabled: to.Ptr(false), - // RequestTracingEnabled: to.Ptr(false), - // ScmMinTLSVersion: to.Ptr(armappservice.SupportedTLSVersionsOne2), - // Use32BitWorkerProcess: to.Ptr(true), - // VirtualApplications: []*armappservice.VirtualApplication{ - // { - // PhysicalPath: to.Ptr("site\\wwwroot"), - // PreloadEnabled: to.Ptr(false), - // VirtualPath: to.Ptr("/"), - // }}, - // VnetName: to.Ptr(""), - // VnetPrivatePortsCount: to.Ptr[int32](0), - // VnetRouteAllEnabled: to.Ptr(false), - // WebSocketsEnabled: to.Ptr(false), - // }, - // State: to.Ptr("Running"), - // StorageAccountRequired: to.Ptr(false), - // UsageState: to.Ptr(armappservice.UsageStateNormal), - // VnetContentShareEnabled: to.Ptr(false), - // VnetImagePullEnabled: to.Ptr(false), - // VnetRouteAllEnabled: to.Ptr(false), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetWebAppSlot.json -func ExampleWebAppsClient_GetSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebAppsClient().GetSlot(ctx, "testrg123", "sitef6141", "staging", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Site = armappservice.Site{ - // Name: to.Ptr("sitef6141/staging"), - // Type: to.Ptr("Microsoft.Web/sites/slots"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141/slots/staging"), - // Kind: to.Ptr("app"), - // Location: to.Ptr("East US"), - // Properties: &armappservice.SiteProperties{ - // AvailabilityState: to.Ptr(armappservice.SiteAvailabilityStateNormal), - // ClientAffinityEnabled: to.Ptr(true), - // ClientCertEnabled: to.Ptr(false), - // ClientCertMode: to.Ptr(armappservice.ClientCertModeRequired), - // ContainerSize: to.Ptr[int32](0), - // CustomDomainVerificationID: to.Ptr("7F3BB652450EF7AD0B6AA33064586E4A9CE823A46DF0B2EC6443A68086E84153"), - // DailyMemoryTimeQuota: to.Ptr[int32](0), - // DefaultHostName: to.Ptr("sitef6141-staging.azurewebsites.net"), - // Enabled: to.Ptr(true), - // EnabledHostNames: []*string{ - // to.Ptr("sitef6141-staging.azurewebsites.net"), - // to.Ptr("sitef6141-staging.scm.azurewebsites.net")}, - // HostNameSSLStates: []*armappservice.HostNameSSLState{ - // { - // Name: to.Ptr("sitef6141-staging.azurewebsites.net"), - // HostType: to.Ptr(armappservice.HostTypeStandard), - // SSLState: to.Ptr(armappservice.SSLStateDisabled), - // }, - // { - // Name: to.Ptr("sitef6141-staging.scm.azurewebsites.net"), - // HostType: to.Ptr(armappservice.HostTypeRepository), - // SSLState: to.Ptr(armappservice.SSLStateDisabled), - // }}, - // HostNames: []*string{ - // to.Ptr("sitef6141-staging.azurewebsites.net")}, - // HostNamesDisabled: to.Ptr(false), - // HTTPSOnly: to.Ptr(false), - // HyperV: to.Ptr(false), - // IsXenon: to.Ptr(false), - // KeyVaultReferenceIdentity: to.Ptr("SystemAssigned"), - // LastModifiedTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-04T17:33:11.641Z"); return t}()), - // OutboundIPAddresses: to.Ptr("70.37.102.201,20.225.43.144"), - // PossibleOutboundIPAddresses: to.Ptr("70.37.102.201,20.225.43.144,20.225.184.122,20.225.184.188"), - // RedundancyMode: to.Ptr(armappservice.RedundancyModeNone), - // RepositorySiteName: to.Ptr("sitef6141"), - // Reserved: to.Ptr(false), - // ResourceGroup: to.Ptr("testrg123"), - // ScmSiteAlsoStopped: to.Ptr(false), - // ServerFarmID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp"), - // SiteConfig: &armappservice.SiteConfig{ - // AcrUseManagedIdentityCreds: to.Ptr(false), - // AlwaysOn: to.Ptr(false), - // AppCommandLine: to.Ptr(""), - // AutoHealEnabled: to.Ptr(false), - // AzureStorageAccounts: map[string]*armappservice.AzureStorageInfoValue{ - // }, - // DefaultDocuments: []*string{ - // to.Ptr("Default.htm"), - // to.Ptr("Default.html"), - // to.Ptr("Default.asp"), - // to.Ptr("index.htm"), - // to.Ptr("index.html"), - // to.Ptr("iisstart.htm"), - // to.Ptr("default.aspx"), - // to.Ptr("index.php"), - // to.Ptr("hostingstart.html")}, - // DetailedErrorLoggingEnabled: to.Ptr(false), - // FtpsState: to.Ptr(armappservice.FtpsStateAllAllowed), - // FunctionAppScaleLimit: to.Ptr[int32](0), - // FunctionsRuntimeScaleMonitoringEnabled: to.Ptr(false), - // Http20Enabled: to.Ptr(false), - // HTTPLoggingEnabled: to.Ptr(false), - // LinuxFxVersion: to.Ptr(""), - // LoadBalancing: to.Ptr(armappservice.SiteLoadBalancingLeastRequests), - // LogsDirectorySizeLimit: to.Ptr[int32](35), - // ManagedPipelineMode: to.Ptr(armappservice.ManagedPipelineModeIntegrated), - // MinTLSVersion: to.Ptr(armappservice.SupportedTLSVersionsOne2), - // MinimumElasticInstanceCount: to.Ptr[int32](0), - // NetFrameworkVersion: to.Ptr("v4.0"), - // NodeVersion: to.Ptr(""), - // NumberOfWorkers: to.Ptr[int32](1), - // PhpVersion: to.Ptr("5.6"), - // PowerShellVersion: to.Ptr(""), - // PythonVersion: to.Ptr(""), - // RemoteDebuggingEnabled: to.Ptr(false), - // RequestTracingEnabled: to.Ptr(false), - // ScmMinTLSVersion: to.Ptr(armappservice.SupportedTLSVersionsOne2), - // Use32BitWorkerProcess: to.Ptr(true), - // VirtualApplications: []*armappservice.VirtualApplication{ - // { - // PhysicalPath: to.Ptr("site\\wwwroot"), - // PreloadEnabled: to.Ptr(false), - // VirtualPath: to.Ptr("/"), - // }}, - // VnetName: to.Ptr(""), - // VnetPrivatePortsCount: to.Ptr[int32](0), - // VnetRouteAllEnabled: to.Ptr(false), - // WebSocketsEnabled: to.Ptr(false), - // }, - // State: to.Ptr("Running"), - // StorageAccountRequired: to.Ptr(false), - // UsageState: to.Ptr(armappservice.UsageStateNormal), - // VnetContentShareEnabled: to.Ptr(false), - // VnetImagePullEnabled: to.Ptr(false), - // VnetRouteAllEnabled: to.Ptr(false), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/CloneWebAppSlot.json -func ExampleWebAppsClient_BeginCreateOrUpdateSlot_cloneWebAppSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewWebAppsClient().BeginCreateOrUpdateSlot(ctx, "testrg123", "sitef6141", "staging", armappservice.Site{ - Kind: to.Ptr("app"), - Location: to.Ptr("East US"), - Properties: &armappservice.SiteProperties{ - CloningInfo: &armappservice.CloningInfo{ - AppSettingsOverrides: map[string]*string{ - "Setting1": to.Ptr("NewValue1"), - "Setting3": to.Ptr("NewValue5"), - }, - CloneCustomHostNames: to.Ptr(true), - CloneSourceControl: to.Ptr(true), - ConfigureLoadBalancing: to.Ptr(false), - HostingEnvironment: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg456/providers/Microsoft.Web/hostingenvironments/aseforsites"), - Overwrite: to.Ptr(false), - SourceWebAppID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg456/providers/Microsoft.Web/sites/srcsiteg478/slot/qa"), - SourceWebAppLocation: to.Ptr("West Europe"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Site = armappservice.Site{ - // Name: to.Ptr("sitef6141/staging"), - // Type: to.Ptr("Microsoft.Web/sites/slots"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141/slots/staging"), - // Kind: to.Ptr("app"), - // Location: to.Ptr("East US"), - // Properties: &armappservice.SiteProperties{ - // AvailabilityState: to.Ptr(armappservice.SiteAvailabilityStateNormal), - // ClientAffinityEnabled: to.Ptr(true), - // ClientCertEnabled: to.Ptr(false), - // ClientCertMode: to.Ptr(armappservice.ClientCertModeRequired), - // ContainerSize: to.Ptr[int32](0), - // CustomDomainVerificationID: to.Ptr("7F3BB652450EF7AD0B6AA33064586E4A9CE823A46DF0B2EC6443A68086E84153"), - // DailyMemoryTimeQuota: to.Ptr[int32](0), - // DefaultHostName: to.Ptr("sitef6141-staging.azurewebsites.net"), - // Enabled: to.Ptr(true), - // EnabledHostNames: []*string{ - // to.Ptr("sitef6141-staging.azurewebsites.net"), - // to.Ptr("sitef6141-staging.scm.azurewebsites.net")}, - // HostNameSSLStates: []*armappservice.HostNameSSLState{ - // { - // Name: to.Ptr("sitef6141-staging.azurewebsites.net"), - // HostType: to.Ptr(armappservice.HostTypeStandard), - // SSLState: to.Ptr(armappservice.SSLStateDisabled), - // }, - // { - // Name: to.Ptr("sitef6141-staging.scm.azurewebsites.net"), - // HostType: to.Ptr(armappservice.HostTypeRepository), - // SSLState: to.Ptr(armappservice.SSLStateDisabled), - // }}, - // HostNames: []*string{ - // to.Ptr("sitef6141-staging.azurewebsites.net")}, - // HostNamesDisabled: to.Ptr(false), - // HTTPSOnly: to.Ptr(false), - // HyperV: to.Ptr(false), - // IsXenon: to.Ptr(false), - // KeyVaultReferenceIdentity: to.Ptr("SystemAssigned"), - // LastModifiedTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-04T17:33:11.641Z"); return t}()), - // OutboundIPAddresses: to.Ptr("70.37.102.201,20.225.43.144"), - // PossibleOutboundIPAddresses: to.Ptr("70.37.102.201,20.225.43.144,20.225.184.122,20.225.184.188"), - // RedundancyMode: to.Ptr(armappservice.RedundancyModeNone), - // RepositorySiteName: to.Ptr("sitef6141"), - // Reserved: to.Ptr(false), - // ResourceGroup: to.Ptr("testrg123"), - // ScmSiteAlsoStopped: to.Ptr(false), - // ServerFarmID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp"), - // SiteConfig: &armappservice.SiteConfig{ - // AcrUseManagedIdentityCreds: to.Ptr(false), - // AlwaysOn: to.Ptr(false), - // AppCommandLine: to.Ptr(""), - // AutoHealEnabled: to.Ptr(false), - // AzureStorageAccounts: map[string]*armappservice.AzureStorageInfoValue{ - // }, - // DefaultDocuments: []*string{ - // to.Ptr("Default.htm"), - // to.Ptr("Default.html"), - // to.Ptr("Default.asp"), - // to.Ptr("index.htm"), - // to.Ptr("index.html"), - // to.Ptr("iisstart.htm"), - // to.Ptr("default.aspx"), - // to.Ptr("index.php"), - // to.Ptr("hostingstart.html")}, - // DetailedErrorLoggingEnabled: to.Ptr(false), - // FtpsState: to.Ptr(armappservice.FtpsStateAllAllowed), - // FunctionAppScaleLimit: to.Ptr[int32](0), - // FunctionsRuntimeScaleMonitoringEnabled: to.Ptr(false), - // Http20Enabled: to.Ptr(false), - // HTTPLoggingEnabled: to.Ptr(false), - // LinuxFxVersion: to.Ptr(""), - // LoadBalancing: to.Ptr(armappservice.SiteLoadBalancingLeastRequests), - // LogsDirectorySizeLimit: to.Ptr[int32](35), - // ManagedPipelineMode: to.Ptr(armappservice.ManagedPipelineModeIntegrated), - // MinTLSVersion: to.Ptr(armappservice.SupportedTLSVersionsOne2), - // MinimumElasticInstanceCount: to.Ptr[int32](0), - // NetFrameworkVersion: to.Ptr("v4.0"), - // NodeVersion: to.Ptr(""), - // NumberOfWorkers: to.Ptr[int32](1), - // PhpVersion: to.Ptr("5.6"), - // PowerShellVersion: to.Ptr(""), - // PythonVersion: to.Ptr(""), - // RemoteDebuggingEnabled: to.Ptr(false), - // RequestTracingEnabled: to.Ptr(false), - // ScmMinTLSVersion: to.Ptr(armappservice.SupportedTLSVersionsOne2), - // Use32BitWorkerProcess: to.Ptr(true), - // VirtualApplications: []*armappservice.VirtualApplication{ - // { - // PhysicalPath: to.Ptr("site\\wwwroot"), - // PreloadEnabled: to.Ptr(false), - // VirtualPath: to.Ptr("/"), - // }}, - // VnetName: to.Ptr(""), - // VnetPrivatePortsCount: to.Ptr[int32](0), - // VnetRouteAllEnabled: to.Ptr(false), - // WebSocketsEnabled: to.Ptr(false), - // }, - // State: to.Ptr("Running"), - // StorageAccountRequired: to.Ptr(false), - // UsageState: to.Ptr(armappservice.UsageStateNormal), - // VnetContentShareEnabled: to.Ptr(false), - // VnetImagePullEnabled: to.Ptr(false), - // VnetRouteAllEnabled: to.Ptr(false), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/CreateOrUpdateWebAppSlot.json -func ExampleWebAppsClient_BeginCreateOrUpdateSlot_createOrUpdateWebAppSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewWebAppsClient().BeginCreateOrUpdateSlot(ctx, "testrg123", "sitef6141", "staging", armappservice.Site{ - Kind: to.Ptr("app"), - Location: to.Ptr("East US"), - Properties: &armappservice.SiteProperties{ - ServerFarmID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Site = armappservice.Site{ - // Name: to.Ptr("sitef6141/staging"), - // Type: to.Ptr("Microsoft.Web/sites/slots"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141/slots/staging"), - // Kind: to.Ptr("app"), - // Location: to.Ptr("East US"), - // Properties: &armappservice.SiteProperties{ - // AvailabilityState: to.Ptr(armappservice.SiteAvailabilityStateNormal), - // ClientAffinityEnabled: to.Ptr(true), - // ClientCertEnabled: to.Ptr(false), - // ClientCertMode: to.Ptr(armappservice.ClientCertModeRequired), - // ContainerSize: to.Ptr[int32](0), - // CustomDomainVerificationID: to.Ptr("7F3BB652450EF7AD0B6AA33064586E4A9CE823A46DF0B2EC6443A68086E84153"), - // DailyMemoryTimeQuota: to.Ptr[int32](0), - // DefaultHostName: to.Ptr("sitef6141.azurewebsites.net"), - // Enabled: to.Ptr(true), - // EnabledHostNames: []*string{ - // to.Ptr("sitef6141-staging.azurewebsites.net"), - // to.Ptr("sitef6141-staging.scm.azurewebsites.net")}, - // HostNameSSLStates: []*armappservice.HostNameSSLState{ - // { - // Name: to.Ptr("sitef6141-staging.azurewebsites.net"), - // HostType: to.Ptr(armappservice.HostTypeStandard), - // SSLState: to.Ptr(armappservice.SSLStateDisabled), - // }, - // { - // Name: to.Ptr("sitef6141-staging.scm.azurewebsites.net"), - // HostType: to.Ptr(armappservice.HostTypeRepository), - // SSLState: to.Ptr(armappservice.SSLStateDisabled), - // }}, - // HostNames: []*string{ - // to.Ptr("sitef6141-staging.azurewebsites.net")}, - // HostNamesDisabled: to.Ptr(false), - // HTTPSOnly: to.Ptr(false), - // HyperV: to.Ptr(false), - // IsXenon: to.Ptr(false), - // KeyVaultReferenceIdentity: to.Ptr("SystemAssigned"), - // LastModifiedTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-04T17:33:11.641Z"); return t}()), - // OutboundIPAddresses: to.Ptr("70.37.102.201,20.225.43.144"), - // PossibleOutboundIPAddresses: to.Ptr("70.37.102.201,20.225.43.144,20.225.184.122,20.225.184.188"), - // RedundancyMode: to.Ptr(armappservice.RedundancyModeNone), - // RepositorySiteName: to.Ptr("sitef6141"), - // Reserved: to.Ptr(false), - // ResourceGroup: to.Ptr("testrg123"), - // ScmSiteAlsoStopped: to.Ptr(false), - // ServerFarmID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp"), - // SiteConfig: &armappservice.SiteConfig{ - // AcrUseManagedIdentityCreds: to.Ptr(false), - // AlwaysOn: to.Ptr(false), - // AppCommandLine: to.Ptr(""), - // AutoHealEnabled: to.Ptr(false), - // AzureStorageAccounts: map[string]*armappservice.AzureStorageInfoValue{ - // }, - // DefaultDocuments: []*string{ - // to.Ptr("Default.htm"), - // to.Ptr("Default.html"), - // to.Ptr("Default.asp"), - // to.Ptr("index.htm"), - // to.Ptr("index.html"), - // to.Ptr("iisstart.htm"), - // to.Ptr("default.aspx"), - // to.Ptr("index.php"), - // to.Ptr("hostingstart.html")}, - // DetailedErrorLoggingEnabled: to.Ptr(false), - // FtpsState: to.Ptr(armappservice.FtpsStateAllAllowed), - // FunctionAppScaleLimit: to.Ptr[int32](0), - // FunctionsRuntimeScaleMonitoringEnabled: to.Ptr(false), - // Http20Enabled: to.Ptr(false), - // HTTPLoggingEnabled: to.Ptr(false), - // LinuxFxVersion: to.Ptr(""), - // LoadBalancing: to.Ptr(armappservice.SiteLoadBalancingLeastRequests), - // LogsDirectorySizeLimit: to.Ptr[int32](35), - // ManagedPipelineMode: to.Ptr(armappservice.ManagedPipelineModeIntegrated), - // MinTLSVersion: to.Ptr(armappservice.SupportedTLSVersionsOne2), - // MinimumElasticInstanceCount: to.Ptr[int32](0), - // NetFrameworkVersion: to.Ptr("v4.0"), - // NodeVersion: to.Ptr(""), - // NumberOfWorkers: to.Ptr[int32](1), - // PhpVersion: to.Ptr("5.6"), - // PowerShellVersion: to.Ptr(""), - // PythonVersion: to.Ptr(""), - // RemoteDebuggingEnabled: to.Ptr(false), - // RequestTracingEnabled: to.Ptr(false), - // ScmMinTLSVersion: to.Ptr(armappservice.SupportedTLSVersionsOne2), - // Use32BitWorkerProcess: to.Ptr(true), - // VirtualApplications: []*armappservice.VirtualApplication{ - // { - // PhysicalPath: to.Ptr("site\\wwwroot"), - // PreloadEnabled: to.Ptr(false), - // VirtualPath: to.Ptr("/"), - // }}, - // VnetName: to.Ptr(""), - // VnetPrivatePortsCount: to.Ptr[int32](0), - // VnetRouteAllEnabled: to.Ptr(false), - // WebSocketsEnabled: to.Ptr(false), - // }, - // State: to.Ptr("Running"), - // StorageAccountRequired: to.Ptr(false), - // UsageState: to.Ptr(armappservice.UsageStateNormal), - // VnetContentShareEnabled: to.Ptr(false), - // VnetImagePullEnabled: to.Ptr(false), - // VnetRouteAllEnabled: to.Ptr(false), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/DeleteWebAppSlot.json -func ExampleWebAppsClient_DeleteSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewWebAppsClient().DeleteSlot(ctx, "testrg123", "sitef6141", "staging", &armappservice.WebAppsClientDeleteSlotOptions{DeleteMetrics: nil, - DeleteEmptyServerFarm: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/UpdateWebAppSlot.json -func ExampleWebAppsClient_UpdateSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebAppsClient().UpdateSlot(ctx, "testrg123", "sitef6141", "staging", armappservice.SitePatchResource{ - Properties: &armappservice.SitePatchResourceProperties{ - ServerFarmID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Site = armappservice.Site{ - // Name: to.Ptr("sitef6141/staging"), - // Type: to.Ptr("Microsoft.Web/sites/slots"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141/slots/staging"), - // Kind: to.Ptr("app"), - // Location: to.Ptr("East US"), - // Properties: &armappservice.SiteProperties{ - // AvailabilityState: to.Ptr(armappservice.SiteAvailabilityStateNormal), - // ClientAffinityEnabled: to.Ptr(true), - // ClientCertEnabled: to.Ptr(false), - // ClientCertMode: to.Ptr(armappservice.ClientCertModeRequired), - // ContainerSize: to.Ptr[int32](0), - // CustomDomainVerificationID: to.Ptr("7F3BB652450EF7AD0B6AA33064586E4A9CE823A46DF0B2EC6443A68086E84153"), - // DailyMemoryTimeQuota: to.Ptr[int32](0), - // DefaultHostName: to.Ptr("sitef6141.azurewebsites.net"), - // Enabled: to.Ptr(true), - // EnabledHostNames: []*string{ - // to.Ptr("sitef6141-staging.azurewebsites.net"), - // to.Ptr("sitef6141-staging.scm.azurewebsites.net")}, - // HostNameSSLStates: []*armappservice.HostNameSSLState{ - // { - // Name: to.Ptr("sitef6141-staging.azurewebsites.net"), - // HostType: to.Ptr(armappservice.HostTypeStandard), - // SSLState: to.Ptr(armappservice.SSLStateDisabled), - // }, - // { - // Name: to.Ptr("sitef6141-staging.scm.azurewebsites.net"), - // HostType: to.Ptr(armappservice.HostTypeRepository), - // SSLState: to.Ptr(armappservice.SSLStateDisabled), - // }}, - // HostNames: []*string{ - // to.Ptr("sitef6141-staging.azurewebsites.net")}, - // HostNamesDisabled: to.Ptr(false), - // HTTPSOnly: to.Ptr(false), - // HyperV: to.Ptr(false), - // IsXenon: to.Ptr(false), - // KeyVaultReferenceIdentity: to.Ptr("SystemAssigned"), - // LastModifiedTimeUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-04T17:33:11.641Z"); return t}()), - // OutboundIPAddresses: to.Ptr("70.37.102.201,20.225.43.144"), - // PossibleOutboundIPAddresses: to.Ptr("70.37.102.201,20.225.43.144,20.225.184.122,20.225.184.188"), - // RedundancyMode: to.Ptr(armappservice.RedundancyModeNone), - // RepositorySiteName: to.Ptr("sitef6141"), - // Reserved: to.Ptr(false), - // ResourceGroup: to.Ptr("testrg123"), - // ScmSiteAlsoStopped: to.Ptr(false), - // ServerFarmID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp"), - // SiteConfig: &armappservice.SiteConfig{ - // AcrUseManagedIdentityCreds: to.Ptr(false), - // AlwaysOn: to.Ptr(false), - // AppCommandLine: to.Ptr(""), - // AutoHealEnabled: to.Ptr(false), - // AzureStorageAccounts: map[string]*armappservice.AzureStorageInfoValue{ - // }, - // DefaultDocuments: []*string{ - // to.Ptr("Default.htm"), - // to.Ptr("Default.html"), - // to.Ptr("Default.asp"), - // to.Ptr("index.htm"), - // to.Ptr("index.html"), - // to.Ptr("iisstart.htm"), - // to.Ptr("default.aspx"), - // to.Ptr("index.php"), - // to.Ptr("hostingstart.html")}, - // DetailedErrorLoggingEnabled: to.Ptr(false), - // FtpsState: to.Ptr(armappservice.FtpsStateAllAllowed), - // FunctionAppScaleLimit: to.Ptr[int32](0), - // FunctionsRuntimeScaleMonitoringEnabled: to.Ptr(false), - // Http20Enabled: to.Ptr(false), - // HTTPLoggingEnabled: to.Ptr(false), - // LinuxFxVersion: to.Ptr(""), - // LoadBalancing: to.Ptr(armappservice.SiteLoadBalancingLeastRequests), - // LogsDirectorySizeLimit: to.Ptr[int32](35), - // ManagedPipelineMode: to.Ptr(armappservice.ManagedPipelineModeIntegrated), - // MinTLSVersion: to.Ptr(armappservice.SupportedTLSVersionsOne2), - // MinimumElasticInstanceCount: to.Ptr[int32](0), - // NetFrameworkVersion: to.Ptr("v4.0"), - // NodeVersion: to.Ptr(""), - // NumberOfWorkers: to.Ptr[int32](1), - // PhpVersion: to.Ptr("5.6"), - // PowerShellVersion: to.Ptr(""), - // PythonVersion: to.Ptr(""), - // RemoteDebuggingEnabled: to.Ptr(false), - // RequestTracingEnabled: to.Ptr(false), - // ScmMinTLSVersion: to.Ptr(armappservice.SupportedTLSVersionsOne2), - // Use32BitWorkerProcess: to.Ptr(true), - // VirtualApplications: []*armappservice.VirtualApplication{ - // { - // PhysicalPath: to.Ptr("site\\wwwroot"), - // PreloadEnabled: to.Ptr(false), - // VirtualPath: to.Ptr("/"), - // }}, - // VnetName: to.Ptr(""), - // VnetPrivatePortsCount: to.Ptr[int32](0), - // VnetRouteAllEnabled: to.Ptr(false), - // WebSocketsEnabled: to.Ptr(false), - // }, - // State: to.Ptr("Running"), - // StorageAccountRequired: to.Ptr(false), - // UsageState: to.Ptr(armappservice.UsageStateNormal), - // VnetContentShareEnabled: to.Ptr(false), - // VnetImagePullEnabled: to.Ptr(false), - // VnetRouteAllEnabled: to.Ptr(false), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/AnalyzeCustomHostNameSlot.json -func ExampleWebAppsClient_AnalyzeCustomHostnameSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebAppsClient().AnalyzeCustomHostnameSlot(ctx, "testrg123", "sitef6141", "staging", &armappservice.WebAppsClientAnalyzeCustomHostnameSlotOptions{HostName: nil}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CustomHostnameAnalysisResult = armappservice.CustomHostnameAnalysisResult{ - // Name: to.Ptr("sitef6141/staging"), - // Type: to.Ptr("Microsoft.Web/sites/stagings"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141/slots/staging"), - // Properties: &armappservice.CustomHostnameAnalysisResultProperties{ - // CNameRecords: []*string{ - // to.Ptr("siteog.azurewebsites.net")}, - // ConflictingAppResourceID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/siteog/slots/qa"), - // CustomDomainVerificationFailureInfo: &armappservice.ErrorEntity{ - // Code: to.Ptr("07198"), - // Message: to.Ptr("Custom domain verification failed on conflicting CNAMEs."), - // }, - // CustomDomainVerificationTest: to.Ptr(armappservice.DNSVerificationTestResultPassed), - // HasConflictAcrossSubscription: to.Ptr(true), - // HasConflictOnScaleUnit: to.Ptr(false), - // IsHostnameAlreadyVerified: to.Ptr(true), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListPublishingCredentialsPoliciesSlot.json -func ExampleWebAppsClient_NewListBasicPublishingCredentialsPoliciesSlotPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWebAppsClient().NewListBasicPublishingCredentialsPoliciesSlotPager("testrg123", "testsite", "staging", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.PublishingCredentialsPoliciesCollection = armappservice.PublishingCredentialsPoliciesCollection{ - // Value: []*armappservice.CsmPublishingCredentialsPoliciesEntity{ - // { - // Name: to.Ptr("ftp"), - // Type: to.Ptr("Microsoft.Web/sites/slots/basicPublishingCredentialsPolicies"), - // ID: to.Ptr("/subscriptions/3fb8d758-2e2c-42e9-a528-a8acdfe87237/resourceGroups/testrg123/providers/Microsoft.Web/sites/testsite/slots/staging/basicPublishingCredentialsPolicies/ftp"), - // Properties: &armappservice.CsmPublishingCredentialsPoliciesEntityProperties{ - // Allow: to.Ptr(true), - // }, - // }, - // { - // Name: to.Ptr("scm"), - // Type: to.Ptr("Microsoft.Web/sites/slots/basicPublishingCredentialsPolicies"), - // ID: to.Ptr("/subscriptions/3fb8d758-2e2c-42e9-a528-a8acdfe87237/resourceGroups/testrg123/providers/Microsoft.Web/sites/testsite/slots/staging/basicPublishingCredentialsPolicies/scm"), - // Properties: &armappservice.CsmPublishingCredentialsPoliciesEntityProperties{ - // Allow: to.Ptr(true), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetPublishingCredentialsPolicySlot.json -func ExampleWebAppsClient_GetFtpAllowedSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebAppsClient().GetFtpAllowedSlot(ctx, "rg", "testSite", "stage", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CsmPublishingCredentialsPoliciesEntity = armappservice.CsmPublishingCredentialsPoliciesEntity{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/sites/testSite/slots/stage/basicPublishingCredentialsPolicies/ftp"), - // Properties: &armappservice.CsmPublishingCredentialsPoliciesEntityProperties{ - // Allow: to.Ptr(false), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/UpdatePublishingCredentialsPolicySlot.json -func ExampleWebAppsClient_UpdateFtpAllowedSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebAppsClient().UpdateFtpAllowedSlot(ctx, "rg", "testSite", "stage", armappservice.CsmPublishingCredentialsPoliciesEntity{ - Properties: &armappservice.CsmPublishingCredentialsPoliciesEntityProperties{ - Allow: to.Ptr(true), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CsmPublishingCredentialsPoliciesEntity = armappservice.CsmPublishingCredentialsPoliciesEntity{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/sites/testSite/slots/stage/basicPublishingCredentialsPolicies/ftp"), - // Properties: &armappservice.CsmPublishingCredentialsPoliciesEntityProperties{ - // Allow: to.Ptr(true), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetKeyVaultReferencesForAppSettingsSlot.json -func ExampleWebAppsClient_NewGetAppSettingsKeyVaultReferencesSlotPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWebAppsClient().NewGetAppSettingsKeyVaultReferencesSlotPager("testrg123", "testc6282", "stage", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.APIKVReferenceCollection = armappservice.APIKVReferenceCollection{ - // Value: []*armappservice.APIKVReference{ - // { - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/testc6282/slots/stage/config/configreferences/appsettings/secretName"), - // Properties: &armappservice.APIKVReferenceProperties{ - // SecretName: to.Ptr("secretName"), - // SecretVersion: to.Ptr("secretVersion"), - // VaultName: to.Ptr("keyVaultName"), - // }, - // }, - // { - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/testc6282/slots/stage/config/configreferences/appsettings/secretName2"), - // Properties: &armappservice.APIKVReferenceProperties{ - // SecretName: to.Ptr("secretName2"), - // SecretVersion: to.Ptr("secretVersion2"), - // VaultName: to.Ptr("keyVaultName"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetKeyVaultReferencesForAppSettingSlot.json -func ExampleWebAppsClient_GetAppSettingKeyVaultReferenceSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebAppsClient().GetAppSettingKeyVaultReferenceSlot(ctx, "testrg123", "testc6282", "setting", "stage", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.APIKVReference = armappservice.APIKVReference{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/testc6282/slots/stage/config/configreferences/appsettings/setting"), - // Properties: &armappservice.APIKVReferenceProperties{ - // SecretName: to.Ptr("secretName"), - // SecretVersion: to.Ptr("secretVersion"), - // VaultName: to.Ptr("keyVaultName"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListSiteDeploymentStatusSlot.json -func ExampleWebAppsClient_NewListSlotSiteDeploymentStatusesSlotPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWebAppsClient().NewListSlotSiteDeploymentStatusesSlotPager("rg", "testSite", "stage", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.CsmDeploymentStatusCollection = armappservice.CsmDeploymentStatusCollection{ - // Value: []*armappservice.CsmDeploymentStatus{ - // }, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetSiteDeploymentStatusSlot.json -func ExampleWebAppsClient_BeginGetSlotSiteDeploymentStatusSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewWebAppsClient().BeginGetSlotSiteDeploymentStatusSlot(ctx, "rg", "testSite", "stage", "eacfd68b-3bbd-4ad9-99c5-98614d89c8e5", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.CsmDeploymentStatus = armappservice.CsmDeploymentStatus{ - // Name: to.Ptr("eacfd68b-3bbd-4ad9-99c5-98614d89c8e5"), - // Type: to.Ptr("Microsoft.Web/sites/slots/deploymentStatus"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/sites/testSite/slots/stage/deploymentStatus/eacfd68b-3bbd-4ad9-99c5-98614d89c8e5"), - // Properties: &armappservice.CsmDeploymentStatusProperties{ - // DeploymentID: to.Ptr("eacfd68b-3bbd-4ad9-99c5-98614d89c8e5"), - // FailedInstancesLogs: []*string{ - // }, - // NumberOfInstancesFailed: to.Ptr[int32](0), - // NumberOfInstancesInProgress: to.Ptr[int32](0), - // NumberOfInstancesSuccessful: to.Ptr[int32](1), - // Status: to.Ptr(armappservice.DeploymentBuildStatusRuntimeSuccessful), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetSitePrivateEndpointConnectionSlot.json -func ExampleWebAppsClient_GetPrivateEndpointConnectionSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebAppsClient().GetPrivateEndpointConnectionSlot(ctx, "rg", "testSite", "connection", "stage", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.RemotePrivateEndpointConnectionARMResource = armappservice.RemotePrivateEndpointConnectionARMResource{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/sites/testSite/slot/stage/privateEndpointConnections/connection"), - // Properties: &armappservice.RemotePrivateEndpointConnectionARMResourceProperties{ - // PrivateEndpoint: &armappservice.ArmIDWrapper{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"), - // }, - // PrivateLinkServiceConnectionState: &armappservice.PrivateLinkConnectionState{ - // Description: to.Ptr("Approved by admin."), - // ActionsRequired: to.Ptr(""), - // Status: to.Ptr("Approved"), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ApproveRejectSitePrivateEndpointConnectionSlot.json -func ExampleWebAppsClient_BeginApproveOrRejectPrivateEndpointConnectionSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewWebAppsClient().BeginApproveOrRejectPrivateEndpointConnectionSlot(ctx, "rg", "testSite", "connection", "stage", armappservice.PrivateLinkConnectionApprovalRequestResource{ - Properties: &armappservice.PrivateLinkConnectionApprovalRequest{ - PrivateLinkServiceConnectionState: &armappservice.PrivateLinkConnectionState{ - Description: to.Ptr("Approved by admin."), - ActionsRequired: to.Ptr(""), - Status: to.Ptr("Approved"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.RemotePrivateEndpointConnectionARMResource = armappservice.RemotePrivateEndpointConnectionARMResource{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/sites/testSite/slots/stage/privateEndpointConnections/connection"), - // Properties: &armappservice.RemotePrivateEndpointConnectionARMResourceProperties{ - // PrivateEndpoint: &armappservice.ArmIDWrapper{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"), - // }, - // PrivateLinkServiceConnectionState: &armappservice.PrivateLinkConnectionState{ - // Description: to.Ptr("Approved by admin."), - // ActionsRequired: to.Ptr(""), - // Status: to.Ptr("Approved"), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/DeleteSitePrivateEndpointConnectionSlot.json -func ExampleWebAppsClient_BeginDeletePrivateEndpointConnectionSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewWebAppsClient().BeginDeletePrivateEndpointConnectionSlot(ctx, "rg", "testSite", "connection", "stage", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.Interface = map[string]any{ - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetSitePrivateLinkResourcesSlot.json -func ExampleWebAppsClient_GetPrivateLinkResourcesSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebAppsClient().GetPrivateLinkResourcesSlot(ctx, "rg", "testSite", "stage", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.PrivateLinkResourcesWrapper = armappservice.PrivateLinkResourcesWrapper{ - // Value: []*armappservice.PrivateLinkResource{ - // { - // Name: to.Ptr("site"), - // Type: to.Ptr("Microsoft.Web/sites/privateLinkResources"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/sites/testSite/privateLinkResources/site"), - // Properties: &armappservice.PrivateLinkResourceProperties{ - // GroupID: to.Ptr("sites"), - // RequiredMembers: []*string{ - // to.Ptr("sites")}, - // RequiredZoneNames: []*string{ - // to.Ptr("privatelink.testsite.azurewebsites.net")}, - // }, - // }}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/DeleteDeployWorkflowArtifacts.json -func ExampleWebAppsClient_DeployWorkflowArtifacts_deleteWorkflowArtifacts() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewWebAppsClient().DeployWorkflowArtifacts(ctx, "testrg123", "testsite2", &armappservice.WebAppsClientDeployWorkflowArtifactsOptions{WorkflowArtifacts: &armappservice.WorkflowArtifacts{ - FilesToDelete: []*string{ - to.Ptr("test/workflow.json"), - to.Ptr("test/")}, - }, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/PostDeployWorkflowArtifacts.json -func ExampleWebAppsClient_DeployWorkflowArtifacts_deploysWorkflowArtifacts() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewWebAppsClient().DeployWorkflowArtifacts(ctx, "testrg123", "testsite2", &armappservice.WebAppsClientDeployWorkflowArtifactsOptions{WorkflowArtifacts: &armappservice.WorkflowArtifacts{ - AppSettings: map[string]any{ - "eventHub_connectionString": "Endpoint=sb://example.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=EXAMPLE1a2b3c4d5e6fEXAMPLE=", - }, - Files: map[string]any{ - "connections.json": map[string]any{ - "managedApiConnections": map[string]any{}, - "serviceProviderConnections": map[string]any{ - "eventHub": map[string]any{ - "displayName": "example1", - "parameterValues": map[string]any{ - "connectionString": "@appsetting('eventHub_connectionString')", - }, - "serviceProvider": map[string]any{ - "id": "/serviceProviders/eventHub", - }, - }, - }, - }, - "test1/workflow.json": map[string]any{ - "definition": map[string]any{ - "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", - "actions": map[string]any{}, - "contentVersion": "1.0.0.0", - "outputs": map[string]any{}, - "triggers": map[string]any{ - "When_events_are_available_in_Event_hub": map[string]any{ - "type": "ServiceProvider", - "inputs": map[string]any{ - "parameters": map[string]any{ - "eventHubName": "test123", - }, - "serviceProviderConfiguration": map[string]any{ - "operationId": "receiveEvents", - "connectionName": "eventHub", - "serviceProviderId": "/serviceProviders/eventHub", - }, - }, - "splitOn": "@triggerOutputs()?['body']", - }, - }, - }, - "kind": "Stateful", - }, - }, - }, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/PostDeployWorkflowArtifactsSlot.json -func ExampleWebAppsClient_DeployWorkflowArtifactsSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewWebAppsClient().DeployWorkflowArtifactsSlot(ctx, "testrg123", "testsite2", "testsSlot", &armappservice.WebAppsClientDeployWorkflowArtifactsSlotOptions{WorkflowArtifacts: &armappservice.WorkflowArtifacts{ - AppSettings: map[string]any{ - "eventHub_connectionString": "Endpoint=sb://example.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=EXAMPLE1a2b3c4d5e6fEXAMPLE=", - }, - Files: map[string]any{ - "connections.json": map[string]any{ - "managedApiConnections": map[string]any{}, - "serviceProviderConnections": map[string]any{ - "eventHub": map[string]any{ - "displayName": "example1", - "parameterValues": map[string]any{ - "connectionString": "@appsetting('eventHub_connectionString')", - }, - "serviceProvider": map[string]any{ - "id": "/serviceProviders/eventHub", - }, - }, - }, - }, - "test1/workflow.json": map[string]any{ - "definition": map[string]any{ - "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", - "actions": map[string]any{}, - "contentVersion": "1.0.0.0", - "outputs": map[string]any{}, - "triggers": map[string]any{ - "When_events_are_available_in_Event_hub": map[string]any{ - "type": "ServiceProvider", - "inputs": map[string]any{ - "parameters": map[string]any{ - "eventHubName": "test123", - }, - "serviceProviderConfiguration": map[string]any{ - "operationId": "receiveEvents", - "connectionName": "eventHub", - "serviceProviderId": "/serviceProviders/eventHub", - }, - }, - "splitOn": "@triggerOutputs()?['body']", - }, - }, - }, - "kind": "Stateful", - }, - }, - }, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListWorkflows.json -func ExampleWebAppsClient_NewListInstanceWorkflowsSlotPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWebAppsClient().NewListInstanceWorkflowsSlotPager("testrg123", "testsite2", "staging", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.WorkflowEnvelopeCollection = armappservice.WorkflowEnvelopeCollection{ - // Value: []*armappservice.WorkflowEnvelope{ - // { - // Name: to.Ptr("testsite2/a1"), - // Type: to.Ptr("Microsoft.Web/sites/workflows"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/testsite2/workflows/a1"), - // Kind: to.Ptr("Stateful"), - // Location: to.Ptr("USAAnywhere"), - // Properties: &armappservice.WorkflowEnvelopeProperties{ - // FlowState: to.Ptr(armappservice.WorkflowStateEnabled), - // Health: &armappservice.WorkflowHealth{ - // State: to.Ptr(armappservice.WorkflowHealthStateHealthy), - // }, - // }, - // }, - // { - // Name: to.Ptr("testsite2/stateful2"), - // Type: to.Ptr("Microsoft.Web/sites/workflows"), - // ID: to.Ptr("/subscriptions/testsub/resourceGroups/testrg/providers/Microsoft.Web/sites/testsite2/workflows/stateful2"), - // Kind: to.Ptr("Stateful"), - // Location: to.Ptr("USAAnywhere"), - // Properties: &armappservice.WorkflowEnvelopeProperties{ - // FlowState: to.Ptr(armappservice.WorkflowStateEnabled), - // Health: &armappservice.WorkflowHealth{ - // Error: &armappservice.ErrorEntity{ - // Code: to.Ptr("InvalidWorkflowJson"), - // Message: to.Ptr("Invalid character after parsing property name. Expected ':' but got: \". Path '', line 2, position 2."), - // }, - // State: to.Ptr(armappservice.WorkflowHealthStateUnhealthy), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/GetWorkflow.json -func ExampleWebAppsClient_GetInstanceWorkflowSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebAppsClient().GetInstanceWorkflowSlot(ctx, "testrg123", "testsite2", "staging", "stateful1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.WorkflowEnvelope = armappservice.WorkflowEnvelope{ - // Name: to.Ptr("testsite2/stateful1"), - // Type: to.Ptr("Microsoft.Web/sites/workflows"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/testsite2/workflows/stateful1"), - // Kind: to.Ptr("Stateful"), - // Location: to.Ptr("USAAnywhere"), - // Properties: &armappservice.WorkflowEnvelopeProperties{ - // Files: map[string]any{ - // "connections.json": map[string]any{ - // "managedApiConnections":map[string]any{ - // "office365":map[string]any{ - // "api":map[string]any{ - // "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/locations/brazilsouth/managedApis/office365", - // }, - // "authentication":map[string]any{ - // "type": "Raw", - // "parameter": "@appsetting('office365-connectionKey')", - // "scheme": "Key", - // }, - // "connection":map[string]any{ - // "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/connections/office365-1", - // }, - // "connectionRuntimeUrl": "string", - // }, - // }, - // }, - // "workflow.json": map[string]any{ - // "definition":map[string]any{ - // "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", - // "actions":map[string]any{ - // }, - // "contentVersion": "1.0.0.0", - // "outputs":map[string]any{ - // }, - // "parameters":map[string]any{ - // }, - // "triggers":map[string]any{ - // }, - // }, - // }, - // }, - // FlowState: to.Ptr(armappservice.WorkflowStateEnabled), - // Health: &armappservice.WorkflowHealth{ - // State: to.Ptr(armappservice.WorkflowHealthStateHealthy), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListWorkflowsConfigurationConnections.json -func ExampleWebAppsClient_ListWorkflowsConnectionsSlot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebAppsClient().ListWorkflowsConnectionsSlot(ctx, "testrg123", "testsite2", "staging", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.WorkflowEnvelope = armappservice.WorkflowEnvelope{ - // Name: to.Ptr("testsite2/connections"), - // Type: to.Ptr("Microsoft.Web/sites/workflowsconfiguration"), - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/testsite2/workflowconfigurations/connections"), - // Location: to.Ptr("USAAnywhere"), - // Properties: &armappservice.WorkflowEnvelopeProperties{ - // Files: map[string]any{ - // "connections.json": map[string]any{ - // "managedApiConnections":map[string]any{ - // "office365":map[string]any{ - // "api":map[string]any{ - // "id": "string", - // }, - // "authentication":map[string]any{ - // "type": "Raw", - // "parameter": "@appsetting('office365-connectionKey')", - // "scheme": "Key", - // }, - // "connection":map[string]any{ - // "id": "string", - // }, - // "connectionRuntimeUrl": "string", - // }, - // }, - // }, - // }, - // Health: &armappservice.WorkflowHealth{ - // State: to.Ptr(armappservice.WorkflowHealthStateHealthy), - // }, - // }, - // } -} diff --git a/sdk/resourcemanager/appservice/armappservice/websitemanagement_client.go b/sdk/resourcemanager/appservice/armappservice/websitemanagement_client.go index 90268e72fadf..7cba51b8c8cd 100644 --- a/sdk/resourcemanager/appservice/armappservice/websitemanagement_client.go +++ b/sdk/resourcemanager/appservice/armappservice/websitemanagement_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappservice @@ -34,7 +33,7 @@ type WebSiteManagementClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWebSiteManagementClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WebSiteManagementClient, error) { - cl, err := arm.NewClient(moduleName+".WebSiteManagementClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,23 +47,30 @@ func NewWebSiteManagementClient(subscriptionID string, credential azcore.TokenCr // CheckNameAvailability - Description for Check if a resource name is available. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - request - Name availability request. // - options - WebSiteManagementClientCheckNameAvailabilityOptions contains the optional parameters for the WebSiteManagementClient.CheckNameAvailability // method. func (client *WebSiteManagementClient) CheckNameAvailability(ctx context.Context, request ResourceNameAvailabilityRequest, options *WebSiteManagementClientCheckNameAvailabilityOptions) (WebSiteManagementClientCheckNameAvailabilityResponse, error) { + var err error + const operationName = "WebSiteManagementClient.CheckNameAvailability" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.checkNameAvailabilityCreateRequest(ctx, request, options) if err != nil { return WebSiteManagementClientCheckNameAvailabilityResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebSiteManagementClientCheckNameAvailabilityResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebSiteManagementClientCheckNameAvailabilityResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebSiteManagementClientCheckNameAvailabilityResponse{}, err } - return client.checkNameAvailabilityHandleResponse(resp) + resp, err := client.checkNameAvailabilityHandleResponse(httpResp) + return resp, err } // checkNameAvailabilityCreateRequest creates the CheckNameAvailability request. @@ -79,10 +85,13 @@ func (client *WebSiteManagementClient) checkNameAvailabilityCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, request) + if err := runtime.MarshalAsJSON(req, request); err != nil { + return nil, err + } + return req, nil } // checkNameAvailabilityHandleResponse handles the CheckNameAvailability response. @@ -97,22 +106,29 @@ func (client *WebSiteManagementClient) checkNameAvailabilityHandleResponse(resp // GetPublishingUser - Description for Gets publishing user // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - options - WebSiteManagementClientGetPublishingUserOptions contains the optional parameters for the WebSiteManagementClient.GetPublishingUser // method. func (client *WebSiteManagementClient) GetPublishingUser(ctx context.Context, options *WebSiteManagementClientGetPublishingUserOptions) (WebSiteManagementClientGetPublishingUserResponse, error) { + var err error + const operationName = "WebSiteManagementClient.GetPublishingUser" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getPublishingUserCreateRequest(ctx, options) if err != nil { return WebSiteManagementClientGetPublishingUserResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebSiteManagementClientGetPublishingUserResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebSiteManagementClientGetPublishingUserResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebSiteManagementClientGetPublishingUserResponse{}, err } - return client.getPublishingUserHandleResponse(resp) + resp, err := client.getPublishingUserHandleResponse(httpResp) + return resp, err } // getPublishingUserCreateRequest creates the GetPublishingUser request. @@ -123,7 +139,7 @@ func (client *WebSiteManagementClient) getPublishingUserCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -141,23 +157,30 @@ func (client *WebSiteManagementClient) getPublishingUserHandleResponse(resp *htt // GetSourceControl - Description for Gets source control token // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - sourceControlType - Type of source control // - options - WebSiteManagementClientGetSourceControlOptions contains the optional parameters for the WebSiteManagementClient.GetSourceControl // method. func (client *WebSiteManagementClient) GetSourceControl(ctx context.Context, sourceControlType string, options *WebSiteManagementClientGetSourceControlOptions) (WebSiteManagementClientGetSourceControlResponse, error) { + var err error + const operationName = "WebSiteManagementClient.GetSourceControl" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getSourceControlCreateRequest(ctx, sourceControlType, options) if err != nil { return WebSiteManagementClientGetSourceControlResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebSiteManagementClientGetSourceControlResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebSiteManagementClientGetSourceControlResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebSiteManagementClientGetSourceControlResponse{}, err } - return client.getSourceControlHandleResponse(resp) + resp, err := client.getSourceControlHandleResponse(httpResp) + return resp, err } // getSourceControlCreateRequest creates the GetSourceControl request. @@ -172,7 +195,7 @@ func (client *WebSiteManagementClient) getSourceControlCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -190,22 +213,29 @@ func (client *WebSiteManagementClient) getSourceControlHandleResponse(resp *http // GetSubscriptionDeploymentLocations - Description for Gets list of available geo regions plus ministamps // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - options - WebSiteManagementClientGetSubscriptionDeploymentLocationsOptions contains the optional parameters for the WebSiteManagementClient.GetSubscriptionDeploymentLocations // method. func (client *WebSiteManagementClient) GetSubscriptionDeploymentLocations(ctx context.Context, options *WebSiteManagementClientGetSubscriptionDeploymentLocationsOptions) (WebSiteManagementClientGetSubscriptionDeploymentLocationsResponse, error) { + var err error + const operationName = "WebSiteManagementClient.GetSubscriptionDeploymentLocations" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getSubscriptionDeploymentLocationsCreateRequest(ctx, options) if err != nil { return WebSiteManagementClientGetSubscriptionDeploymentLocationsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebSiteManagementClientGetSubscriptionDeploymentLocationsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebSiteManagementClientGetSubscriptionDeploymentLocationsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebSiteManagementClientGetSubscriptionDeploymentLocationsResponse{}, err } - return client.getSubscriptionDeploymentLocationsHandleResponse(resp) + resp, err := client.getSubscriptionDeploymentLocationsHandleResponse(httpResp) + return resp, err } // getSubscriptionDeploymentLocationsCreateRequest creates the GetSubscriptionDeploymentLocations request. @@ -220,7 +250,7 @@ func (client *WebSiteManagementClient) getSubscriptionDeploymentLocationsCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -235,9 +265,64 @@ func (client *WebSiteManagementClient) getSubscriptionDeploymentLocationsHandleR return result, nil } +// NewListAseRegionsPager - Description for get a list of available ASE regions and its supported Skus. +// +// Generated from API version 2023-01-01 +// - options - WebSiteManagementClientListAseRegionsOptions contains the optional parameters for the WebSiteManagementClient.NewListAseRegionsPager +// method. +func (client *WebSiteManagementClient) NewListAseRegionsPager(options *WebSiteManagementClientListAseRegionsOptions) *runtime.Pager[WebSiteManagementClientListAseRegionsResponse] { + return runtime.NewPager(runtime.PagingHandler[WebSiteManagementClientListAseRegionsResponse]{ + More: func(page WebSiteManagementClientListAseRegionsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *WebSiteManagementClientListAseRegionsResponse) (WebSiteManagementClientListAseRegionsResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebSiteManagementClient.NewListAseRegionsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listAseRegionsCreateRequest(ctx, options) + }, nil) + if err != nil { + return WebSiteManagementClientListAseRegionsResponse{}, err + } + return client.listAseRegionsHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listAseRegionsCreateRequest creates the ListAseRegions request. +func (client *WebSiteManagementClient) listAseRegionsCreateRequest(ctx context.Context, options *WebSiteManagementClientListAseRegionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.Web/aseRegions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-01-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listAseRegionsHandleResponse handles the ListAseRegions response. +func (client *WebSiteManagementClient) listAseRegionsHandleResponse(resp *http.Response) (WebSiteManagementClientListAseRegionsResponse, error) { + result := WebSiteManagementClientListAseRegionsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.AseRegionCollection); err != nil { + return WebSiteManagementClientListAseRegionsResponse{}, err + } + return result, nil +} + // NewListBillingMetersPager - Description for Gets a list of meters for a given location. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - options - WebSiteManagementClientListBillingMetersOptions contains the optional parameters for the WebSiteManagementClient.NewListBillingMetersPager // method. func (client *WebSiteManagementClient) NewListBillingMetersPager(options *WebSiteManagementClientListBillingMetersOptions) *runtime.Pager[WebSiteManagementClientListBillingMetersResponse] { @@ -246,25 +331,20 @@ func (client *WebSiteManagementClient) NewListBillingMetersPager(options *WebSit return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebSiteManagementClientListBillingMetersResponse) (WebSiteManagementClientListBillingMetersResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listBillingMetersCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebSiteManagementClientListBillingMetersResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebSiteManagementClient.NewListBillingMetersPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listBillingMetersCreateRequest(ctx, options) + }, nil) if err != nil { return WebSiteManagementClientListBillingMetersResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebSiteManagementClientListBillingMetersResponse{}, runtime.NewResponseError(resp) - } return client.listBillingMetersHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -286,7 +366,7 @@ func (client *WebSiteManagementClient) listBillingMetersCreateRequest(ctx contex if options != nil && options.OSType != nil { reqQP.Set("osType", *options.OSType) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -303,7 +383,7 @@ func (client *WebSiteManagementClient) listBillingMetersHandleResponse(resp *htt // NewListCustomHostNameSitesPager - Get custom hostnames under this subscription // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - options - WebSiteManagementClientListCustomHostNameSitesOptions contains the optional parameters for the WebSiteManagementClient.NewListCustomHostNameSitesPager // method. func (client *WebSiteManagementClient) NewListCustomHostNameSitesPager(options *WebSiteManagementClientListCustomHostNameSitesOptions) *runtime.Pager[WebSiteManagementClientListCustomHostNameSitesResponse] { @@ -312,25 +392,20 @@ func (client *WebSiteManagementClient) NewListCustomHostNameSitesPager(options * return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebSiteManagementClientListCustomHostNameSitesResponse) (WebSiteManagementClientListCustomHostNameSitesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCustomHostNameSitesCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebSiteManagementClient.NewListCustomHostNameSitesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCustomHostNameSitesCreateRequest(ctx, options) + }, nil) if err != nil { return WebSiteManagementClientListCustomHostNameSitesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebSiteManagementClientListCustomHostNameSitesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebSiteManagementClientListCustomHostNameSitesResponse{}, runtime.NewResponseError(resp) - } return client.listCustomHostNameSitesHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -349,7 +424,7 @@ func (client *WebSiteManagementClient) listCustomHostNameSitesCreateRequest(ctx if options != nil && options.Hostname != nil { reqQP.Set("hostname", *options.Hostname) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -366,7 +441,7 @@ func (client *WebSiteManagementClient) listCustomHostNameSitesHandleResponse(res // NewListGeoRegionsPager - Description for Get a list of available geographical regions. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - options - WebSiteManagementClientListGeoRegionsOptions contains the optional parameters for the WebSiteManagementClient.NewListGeoRegionsPager // method. func (client *WebSiteManagementClient) NewListGeoRegionsPager(options *WebSiteManagementClientListGeoRegionsOptions) *runtime.Pager[WebSiteManagementClientListGeoRegionsResponse] { @@ -375,25 +450,20 @@ func (client *WebSiteManagementClient) NewListGeoRegionsPager(options *WebSiteMa return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebSiteManagementClientListGeoRegionsResponse) (WebSiteManagementClientListGeoRegionsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listGeoRegionsCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebSiteManagementClient.NewListGeoRegionsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listGeoRegionsCreateRequest(ctx, options) + }, nil) if err != nil { return WebSiteManagementClientListGeoRegionsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebSiteManagementClientListGeoRegionsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebSiteManagementClientListGeoRegionsResponse{}, runtime.NewResponseError(resp) - } return client.listGeoRegionsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -421,7 +491,7 @@ func (client *WebSiteManagementClient) listGeoRegionsCreateRequest(ctx context.C if options != nil && options.LinuxDynamicWorkersEnabled != nil { reqQP.Set("linuxDynamicWorkersEnabled", strconv.FormatBool(*options.LinuxDynamicWorkersEnabled)) } - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -438,7 +508,7 @@ func (client *WebSiteManagementClient) listGeoRegionsHandleResponse(resp *http.R // NewListPremierAddOnOffersPager - Description for List all premier add-on offers. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - options - WebSiteManagementClientListPremierAddOnOffersOptions contains the optional parameters for the WebSiteManagementClient.NewListPremierAddOnOffersPager // method. func (client *WebSiteManagementClient) NewListPremierAddOnOffersPager(options *WebSiteManagementClientListPremierAddOnOffersOptions) *runtime.Pager[WebSiteManagementClientListPremierAddOnOffersResponse] { @@ -447,25 +517,20 @@ func (client *WebSiteManagementClient) NewListPremierAddOnOffersPager(options *W return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebSiteManagementClientListPremierAddOnOffersResponse) (WebSiteManagementClientListPremierAddOnOffersResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listPremierAddOnOffersCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebSiteManagementClient.NewListPremierAddOnOffersPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listPremierAddOnOffersCreateRequest(ctx, options) + }, nil) if err != nil { return WebSiteManagementClientListPremierAddOnOffersResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebSiteManagementClientListPremierAddOnOffersResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebSiteManagementClientListPremierAddOnOffersResponse{}, runtime.NewResponseError(resp) - } return client.listPremierAddOnOffersHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -481,7 +546,7 @@ func (client *WebSiteManagementClient) listPremierAddOnOffersCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -499,22 +564,29 @@ func (client *WebSiteManagementClient) listPremierAddOnOffersHandleResponse(resp // ListSKUs - Description for List all SKUs. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - options - WebSiteManagementClientListSKUsOptions contains the optional parameters for the WebSiteManagementClient.ListSKUs // method. func (client *WebSiteManagementClient) ListSKUs(ctx context.Context, options *WebSiteManagementClientListSKUsOptions) (WebSiteManagementClientListSKUsResponse, error) { + var err error + const operationName = "WebSiteManagementClient.ListSKUs" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listSKUsCreateRequest(ctx, options) if err != nil { return WebSiteManagementClientListSKUsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebSiteManagementClientListSKUsResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebSiteManagementClientListSKUsResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebSiteManagementClientListSKUsResponse{}, err } - return client.listSKUsHandleResponse(resp) + resp, err := client.listSKUsHandleResponse(httpResp) + return resp, err } // listSKUsCreateRequest creates the ListSKUs request. @@ -529,7 +601,7 @@ func (client *WebSiteManagementClient) listSKUsCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -546,7 +618,7 @@ func (client *WebSiteManagementClient) listSKUsHandleResponse(resp *http.Respons // NewListSiteIdentifiersAssignedToHostNamePager - Description for List all apps that are assigned to a hostname. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - nameIdentifier - Hostname information. // - options - WebSiteManagementClientListSiteIdentifiersAssignedToHostNameOptions contains the optional parameters for the // WebSiteManagementClient.NewListSiteIdentifiersAssignedToHostNamePager method. @@ -556,25 +628,20 @@ func (client *WebSiteManagementClient) NewListSiteIdentifiersAssignedToHostNameP return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse) (WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSiteIdentifiersAssignedToHostNameCreateRequest(ctx, nameIdentifier, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebSiteManagementClient.NewListSiteIdentifiersAssignedToHostNamePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSiteIdentifiersAssignedToHostNameCreateRequest(ctx, nameIdentifier, options) + }, nil) if err != nil { return WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebSiteManagementClientListSiteIdentifiersAssignedToHostNameResponse{}, runtime.NewResponseError(resp) - } return client.listSiteIdentifiersAssignedToHostNameHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -590,10 +657,13 @@ func (client *WebSiteManagementClient) listSiteIdentifiersAssignedToHostNameCrea return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, nameIdentifier) + if err := runtime.MarshalAsJSON(req, nameIdentifier); err != nil { + return nil, err + } + return req, nil } // listSiteIdentifiersAssignedToHostNameHandleResponse handles the ListSiteIdentifiersAssignedToHostName response. @@ -607,7 +677,7 @@ func (client *WebSiteManagementClient) listSiteIdentifiersAssignedToHostNameHand // NewListSourceControlsPager - Description for Gets the source controls available for Azure websites. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - options - WebSiteManagementClientListSourceControlsOptions contains the optional parameters for the WebSiteManagementClient.NewListSourceControlsPager // method. func (client *WebSiteManagementClient) NewListSourceControlsPager(options *WebSiteManagementClientListSourceControlsOptions) *runtime.Pager[WebSiteManagementClientListSourceControlsResponse] { @@ -616,25 +686,20 @@ func (client *WebSiteManagementClient) NewListSourceControlsPager(options *WebSi return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WebSiteManagementClientListSourceControlsResponse) (WebSiteManagementClientListSourceControlsResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listSourceControlsCreateRequest(ctx, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WebSiteManagementClient.NewListSourceControlsPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listSourceControlsCreateRequest(ctx, options) + }, nil) if err != nil { return WebSiteManagementClientListSourceControlsResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WebSiteManagementClientListSourceControlsResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebSiteManagementClientListSourceControlsResponse{}, runtime.NewResponseError(resp) - } return client.listSourceControlsHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -646,7 +711,7 @@ func (client *WebSiteManagementClient) listSourceControlsCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -664,21 +729,27 @@ func (client *WebSiteManagementClient) listSourceControlsHandleResponse(resp *ht // Move - Description for Move resources between resource groups. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - moveResourceEnvelope - Object that represents the resource to move. // - options - WebSiteManagementClientMoveOptions contains the optional parameters for the WebSiteManagementClient.Move method. func (client *WebSiteManagementClient) Move(ctx context.Context, resourceGroupName string, moveResourceEnvelope CsmMoveResourceEnvelope, options *WebSiteManagementClientMoveOptions) (WebSiteManagementClientMoveResponse, error) { + var err error + const operationName = "WebSiteManagementClient.Move" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.moveCreateRequest(ctx, resourceGroupName, moveResourceEnvelope, options) if err != nil { return WebSiteManagementClientMoveResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebSiteManagementClientMoveResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebSiteManagementClientMoveResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebSiteManagementClientMoveResponse{}, err } return WebSiteManagementClientMoveResponse{}, nil } @@ -699,32 +770,42 @@ func (client *WebSiteManagementClient) moveCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, moveResourceEnvelope) + if err := runtime.MarshalAsJSON(req, moveResourceEnvelope); err != nil { + return nil, err + } + return req, nil } // UpdatePublishingUser - Description for Updates publishing user // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - userDetails - Details of publishing user // - options - WebSiteManagementClientUpdatePublishingUserOptions contains the optional parameters for the WebSiteManagementClient.UpdatePublishingUser // method. func (client *WebSiteManagementClient) UpdatePublishingUser(ctx context.Context, userDetails User, options *WebSiteManagementClientUpdatePublishingUserOptions) (WebSiteManagementClientUpdatePublishingUserResponse, error) { + var err error + const operationName = "WebSiteManagementClient.UpdatePublishingUser" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updatePublishingUserCreateRequest(ctx, userDetails, options) if err != nil { return WebSiteManagementClientUpdatePublishingUserResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebSiteManagementClientUpdatePublishingUserResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebSiteManagementClientUpdatePublishingUserResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebSiteManagementClientUpdatePublishingUserResponse{}, err } - return client.updatePublishingUserHandleResponse(resp) + resp, err := client.updatePublishingUserHandleResponse(httpResp) + return resp, err } // updatePublishingUserCreateRequest creates the UpdatePublishingUser request. @@ -735,10 +816,13 @@ func (client *WebSiteManagementClient) updatePublishingUserCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, userDetails) + if err := runtime.MarshalAsJSON(req, userDetails); err != nil { + return nil, err + } + return req, nil } // updatePublishingUserHandleResponse handles the UpdatePublishingUser response. @@ -753,24 +837,31 @@ func (client *WebSiteManagementClient) updatePublishingUserHandleResponse(resp * // UpdateSourceControl - Description for Updates source control token // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - sourceControlType - Type of source control // - requestMessage - Source control token information // - options - WebSiteManagementClientUpdateSourceControlOptions contains the optional parameters for the WebSiteManagementClient.UpdateSourceControl // method. func (client *WebSiteManagementClient) UpdateSourceControl(ctx context.Context, sourceControlType string, requestMessage SourceControl, options *WebSiteManagementClientUpdateSourceControlOptions) (WebSiteManagementClientUpdateSourceControlResponse, error) { + var err error + const operationName = "WebSiteManagementClient.UpdateSourceControl" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.updateSourceControlCreateRequest(ctx, sourceControlType, requestMessage, options) if err != nil { return WebSiteManagementClientUpdateSourceControlResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebSiteManagementClientUpdateSourceControlResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebSiteManagementClientUpdateSourceControlResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebSiteManagementClientUpdateSourceControlResponse{}, err } - return client.updateSourceControlHandleResponse(resp) + resp, err := client.updateSourceControlHandleResponse(httpResp) + return resp, err } // updateSourceControlCreateRequest creates the UpdateSourceControl request. @@ -785,10 +876,13 @@ func (client *WebSiteManagementClient) updateSourceControlCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, requestMessage) + if err := runtime.MarshalAsJSON(req, requestMessage); err != nil { + return nil, err + } + return req, nil } // updateSourceControlHandleResponse handles the UpdateSourceControl response. @@ -803,24 +897,31 @@ func (client *WebSiteManagementClient) updateSourceControlHandleResponse(resp *h // Validate - Description for Validate if a resource can be created. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - validateRequest - Request with the resources to validate. // - options - WebSiteManagementClientValidateOptions contains the optional parameters for the WebSiteManagementClient.Validate // method. func (client *WebSiteManagementClient) Validate(ctx context.Context, resourceGroupName string, validateRequest ValidateRequest, options *WebSiteManagementClientValidateOptions) (WebSiteManagementClientValidateResponse, error) { + var err error + const operationName = "WebSiteManagementClient.Validate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.validateCreateRequest(ctx, resourceGroupName, validateRequest, options) if err != nil { return WebSiteManagementClientValidateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebSiteManagementClientValidateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebSiteManagementClientValidateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebSiteManagementClientValidateResponse{}, err } - return client.validateHandleResponse(resp) + resp, err := client.validateHandleResponse(httpResp) + return resp, err } // validateCreateRequest creates the Validate request. @@ -839,10 +940,13 @@ func (client *WebSiteManagementClient) validateCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, validateRequest) + if err := runtime.MarshalAsJSON(req, validateRequest); err != nil { + return nil, err + } + return req, nil } // validateHandleResponse handles the Validate response. @@ -857,22 +961,28 @@ func (client *WebSiteManagementClient) validateHandleResponse(resp *http.Respons // ValidateMove - Description for Validate whether a resource can be moved. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - moveResourceEnvelope - Object that represents the resource to move. // - options - WebSiteManagementClientValidateMoveOptions contains the optional parameters for the WebSiteManagementClient.ValidateMove // method. func (client *WebSiteManagementClient) ValidateMove(ctx context.Context, resourceGroupName string, moveResourceEnvelope CsmMoveResourceEnvelope, options *WebSiteManagementClientValidateMoveOptions) (WebSiteManagementClientValidateMoveResponse, error) { + var err error + const operationName = "WebSiteManagementClient.ValidateMove" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.validateMoveCreateRequest(ctx, resourceGroupName, moveResourceEnvelope, options) if err != nil { return WebSiteManagementClientValidateMoveResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebSiteManagementClientValidateMoveResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusNoContent) { - return WebSiteManagementClientValidateMoveResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return WebSiteManagementClientValidateMoveResponse{}, err } return WebSiteManagementClientValidateMoveResponse{}, nil } @@ -893,33 +1003,43 @@ func (client *WebSiteManagementClient) validateMoveCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, moveResourceEnvelope) + if err := runtime.MarshalAsJSON(req, moveResourceEnvelope); err != nil { + return nil, err + } + return req, nil } // VerifyHostingEnvironmentVnet - Description for Verifies if this VNET is compatible with an App Service Environment by analyzing // the Network Security Group rules. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - parameters - VNET information // - options - WebSiteManagementClientVerifyHostingEnvironmentVnetOptions contains the optional parameters for the WebSiteManagementClient.VerifyHostingEnvironmentVnet // method. func (client *WebSiteManagementClient) VerifyHostingEnvironmentVnet(ctx context.Context, parameters VnetParameters, options *WebSiteManagementClientVerifyHostingEnvironmentVnetOptions) (WebSiteManagementClientVerifyHostingEnvironmentVnetResponse, error) { + var err error + const operationName = "WebSiteManagementClient.VerifyHostingEnvironmentVnet" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.verifyHostingEnvironmentVnetCreateRequest(ctx, parameters, options) if err != nil { return WebSiteManagementClientVerifyHostingEnvironmentVnetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WebSiteManagementClientVerifyHostingEnvironmentVnetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WebSiteManagementClientVerifyHostingEnvironmentVnetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WebSiteManagementClientVerifyHostingEnvironmentVnetResponse{}, err } - return client.verifyHostingEnvironmentVnetHandleResponse(resp) + resp, err := client.verifyHostingEnvironmentVnetHandleResponse(httpResp) + return resp, err } // verifyHostingEnvironmentVnetCreateRequest creates the VerifyHostingEnvironmentVnet request. @@ -934,10 +1054,13 @@ func (client *WebSiteManagementClient) verifyHostingEnvironmentVnetCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // verifyHostingEnvironmentVnetHandleResponse handles the VerifyHostingEnvironmentVnet response. diff --git a/sdk/resourcemanager/appservice/armappservice/websitemanagement_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/websitemanagement_client_example_test.go deleted file mode 100644 index 5fb9ba2840bc..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/websitemanagement_client_example_test.go +++ /dev/null @@ -1,160 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListCustomHostNameSites.json -func ExampleWebSiteManagementClient_NewListCustomHostNameSitesPager_getCustomHostnamesUnderSubscription() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWebSiteManagementClient().NewListCustomHostNameSitesPager(&armappservice.WebSiteManagementClientListCustomHostNameSitesOptions{Hostname: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.CustomHostnameSitesCollection = armappservice.CustomHostnameSitesCollection{ - // Value: []*armappservice.CustomHostnameSites{ - // { - // Name: to.Ptr("mywebapp.azurewebsites.net"), - // Type: to.Ptr("Microsoft.Web/customhostnameSites"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/customhostnameSites/mywebapp.azurewebsites.net"), - // Properties: &armappservice.CustomHostnameSitesProperties{ - // CustomHostname: to.Ptr("mywebapp.azurewebsites.net"), - // Region: to.Ptr("West US"), - // SiteResourceIDs: []*armappservice.Identifier{ - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/westus-rg/providers/Microsoft.Web/sites/mywebapp"), - // }}, - // }, - // }, - // { - // Name: to.Ptr("www.example.com"), - // Type: to.Ptr("Microsoft.Web/customhostnameSites"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/customhostnameSites/www.example.com"), - // Properties: &armappservice.CustomHostnameSitesProperties{ - // CustomHostname: to.Ptr("www.example.com"), - // Region: to.Ptr("West US 2"), - // SiteResourceIDs: []*armappservice.Identifier{ - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/westus2-rg/providers/Microsoft.Web/sites/westus2app1"), - // }, - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/westus2-rg/providers/Microsoft.Web/sites/westus2app2"), - // }, - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/westus2-rg/providers/Microsoft.Web/sites/westus2app3"), - // }}, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/ListCustomSpecificHostNameSites.json -func ExampleWebSiteManagementClient_NewListCustomHostNameSitesPager_getSpecificCustomHostnameUnderSubscription() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWebSiteManagementClient().NewListCustomHostNameSitesPager(&armappservice.WebSiteManagementClientListCustomHostNameSitesOptions{Hostname: to.Ptr("www.example.com")}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.CustomHostnameSitesCollection = armappservice.CustomHostnameSitesCollection{ - // Value: []*armappservice.CustomHostnameSites{ - // { - // Name: to.Ptr("www.example.com"), - // Type: to.Ptr("Microsoft.Web/customhostnameSites"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/customhostnameSites/www.example.com"), - // Properties: &armappservice.CustomHostnameSitesProperties{ - // CustomHostname: to.Ptr("www.example.com"), - // Region: to.Ptr("West US 2"), - // SiteResourceIDs: []*armappservice.Identifier{ - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/westus2-rg/providers/Microsoft.Web/sites/westus2app1"), - // }, - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/westus2-rg/providers/Microsoft.Web/sites/westus2app2"), - // }, - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/westus2-rg/providers/Microsoft.Web/sites/westus2app3"), - // }}, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/VerifyHostingEnvironmentVnet.json -func ExampleWebSiteManagementClient_VerifyHostingEnvironmentVnet() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWebSiteManagementClient().VerifyHostingEnvironmentVnet(ctx, armappservice.VnetParameters{ - Properties: &armappservice.VnetParametersProperties{ - VnetName: to.Ptr("vNet123"), - VnetResourceGroup: to.Ptr("vNet123rg"), - VnetSubnetName: to.Ptr("vNet123SubNet"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.VnetValidationFailureDetails = armappservice.VnetValidationFailureDetails{ - // ID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/verifyHostingEnvironmentVnet"), - // Properties: &armappservice.VnetValidationFailureDetailsProperties{ - // Failed: to.Ptr(false), - // FailedTests: []*armappservice.VnetValidationTestFailure{ - // }, - // }, - // } -} diff --git a/sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitions_client.go b/sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitions_client.go index bbe3b8a844e0..4cbb59875114 100644 --- a/sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitions_client.go +++ b/sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitions_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappservice @@ -33,7 +32,7 @@ type WorkflowRunActionRepetitionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWorkflowRunActionRepetitionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowRunActionRepetitionsClient, error) { - cl, err := arm.NewClient(moduleName+".WorkflowRunActionRepetitionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,7 +46,7 @@ func NewWorkflowRunActionRepetitionsClient(subscriptionID string, credential azc // Get - Get a workflow run action repetition. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - workflowName - The workflow name. @@ -57,18 +56,25 @@ func NewWorkflowRunActionRepetitionsClient(subscriptionID string, credential azc // - options - WorkflowRunActionRepetitionsClientGetOptions contains the optional parameters for the WorkflowRunActionRepetitionsClient.Get // method. func (client *WorkflowRunActionRepetitionsClient) Get(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, repetitionName string, options *WorkflowRunActionRepetitionsClientGetOptions) (WorkflowRunActionRepetitionsClientGetResponse, error) { + var err error + const operationName = "WorkflowRunActionRepetitionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, name, workflowName, runName, actionName, repetitionName, options) if err != nil { return WorkflowRunActionRepetitionsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowRunActionRepetitionsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowRunActionRepetitionsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowRunActionRepetitionsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -107,7 +113,7 @@ func (client *WorkflowRunActionRepetitionsClient) getCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -124,7 +130,7 @@ func (client *WorkflowRunActionRepetitionsClient) getHandleResponse(resp *http.R // NewListPager - Get all of a workflow run action repetitions. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - workflowName - The workflow name. @@ -138,25 +144,20 @@ func (client *WorkflowRunActionRepetitionsClient) NewListPager(resourceGroupName return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WorkflowRunActionRepetitionsClientListResponse) (WorkflowRunActionRepetitionsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, name, workflowName, runName, actionName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkflowRunActionRepetitionsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, name, workflowName, runName, actionName, options) + }, nil) if err != nil { return WorkflowRunActionRepetitionsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WorkflowRunActionRepetitionsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowRunActionRepetitionsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -192,7 +193,7 @@ func (client *WorkflowRunActionRepetitionsClient) listCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -209,7 +210,7 @@ func (client *WorkflowRunActionRepetitionsClient) listHandleResponse(resp *http. // NewListExpressionTracesPager - Lists a workflow run expression trace. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - workflowName - The workflow name. @@ -224,25 +225,20 @@ func (client *WorkflowRunActionRepetitionsClient) NewListExpressionTracesPager(r return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WorkflowRunActionRepetitionsClientListExpressionTracesResponse) (WorkflowRunActionRepetitionsClientListExpressionTracesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listExpressionTracesCreateRequest(ctx, resourceGroupName, name, workflowName, runName, actionName, repetitionName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkflowRunActionRepetitionsClient.NewListExpressionTracesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listExpressionTracesCreateRequest(ctx, resourceGroupName, name, workflowName, runName, actionName, repetitionName, options) + }, nil) if err != nil { return WorkflowRunActionRepetitionsClientListExpressionTracesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WorkflowRunActionRepetitionsClientListExpressionTracesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowRunActionRepetitionsClientListExpressionTracesResponse{}, runtime.NewResponseError(resp) - } return client.listExpressionTracesHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -282,7 +278,7 @@ func (client *WorkflowRunActionRepetitionsClient) listExpressionTracesCreateRequ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitions_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitions_client_example_test.go deleted file mode 100644 index 3766c8f09834..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitions_client_example_test.go +++ /dev/null @@ -1,216 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/WorkflowRunActionRepetitions_List.json -func ExampleWorkflowRunActionRepetitionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWorkflowRunActionRepetitionsClient().NewListPager("testResourceGroup", "test-name", "testFlow", "08586776228332053161046300351", "testAction", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.WorkflowRunActionRepetitionDefinitionCollection = armappservice.WorkflowRunActionRepetitionDefinitionCollection{ - // Value: []*armappservice.WorkflowRunActionRepetitionDefinition{ - // { - // Name: to.Ptr("000000"), - // Type: to.Ptr("/workflows/runs/actions/repetitions"), - // ID: to.Ptr("/workflows/testFlow/runs/08586776228332053161046300351/actions/testAction/repetitions/000000"), - // Properties: &armappservice.WorkflowRunActionRepetitionProperties{ - // Code: to.Ptr("OK"), - // Correlation: &armappservice.RunActionCorrelation{ - // ClientTrackingID: to.Ptr("08586775357427610445444523191"), - // ActionTrackingID: to.Ptr("0d8152bb-e198-44a9-bde8-5138eea16dd4"), - // }, - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-18T17:05:57.2264835Z"); return t}()), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-18T17:05:57.217991Z"); return t}()), - // Status: to.Ptr(armappservice.WorkflowStatusSucceeded), - // InputsLink: &armappservice.ContentLink{ - // ContentHash: &armappservice.ContentHash{ - // Algorithm: to.Ptr("md5"), - // Value: to.Ptr("8q1zMKS5ZyHBrPF+qF1xXw=="), - // }, - // ContentSize: to.Ptr[int64](8), - // ContentVersion: to.Ptr("8q1zMKS5ZyHBrPF+qF1xXw=="), - // URI: to.Ptr("https://test-site.azurewebsites.net:443/runtime/webhooks/workflow/scaleUnits/prod-00/workflows/2dfde2fce2584c49bea17ef0b04c95f4/runs/08586776228332053161046300351/actions/testAction/repetitions/000000/contents/ActionInputs?api-version=2016-10-01&se=2018-04-18T21%3A00%3A00.0000000Z&sp=%2Fruns%2F08586776228332053161046300351%2Factions%2FtestAction%2Frepetitions%2F000000%2Fcontents%2FActionInputs%2Fread&sv=1.0&sig=vw4BDdYp4Ap5RXdM7tY_wl9C38DeAHfnixLBEOpideA"), - // }, - // OutputsLink: &armappservice.ContentLink{ - // ContentHash: &armappservice.ContentHash{ - // Algorithm: to.Ptr("md5"), - // Value: to.Ptr("8q1zMKS5ZyHBrPF+qF1xXw=="), - // }, - // ContentSize: to.Ptr[int64](8), - // ContentVersion: to.Ptr("8q1zMKS5ZyHBrPF+qF1xXw=="), - // URI: to.Ptr("https://test-site.azurewebsites.net:443/runtime/webhooks/workflow/scaleUnits/prod-00/workflows/2dfde2fce2584c49bea17ef0b04c95f4/runs/08586776228332053161046300351/actions/testAction/repetitions/000000/contents/ActionOutputs?api-version=2016-10-01&se=2018-04-18T21%3A00%3A00.0000000Z&sp=%2Fruns%2F08586776228332053161046300351%2Factions%2FtestAction%2Frepetitions%2F000000%2Fcontents%2FActionOutputs%2Fread&sv=1.0&sig=y8Wq7jbu85tmlMo_1zpRyqNJuoCaQCFQtZ3bgSovLY0"), - // }, - // TrackingID: to.Ptr("0d8152bb-e198-44a9-bde8-5138eea16dd4"), - // RepetitionIndexes: []*armappservice.RepetitionIndex{ - // { - // ItemIndex: to.Ptr[int32](0), - // ScopeName: to.Ptr("For_each"), - // }}, - // }, - // }, - // { - // Name: to.Ptr("000001"), - // Type: to.Ptr("/workflows/runs/actions/repetitions"), - // ID: to.Ptr("/workflows/testFlow/runs/08586776228332053161046300351/actions/testAction/repetitions/000001"), - // Properties: &armappservice.WorkflowRunActionRepetitionProperties{ - // Code: to.Ptr("OK"), - // Correlation: &armappservice.RunActionCorrelation{ - // ClientTrackingID: to.Ptr("08586775357427610445444523191"), - // ActionTrackingID: to.Ptr("f84f23eb-b331-4772-9f39-cc307fa83bc3"), - // }, - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-18T17:05:57.1015421Z"); return t}()), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-18T17:05:57.0929911Z"); return t}()), - // Status: to.Ptr(armappservice.WorkflowStatusSucceeded), - // InputsLink: &armappservice.ContentLink{ - // ContentHash: &armappservice.ContentHash{ - // Algorithm: to.Ptr("md5"), - // Value: to.Ptr("OA3i83YHGYVch+N8BQJIRQ=="), - // }, - // ContentSize: to.Ptr[int64](6), - // ContentVersion: to.Ptr("OA3i83YHGYVch+N8BQJIRQ=="), - // URI: to.Ptr("https://test-site.azurewebsites.net:443/runtime/webhooks/workflow/scaleUnits/prod-00/workflows/2dfde2fce2584c49bea17ef0b04c95f4/runs/08586776228332053161046300351/actions/testAction/repetitions/000001/contents/ActionInputs?api-version=2016-10-01&se=2018-04-18T21%3A00%3A00.0000000Z&sp=%2Fruns%2F08586776228332053161046300351%2Factions%2FtestAction%2Frepetitions%2F000001%2Fcontents%2FActionInputs%2Fread&sv=1.0&sig=dLmnt50joimEMK4k9rR6njHQh94iSFJ9rrDxFbkEg5M"), - // }, - // OutputsLink: &armappservice.ContentLink{ - // ContentHash: &armappservice.ContentHash{ - // Algorithm: to.Ptr("md5"), - // Value: to.Ptr("OA3i83YHGYVch+N8BQJIRQ=="), - // }, - // ContentSize: to.Ptr[int64](6), - // ContentVersion: to.Ptr("OA3i83YHGYVch+N8BQJIRQ=="), - // URI: to.Ptr("https://test-site.azurewebsites.net:443/runtime/webhooks/workflow/scaleUnits/prod-00/workflows/2dfde2fce2584c49bea17ef0b04c95f4/runs/08586776228332053161046300351/actions/testAction/repetitions/000001/contents/ActionOutputs?api-version=2016-10-01&se=2018-04-18T21%3A00%3A00.0000000Z&sp=%2Fruns%2F08586776228332053161046300351%2Factions%2FtestAction%2Frepetitions%2F000001%2Fcontents%2FActionOutputs%2Fread&sv=1.0&sig=B3-X5sqIAv1Lb31GOD34ZgIRUXGuiM2QllWiNwXFYAw"), - // }, - // TrackingID: to.Ptr("f84f23eb-b331-4772-9f39-cc307fa83bc3"), - // RepetitionIndexes: []*armappservice.RepetitionIndex{ - // { - // ItemIndex: to.Ptr[int32](1), - // ScopeName: to.Ptr("For_each"), - // }}, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/WorkflowRunActionRepetitions_Get.json -func ExampleWorkflowRunActionRepetitionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWorkflowRunActionRepetitionsClient().Get(ctx, "testResourceGroup", "test-name", "testFlow", "08586776228332053161046300351", "testAction", "000001", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.WorkflowRunActionRepetitionDefinition = armappservice.WorkflowRunActionRepetitionDefinition{ - // Name: to.Ptr("000001"), - // Type: to.Ptr("/workflows/runs/actions/repetitions"), - // ID: to.Ptr("/workflows/testFlow/runs/08586776228332053161046300351/actions/testAction/repetitions/000001"), - // Properties: &armappservice.WorkflowRunActionRepetitionProperties{ - // Code: to.Ptr("OK"), - // Correlation: &armappservice.RunActionCorrelation{ - // ClientTrackingID: to.Ptr("08586775357427610445444523191"), - // ActionTrackingID: to.Ptr("f84f23eb-b331-4772-9f39-cc307fa83bc3"), - // }, - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-18T17:05:57.1015421Z"); return t}()), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-18T17:05:57.0929911Z"); return t}()), - // Status: to.Ptr(armappservice.WorkflowStatusSucceeded), - // InputsLink: &armappservice.ContentLink{ - // ContentHash: &armappservice.ContentHash{ - // Algorithm: to.Ptr("md5"), - // Value: to.Ptr("OA3i83YHGYVch+N8BQJIRQ=="), - // }, - // ContentSize: to.Ptr[int64](6), - // ContentVersion: to.Ptr("OA3i83YHGYVch+N8BQJIRQ=="), - // URI: to.Ptr("https://test-site.azurewebsites.net:443/runtime/webhooks/workflow/scaleUnits/prod-00/workflows/2dfde2fce2584c49bea17ef0b04c95f4/runs/08586776228332053161046300351/actions/testAction/repetitions/000001/contents/ActionInputs?api-version=2016-10-01&se=2018-04-18T21%3A00%3A00.0000000Z&sp=%2Fruns%2F08586776228332053161046300351%2Factions%2FtestAction%2Frepetitions%2F000001%2Fcontents%2FActionInputs%2Fread&sv=1.0&sig=dLmnt50joimEMK4k9rR6njHQh94iSFJ9rrDxFbkEg5M"), - // }, - // OutputsLink: &armappservice.ContentLink{ - // ContentHash: &armappservice.ContentHash{ - // Algorithm: to.Ptr("md5"), - // Value: to.Ptr("OA3i83YHGYVch+N8BQJIRQ=="), - // }, - // ContentSize: to.Ptr[int64](6), - // ContentVersion: to.Ptr("OA3i83YHGYVch+N8BQJIRQ=="), - // URI: to.Ptr("https://test-site.azurewebsites.net:443/runtime/webhooks/workflow/scaleUnits/prod-00/workflows/2dfde2fce2584c49bea17ef0b04c95f4/runs/08586776228332053161046300351/actions/testAction/repetitions/000001/contents/ActionOutputs?api-version=2016-10-01&se=2018-04-18T21%3A00%3A00.0000000Z&sp=%2Fruns%2F08586776228332053161046300351%2Factions%2FtestAction%2Frepetitions%2F000001%2Fcontents%2FActionOutputs%2Fread&sv=1.0&sig=B3-X5sqIAv1Lb31GOD34ZgIRUXGuiM2QllWiNwXFYAw"), - // }, - // TrackingID: to.Ptr("f84f23eb-b331-4772-9f39-cc307fa83bc3"), - // RepetitionIndexes: []*armappservice.RepetitionIndex{ - // { - // ItemIndex: to.Ptr[int32](1), - // ScopeName: to.Ptr("For_each"), - // }}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/WorkflowRunActionRepetitions_ListExpressionTraces.json -func ExampleWorkflowRunActionRepetitionsClient_NewListExpressionTracesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWorkflowRunActionRepetitionsClient().NewListExpressionTracesPager("testResourceGroup", "test-name", "testFlow", "08586776228332053161046300351", "testAction", "000001", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Inputs { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ExpressionTraces = armappservice.ExpressionTraces{ - // Inputs: []*armappservice.ExpressionRoot{ - // { - // Text: to.Ptr("items('For_each')?['OccuringLocation']?['Environment']"), - // Value: "PROD", - // Path: to.Ptr(""), - // }}, - // } - } -} diff --git a/sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitionsrequesthistories_client.go b/sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitionsrequesthistories_client.go index 5d6a7b3049e4..e8fae41d73cd 100644 --- a/sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitionsrequesthistories_client.go +++ b/sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitionsrequesthistories_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappservice @@ -33,7 +32,7 @@ type WorkflowRunActionRepetitionsRequestHistoriesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWorkflowRunActionRepetitionsRequestHistoriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowRunActionRepetitionsRequestHistoriesClient, error) { - cl, err := arm.NewClient(moduleName+".WorkflowRunActionRepetitionsRequestHistoriesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,7 +46,7 @@ func NewWorkflowRunActionRepetitionsRequestHistoriesClient(subscriptionID string // Get - Gets a workflow run repetition request history. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - workflowName - The workflow name. @@ -58,18 +57,25 @@ func NewWorkflowRunActionRepetitionsRequestHistoriesClient(subscriptionID string // - options - WorkflowRunActionRepetitionsRequestHistoriesClientGetOptions contains the optional parameters for the WorkflowRunActionRepetitionsRequestHistoriesClient.Get // method. func (client *WorkflowRunActionRepetitionsRequestHistoriesClient) Get(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, repetitionName string, requestHistoryName string, options *WorkflowRunActionRepetitionsRequestHistoriesClientGetOptions) (WorkflowRunActionRepetitionsRequestHistoriesClientGetResponse, error) { + var err error + const operationName = "WorkflowRunActionRepetitionsRequestHistoriesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, name, workflowName, runName, actionName, repetitionName, requestHistoryName, options) if err != nil { return WorkflowRunActionRepetitionsRequestHistoriesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowRunActionRepetitionsRequestHistoriesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowRunActionRepetitionsRequestHistoriesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowRunActionRepetitionsRequestHistoriesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -112,7 +118,7 @@ func (client *WorkflowRunActionRepetitionsRequestHistoriesClient) getCreateReque return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -129,7 +135,7 @@ func (client *WorkflowRunActionRepetitionsRequestHistoriesClient) getHandleRespo // NewListPager - List a workflow run repetition request history. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - workflowName - The workflow name. @@ -144,25 +150,20 @@ func (client *WorkflowRunActionRepetitionsRequestHistoriesClient) NewListPager(r return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WorkflowRunActionRepetitionsRequestHistoriesClientListResponse) (WorkflowRunActionRepetitionsRequestHistoriesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, name, workflowName, runName, actionName, repetitionName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkflowRunActionRepetitionsRequestHistoriesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, name, workflowName, runName, actionName, repetitionName, options) + }, nil) if err != nil { return WorkflowRunActionRepetitionsRequestHistoriesClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WorkflowRunActionRepetitionsRequestHistoriesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowRunActionRepetitionsRequestHistoriesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -202,7 +203,7 @@ func (client *WorkflowRunActionRepetitionsRequestHistoriesClient) listCreateRequ return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitionsrequesthistories_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitionsrequesthistories_client_example_test.go deleted file mode 100644 index f4a81175ac1d..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/workflowrunactionrepetitionsrequesthistories_client_example_test.go +++ /dev/null @@ -1,172 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/WorkflowRunActionRepetitionsRequestHistories_List.json -func ExampleWorkflowRunActionRepetitionsRequestHistoriesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWorkflowRunActionRepetitionsRequestHistoriesClient().NewListPager("test-resource-group", "test-name", "test-workflow", "08586776228332053161046300351", "HTTP_Webhook", "000001", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.RequestHistoryListResult = armappservice.RequestHistoryListResult{ - // Value: []*armappservice.RequestHistory{ - // { - // Name: to.Ptr("08586611142732800686"), - // Type: to.Ptr("/workflows/runs/actions/requestHistories"), - // ID: to.Ptr("/workflows/test-workflow/runs/08586611142736787787412824395CU21/actions/HTTP_Webhook/requestHistories/08586611142732800686"), - // Properties: &armappservice.RequestHistoryProperties{ - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-25T18:36:52.1863033Z"); return t}()), - // Response: &armappservice.Response{ - // BodyLink: &armappservice.ContentLink{ - // ContentHash: &armappservice.ContentHash{ - // Algorithm: to.Ptr("md5"), - // Value: to.Ptr("2LOOAR8Eh2pd7AvRHXUhRg=="), - // }, - // ContentSize: to.Ptr[int64](137), - // ContentVersion: to.Ptr("2LOOAR8Eh2pd7AvRHXUhRg=="), - // URI: to.Ptr("https://tempuri.org"), - // }, - // Headers: map[string]any{ - // "Cache-Control": "private", - // "Date": "Thu, 25 Oct 2018 18:36:51 GMT", - // "Location": "http://www.bing.com/", - // "Server": "Microsoft-IIS/10.0", - // "X-AspNet-Version": "4.0.30319", - // "X-Powered-By": "ASP.NET", - // }, - // StatusCode: to.Ptr[int32](302), - // }, - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-25T18:36:51.9206732Z"); return t}()), - // Request: &armappservice.Request{ - // Method: to.Ptr("GET"), - // Headers: map[string]any{ - // "Accept-Language": "en-US", - // "User-Agent": "azure-logic-apps/1.0,(workflow 80244732be3648f59d2084fd979cdd56; version 08586611142904036539)", - // "x-ms-action-tracking-id": "ad27f634-6523-492f-924e-9a75e28619c8", - // "x-ms-client-request-id": "ad484925-4148-4dd0-9488-07aed418b256", - // "x-ms-client-tracking-id": "08586611142736787787412824395CU21", - // "x-ms-correlation-id": "ad484925-4148-4dd0-9488-07aed418b256", - // "x-ms-execution-location": "brazilsouth", - // "x-ms-tracking-id": "ad484925-4148-4dd0-9488-07aed418b256", - // "x-ms-workflow-id": "80244732be3648f59d2084fd979cdd56", - // "x-ms-workflow-name": "test-workflow", - // "x-ms-workflow-operation-name": "HTTP_Webhook", - // "x-ms-workflow-resourcegroup-name": "test-resource-group", - // "x-ms-workflow-run-id": "08586611142736787787412824395CU21", - // "x-ms-workflow-run-tracking-id": "b4cd2e77-f949-4d8c-8753-791407aebde8", - // "x-ms-workflow-subscription-capacity": "Large", - // "x-ms-workflow-subscription-id": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", - // "x-ms-workflow-system-id": "/locations/brazilsouth/scaleunits/prod-17/workflows/80244732be3648f59d2084fd979cdd56", - // "x-ms-workflow-version": "08586611142904036539", - // }, - // URI: to.Ptr("http://tempuri.org"), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/WorkflowRunActionRepetitionsRequestHistories_Get.json -func ExampleWorkflowRunActionRepetitionsRequestHistoriesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWorkflowRunActionRepetitionsRequestHistoriesClient().Get(ctx, "test-resource-group", "test-name", "test-workflow", "08586776228332053161046300351", "HTTP_Webhook", "000001", "08586611142732800686", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.RequestHistory = armappservice.RequestHistory{ - // Name: to.Ptr("08586611142732800686"), - // Type: to.Ptr("/workflows/runs/actions/requestHistories"), - // ID: to.Ptr("/workflows/test-workflow/runs/08586611142736787787412824395CU21/actions/HTTP_Webhook/requestHistories/08586611142732800686"), - // Properties: &armappservice.RequestHistoryProperties{ - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-25T18:36:52.1863033Z"); return t}()), - // Response: &armappservice.Response{ - // BodyLink: &armappservice.ContentLink{ - // ContentHash: &armappservice.ContentHash{ - // Algorithm: to.Ptr("md5"), - // Value: to.Ptr("2LOOAR8Eh2pd7AvRHXUhRg=="), - // }, - // ContentSize: to.Ptr[int64](137), - // ContentVersion: to.Ptr("2LOOAR8Eh2pd7AvRHXUhRg=="), - // URI: to.Ptr("https://tempuri.org"), - // }, - // Headers: map[string]any{ - // "Cache-Control": "private", - // "Date": "Thu, 25 Oct 2018 18:36:51 GMT", - // "Location": "http://www.bing.com/", - // "Server": "Microsoft-IIS/10.0", - // "X-AspNet-Version": "4.0.30319", - // "X-Powered-By": "ASP.NET", - // }, - // StatusCode: to.Ptr[int32](302), - // }, - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-10-25T18:36:51.9206732Z"); return t}()), - // Request: &armappservice.Request{ - // Method: to.Ptr("GET"), - // Headers: map[string]any{ - // "Accept-Language": "en-US", - // "User-Agent": "azure-logic-apps/1.0,(workflow 80244732be3648f59d2084fd979cdd56; version 08586611142904036539)", - // "x-ms-action-tracking-id": "ad27f634-6523-492f-924e-9a75e28619c8", - // "x-ms-client-request-id": "ad484925-4148-4dd0-9488-07aed418b256", - // "x-ms-client-tracking-id": "08586611142736787787412824395CU21", - // "x-ms-correlation-id": "ad484925-4148-4dd0-9488-07aed418b256", - // "x-ms-execution-location": "brazilsouth", - // "x-ms-tracking-id": "ad484925-4148-4dd0-9488-07aed418b256", - // "x-ms-workflow-id": "80244732be3648f59d2084fd979cdd56", - // "x-ms-workflow-name": "test-workflow", - // "x-ms-workflow-operation-name": "HTTP_Webhook", - // "x-ms-workflow-resourcegroup-name": "test-resource-group", - // "x-ms-workflow-run-id": "08586611142736787787412824395CU21", - // "x-ms-workflow-run-tracking-id": "b4cd2e77-f949-4d8c-8753-791407aebde8", - // "x-ms-workflow-subscription-capacity": "Large", - // "x-ms-workflow-subscription-id": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", - // "x-ms-workflow-system-id": "/locations/brazilsouth/scaleunits/prod-17/workflows/80244732be3648f59d2084fd979cdd56", - // "x-ms-workflow-version": "08586611142904036539", - // }, - // URI: to.Ptr("http://tempuri.org"), - // }, - // }, - // } -} diff --git a/sdk/resourcemanager/appservice/armappservice/workflowrunactions_client.go b/sdk/resourcemanager/appservice/armappservice/workflowrunactions_client.go index 0e7a8618d684..1b229e8718aa 100644 --- a/sdk/resourcemanager/appservice/armappservice/workflowrunactions_client.go +++ b/sdk/resourcemanager/appservice/armappservice/workflowrunactions_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappservice @@ -34,7 +33,7 @@ type WorkflowRunActionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWorkflowRunActionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowRunActionsClient, error) { - cl, err := arm.NewClient(moduleName+".WorkflowRunActionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,7 +47,7 @@ func NewWorkflowRunActionsClient(subscriptionID string, credential azcore.TokenC // Get - Gets a workflow run action. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - workflowName - The workflow name. @@ -56,18 +55,25 @@ func NewWorkflowRunActionsClient(subscriptionID string, credential azcore.TokenC // - actionName - The workflow action name. // - options - WorkflowRunActionsClientGetOptions contains the optional parameters for the WorkflowRunActionsClient.Get method. func (client *WorkflowRunActionsClient) Get(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, options *WorkflowRunActionsClientGetOptions) (WorkflowRunActionsClientGetResponse, error) { + var err error + const operationName = "WorkflowRunActionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, name, workflowName, runName, actionName, options) if err != nil { return WorkflowRunActionsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowRunActionsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowRunActionsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowRunActionsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -102,7 +108,7 @@ func (client *WorkflowRunActionsClient) getCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -119,7 +125,7 @@ func (client *WorkflowRunActionsClient) getHandleResponse(resp *http.Response) ( // NewListPager - Gets a list of workflow run actions. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - workflowName - The workflow name. @@ -132,25 +138,20 @@ func (client *WorkflowRunActionsClient) NewListPager(resourceGroupName string, n return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WorkflowRunActionsClientListResponse) (WorkflowRunActionsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, name, workflowName, runName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkflowRunActionsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, name, workflowName, runName, options) + }, nil) if err != nil { return WorkflowRunActionsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WorkflowRunActionsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowRunActionsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -182,7 +183,7 @@ func (client *WorkflowRunActionsClient) listCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } @@ -205,7 +206,7 @@ func (client *WorkflowRunActionsClient) listHandleResponse(resp *http.Response) // NewListExpressionTracesPager - Lists a workflow run expression trace. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - workflowName - The workflow name. @@ -219,25 +220,20 @@ func (client *WorkflowRunActionsClient) NewListExpressionTracesPager(resourceGro return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WorkflowRunActionsClientListExpressionTracesResponse) (WorkflowRunActionsClientListExpressionTracesResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listExpressionTracesCreateRequest(ctx, resourceGroupName, name, workflowName, runName, actionName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkflowRunActionsClient.NewListExpressionTracesPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listExpressionTracesCreateRequest(ctx, resourceGroupName, name, workflowName, runName, actionName, options) + }, nil) if err != nil { return WorkflowRunActionsClientListExpressionTracesResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WorkflowRunActionsClientListExpressionTracesResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowRunActionsClientListExpressionTracesResponse{}, runtime.NewResponseError(resp) - } return client.listExpressionTracesHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -273,7 +269,7 @@ func (client *WorkflowRunActionsClient) listExpressionTracesCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/workflowrunactions_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/workflowrunactions_client_example_test.go deleted file mode 100644 index 20548a2ba49f..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/workflowrunactions_client_example_test.go +++ /dev/null @@ -1,147 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/WorkflowRunActions_List.json -func ExampleWorkflowRunActionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWorkflowRunActionsClient().NewListPager("test-resource-group", "test-name", "test-workflow", "08586676746934337772206998657CU22", &armappservice.WorkflowRunActionsClientListOptions{Top: nil, - Filter: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.WorkflowRunActionListResult = armappservice.WorkflowRunActionListResult{ - // Value: []*armappservice.WorkflowRunAction{ - // { - // ID: to.Ptr("/workflows/test-workflow/runs/08586676746934337772206998657CU22/actions/HTTP"), - // Name: to.Ptr("HTTP"), - // Type: to.Ptr("/workflows/runs/actions"), - // Properties: &armappservice.WorkflowRunActionProperties{ - // Code: to.Ptr("OK"), - // Correlation: &armappservice.RunActionCorrelation{ - // ClientTrackingID: to.Ptr("08586676746934337772206998657CU22"), - // ActionTrackingID: to.Ptr("56063357-45dd-4278-9be5-8220ce0cc9ca"), - // }, - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-10T20:16:32.5450625Z"); return t}()), - // InputsLink: &armappservice.ContentLink{ - // ContentSize: to.Ptr[int64](138), - // URI: to.Ptr("https://test-site.azurewebsites.net:443/runtime/webhooks/workflow/scaleUnits/prod-00/workflows/000012345678900000000056a41a/runs/00000aaaabbbbccccddddeeeeffff/actions/HTTP/contents/ActionInputs?api-version=2018-11-01&code=examplecode=2022-04-13T03%3A00%3A00.0000000Z&sp=%2Fruns%2F00000aaaabbbbccccddddeeeeffff%2Factions%2FHTTP%2Fcontents%2FActionInputs%2Fread&sv=1.0&sig=dJ6F00000aaaabbbbccccddddeeeeffff78co"), - // }, - // OutputsLink: &armappservice.ContentLink{ - // ContentSize: to.Ptr[int64](15660), - // URI: to.Ptr("https://test-site.azurewebsites.net:443/runtime/webhooks/workflow/scaleUnits/prod-00/workflows/000012345678900000000056a41a/runs/00000aaaabbbbccccddddeeeeffff/actions/HTTP/contents/ActionOutputs?api-version=2018-11-01&code=examplecode=2022-04-13T03%3A00%3A00.0000000Z&sp=%2Fruns%2F00000aaaabbbbccccddddeeeeffff%2Factions%2FHTTP%2Fcontents%2FActionOutputs%2Fread&sv=1.0&sig=fIIgF00000aaaabbbbccccddddeeeeffffWRU0"), - // }, - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-10T20:16:32.305236Z"); return t}()), - // Status: to.Ptr(armappservice.WorkflowStatusSucceeded), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/WorkflowRunActions_Get.json -func ExampleWorkflowRunActionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWorkflowRunActionsClient().Get(ctx, "test-resource-group", "test-name", "test-workflow", "08586676746934337772206998657CU22", "HTTP", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.WorkflowRunAction = armappservice.WorkflowRunAction{ - // ID: to.Ptr("/workflows/test-workflow/runs/08586676746934337772206998657CU22/actions/HTTP"), - // Name: to.Ptr("HTTP"), - // Type: to.Ptr("/workflows/runs/actions"), - // Properties: &armappservice.WorkflowRunActionProperties{ - // Code: to.Ptr("OK"), - // Correlation: &armappservice.RunActionCorrelation{ - // ClientTrackingID: to.Ptr("08586676746934337772206998657CU22"), - // ActionTrackingID: to.Ptr("56063357-45dd-4278-9be5-8220ce0cc9ca"), - // }, - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-10T20:16:32.5450625Z"); return t}()), - // InputsLink: &armappservice.ContentLink{ - // ContentSize: to.Ptr[int64](138), - // URI: to.Ptr("https://test-site.azurewebsites.net:443/runtime/webhooks/workflow/scaleUnits/prod-00/workflows/000012345678900000000056a41a/runs/00000aaaabbbbccccddddeeeeffff/actions/HTTP/contents/ActionInputs?api-version=2018-11-01&code=examplecode=2022-04-13T03%3A00%3A00.0000000Z&sp=%2Fruns%2F00000aaaabbbbccccddddeeeeffff%2Factions%2FHTTP%2Fcontents%2FActionInputs%2Fread&sv=1.0&sig=dJ6F00000aaaabbbbccccddddeeeeffff78co"), - // }, - // OutputsLink: &armappservice.ContentLink{ - // ContentSize: to.Ptr[int64](15660), - // URI: to.Ptr("https://test-site.azurewebsites.net:443/runtime/webhooks/workflow/scaleUnits/prod-00/workflows/000012345678900000000056a41a/runs/00000aaaabbbbccccddddeeeeffff/actions/HTTP/contents/ActionOutputs?api-version=2018-11-01&code=examplecode=2022-04-13T03%3A00%3A00.0000000Z&sp=%2Fruns%2F00000aaaabbbbccccddddeeeeffff%2Factions%2FHTTP%2Fcontents%2FActionOutputs%2Fread&sv=1.0&sig=fIIgF00000aaaabbbbccccddddeeeeffffWRU0"), - // }, - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-10T20:16:32.305236Z"); return t}()), - // Status: to.Ptr(armappservice.WorkflowStatusSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/WorkflowRunActions_ListExpressionTraces.json -func ExampleWorkflowRunActionsClient_NewListExpressionTracesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWorkflowRunActionsClient().NewListExpressionTracesPager("testResourceGroup", "test-name", "testFlow", "08586776228332053161046300351", "testAction", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Inputs { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ExpressionTraces = armappservice.ExpressionTraces{ - // Inputs: []*armappservice.ExpressionRoot{ - // { - // Text: to.Ptr("add(4, 4)"), - // Value: float64(8), - // Path: to.Ptr(""), - // }}, - // } - } -} diff --git a/sdk/resourcemanager/appservice/armappservice/workflowrunactionscoperepetitions_client.go b/sdk/resourcemanager/appservice/armappservice/workflowrunactionscoperepetitions_client.go index 4fad75d38f30..cc7f6b967bf9 100644 --- a/sdk/resourcemanager/appservice/armappservice/workflowrunactionscoperepetitions_client.go +++ b/sdk/resourcemanager/appservice/armappservice/workflowrunactionscoperepetitions_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappservice @@ -33,7 +32,7 @@ type WorkflowRunActionScopeRepetitionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWorkflowRunActionScopeRepetitionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowRunActionScopeRepetitionsClient, error) { - cl, err := arm.NewClient(moduleName+".WorkflowRunActionScopeRepetitionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,7 +46,7 @@ func NewWorkflowRunActionScopeRepetitionsClient(subscriptionID string, credentia // Get - Get a workflow run action scoped repetition. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - workflowName - The workflow name. @@ -57,18 +56,25 @@ func NewWorkflowRunActionScopeRepetitionsClient(subscriptionID string, credentia // - options - WorkflowRunActionScopeRepetitionsClientGetOptions contains the optional parameters for the WorkflowRunActionScopeRepetitionsClient.Get // method. func (client *WorkflowRunActionScopeRepetitionsClient) Get(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, actionName string, repetitionName string, options *WorkflowRunActionScopeRepetitionsClientGetOptions) (WorkflowRunActionScopeRepetitionsClientGetResponse, error) { + var err error + const operationName = "WorkflowRunActionScopeRepetitionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, name, workflowName, runName, actionName, repetitionName, options) if err != nil { return WorkflowRunActionScopeRepetitionsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowRunActionScopeRepetitionsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowRunActionScopeRepetitionsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowRunActionScopeRepetitionsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -107,7 +113,7 @@ func (client *WorkflowRunActionScopeRepetitionsClient) getCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -124,7 +130,7 @@ func (client *WorkflowRunActionScopeRepetitionsClient) getHandleResponse(resp *h // NewListPager - List the workflow run action scoped repetitions. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - workflowName - The workflow name. @@ -138,25 +144,20 @@ func (client *WorkflowRunActionScopeRepetitionsClient) NewListPager(resourceGrou return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WorkflowRunActionScopeRepetitionsClientListResponse) (WorkflowRunActionScopeRepetitionsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, name, workflowName, runName, actionName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkflowRunActionScopeRepetitionsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, name, workflowName, runName, actionName, options) + }, nil) if err != nil { return WorkflowRunActionScopeRepetitionsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WorkflowRunActionScopeRepetitionsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowRunActionScopeRepetitionsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -192,7 +193,7 @@ func (client *WorkflowRunActionScopeRepetitionsClient) listCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/workflowrunactionscoperepetitions_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/workflowrunactionscoperepetitions_client_example_test.go deleted file mode 100644 index 7d51f24ad507..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/workflowrunactionscoperepetitions_client_example_test.go +++ /dev/null @@ -1,126 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/WorkflowRunActionScopeRepetitions_List.json -func ExampleWorkflowRunActionScopeRepetitionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWorkflowRunActionScopeRepetitionsClient().NewListPager("testResourceGroup", "test-name", "testFlow", "08586776228332053161046300351", "for_each", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.WorkflowRunActionRepetitionDefinitionCollection = armappservice.WorkflowRunActionRepetitionDefinitionCollection{ - // Value: []*armappservice.WorkflowRunActionRepetitionDefinition{ - // { - // Name: to.Ptr("000000"), - // Type: to.Ptr("/workflows/runs/actions/scopeRepetitions"), - // ID: to.Ptr("/workflows/testFlow/runs/08586776228332053161046300351/actions/for_each/scopeRepetitions/000000"), - // Properties: &armappservice.WorkflowRunActionRepetitionProperties{ - // Code: to.Ptr("NotSpecified"), - // Correlation: &armappservice.RunActionCorrelation{ - // ClientTrackingID: to.Ptr("08586775357427610445444523191"), - // ActionTrackingID: to.Ptr("5c0e7c24-4891-44e8-b631-8084c5531dd5"), - // }, - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-18T17:05:57.6240967Z"); return t}()), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-18T17:05:57.209588Z"); return t}()), - // Status: to.Ptr(armappservice.WorkflowStatusSucceeded), - // RepetitionIndexes: []*armappservice.RepetitionIndex{ - // { - // ItemIndex: to.Ptr[int32](0), - // ScopeName: to.Ptr("For_each"), - // }}, - // }, - // }, - // { - // Name: to.Ptr("000001"), - // Type: to.Ptr("/workflows/runs/actions/scopeRepetitions"), - // ID: to.Ptr("/workflows/testFlow/runs/08586776228332053161046300351/actions/for_each/scopeRepetitions/000001"), - // Properties: &armappservice.WorkflowRunActionRepetitionProperties{ - // Code: to.Ptr("NotSpecified"), - // Correlation: &armappservice.RunActionCorrelation{ - // ClientTrackingID: to.Ptr("08586775357427610445444523191"), - // ActionTrackingID: to.Ptr("1682d0bd-7189-4478-b333-fe364a80bd69"), - // }, - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-18T17:05:57.2272796Z"); return t}()), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-18T17:05:57.0686808Z"); return t}()), - // Status: to.Ptr(armappservice.WorkflowStatusSucceeded), - // RepetitionIndexes: []*armappservice.RepetitionIndex{ - // { - // ItemIndex: to.Ptr[int32](1), - // ScopeName: to.Ptr("For_each"), - // }}, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/WorkflowRunActionScopeRepetitions_Get.json -func ExampleWorkflowRunActionScopeRepetitionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWorkflowRunActionScopeRepetitionsClient().Get(ctx, "testResourceGroup", "test-name", "testFlow", "08586776228332053161046300351", "for_each", "000000", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.WorkflowRunActionRepetitionDefinition = armappservice.WorkflowRunActionRepetitionDefinition{ - // Name: to.Ptr("000000"), - // Type: to.Ptr("/workflows/runs/actions/scopeRepetitions"), - // ID: to.Ptr("/workflows/testFlow/runs/08586776228332053161046300351/actions/for_each/scopeRepetitions/000000"), - // Properties: &armappservice.WorkflowRunActionRepetitionProperties{ - // Code: to.Ptr("NotSpecified"), - // Correlation: &armappservice.RunActionCorrelation{ - // ClientTrackingID: to.Ptr("08586775357427610445444523191"), - // ActionTrackingID: to.Ptr("5c0e7c24-4891-44e8-b631-8084c5531dd5"), - // }, - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-18T17:05:57.6240967Z"); return t}()), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-18T17:05:57.209588Z"); return t}()), - // Status: to.Ptr(armappservice.WorkflowStatusSucceeded), - // RepetitionIndexes: []*armappservice.RepetitionIndex{ - // { - // ItemIndex: to.Ptr[int32](0), - // ScopeName: to.Ptr("For_each"), - // }}, - // }, - // } -} diff --git a/sdk/resourcemanager/appservice/armappservice/workflowruns_client.go b/sdk/resourcemanager/appservice/armappservice/workflowruns_client.go index a99d402e69fa..f5ccd779167f 100644 --- a/sdk/resourcemanager/appservice/armappservice/workflowruns_client.go +++ b/sdk/resourcemanager/appservice/armappservice/workflowruns_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappservice @@ -34,7 +33,7 @@ type WorkflowRunsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWorkflowRunsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowRunsClient, error) { - cl, err := arm.NewClient(moduleName+".WorkflowRunsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,23 +47,29 @@ func NewWorkflowRunsClient(subscriptionID string, credential azcore.TokenCredent // Cancel - Cancels a workflow run. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - workflowName - The workflow name. // - runName - The workflow run name. // - options - WorkflowRunsClientCancelOptions contains the optional parameters for the WorkflowRunsClient.Cancel method. func (client *WorkflowRunsClient) Cancel(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, options *WorkflowRunsClientCancelOptions) (WorkflowRunsClientCancelResponse, error) { + var err error + const operationName = "WorkflowRunsClient.Cancel" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.cancelCreateRequest(ctx, resourceGroupName, name, workflowName, runName, options) if err != nil { return WorkflowRunsClientCancelResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowRunsClientCancelResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowRunsClientCancelResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowRunsClientCancelResponse{}, err } return WorkflowRunsClientCancelResponse{}, nil } @@ -97,7 +102,7 @@ func (client *WorkflowRunsClient) cancelCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -106,25 +111,32 @@ func (client *WorkflowRunsClient) cancelCreateRequest(ctx context.Context, resou // Get - Gets a workflow run. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - workflowName - The workflow name. // - runName - The workflow run name. // - options - WorkflowRunsClientGetOptions contains the optional parameters for the WorkflowRunsClient.Get method. func (client *WorkflowRunsClient) Get(ctx context.Context, resourceGroupName string, name string, workflowName string, runName string, options *WorkflowRunsClientGetOptions) (WorkflowRunsClientGetResponse, error) { + var err error + const operationName = "WorkflowRunsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, name, workflowName, runName, options) if err != nil { return WorkflowRunsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowRunsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowRunsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowRunsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -155,7 +167,7 @@ func (client *WorkflowRunsClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -172,7 +184,7 @@ func (client *WorkflowRunsClient) getHandleResponse(resp *http.Response) (Workfl // NewListPager - Gets a list of workflow runs. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - workflowName - The workflow name. @@ -183,25 +195,20 @@ func (client *WorkflowRunsClient) NewListPager(resourceGroupName string, name st return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WorkflowRunsClientListResponse) (WorkflowRunsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, name, workflowName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WorkflowRunsClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkflowRunsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, name, workflowName, options) + }, nil) if err != nil { return WorkflowRunsClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowRunsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -229,7 +236,7 @@ func (client *WorkflowRunsClient) listCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } diff --git a/sdk/resourcemanager/appservice/armappservice/workflowruns_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/workflowruns_client_example_test.go deleted file mode 100644 index f8ddbb208d46..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/workflowruns_client_example_test.go +++ /dev/null @@ -1,149 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/WorkflowRuns_List.json -func ExampleWorkflowRunsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWorkflowRunsClient().NewListPager("test-resource-group", "test-name", "test-workflow", &armappservice.WorkflowRunsClientListOptions{Top: nil, - Filter: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.WorkflowRunListResult = armappservice.WorkflowRunListResult{ - // Value: []*armappservice.WorkflowRun{ - // { - // ID: to.Ptr("workflows/test-workflow/runs/08586676746934337772206998657CU22"), - // Name: to.Ptr("08586676746934337772206998657CU22"), - // Type: to.Ptr("workflows/runs"), - // Properties: &armappservice.WorkflowRunProperties{ - // Correlation: &armappservice.Correlation{ - // ClientTrackingID: to.Ptr("08586676746934337772206998657CU22"), - // }, - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-10T20:16:32.5779999Z"); return t}()), - // Outputs: map[string]*armappservice.WorkflowOutputParameter{ - // }, - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-10T20:16:32.044238Z"); return t}()), - // Status: to.Ptr(armappservice.WorkflowStatusSucceeded), - // Trigger: &armappservice.WorkflowRunTrigger{ - // Name: to.Ptr("Recurrence"), - // Code: to.Ptr("OK"), - // Correlation: &armappservice.Correlation{ - // ClientTrackingID: to.Ptr("08586676746934337772206998657CU22"), - // }, - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-10T20:16:32.0387927Z"); return t}()), - // ScheduledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-10T20:16:31.6344174Z"); return t}()), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-10T20:16:32.0387927Z"); return t}()), - // Status: to.Ptr(armappservice.WorkflowStatusSucceeded), - // }, - // WaitEndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-10T20:16:32.044238Z"); return t}()), - // Workflow: &armappservice.ResourceReference{ - // Name: to.Ptr("08586676754160363885"), - // Type: to.Ptr("workflows/versions"), - // ID: to.Ptr("workflows/test-workflow/versions/08586676754160363885"), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/WorkflowRuns_Get.json -func ExampleWorkflowRunsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWorkflowRunsClient().Get(ctx, "test-resource-group", "test-name", "test-workflow", "08586676746934337772206998657CU22", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.WorkflowRun = armappservice.WorkflowRun{ - // ID: to.Ptr("/workflows/test-workflow/runs/08586676746934337772206998657CU22"), - // Name: to.Ptr("08586676746934337772206998657CU22"), - // Type: to.Ptr("workflows/runs"), - // Properties: &armappservice.WorkflowRunProperties{ - // Correlation: &armappservice.Correlation{ - // ClientTrackingID: to.Ptr("08586676746934337772206998657CU22"), - // }, - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-10T20:16:32.5779999Z"); return t}()), - // Outputs: map[string]*armappservice.WorkflowOutputParameter{ - // }, - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-10T20:16:32.044238Z"); return t}()), - // Status: to.Ptr(armappservice.WorkflowStatusSucceeded), - // Trigger: &armappservice.WorkflowRunTrigger{ - // Name: to.Ptr("Recurrence"), - // Code: to.Ptr("OK"), - // Correlation: &armappservice.Correlation{ - // ClientTrackingID: to.Ptr("08586676746934337772206998657CU22"), - // }, - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-10T20:16:32.0387927Z"); return t}()), - // ScheduledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-10T20:16:31.6344174Z"); return t}()), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-10T20:16:32.0387927Z"); return t}()), - // Status: to.Ptr(armappservice.WorkflowStatusSucceeded), - // }, - // WaitEndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-10T20:16:32.044238Z"); return t}()), - // Workflow: &armappservice.ResourceReference{ - // Name: to.Ptr("08586676754160363885"), - // Type: to.Ptr("workflows/versions"), - // ID: to.Ptr("/workflows/test-workflow/versions/08586676754160363885"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/WorkflowRuns_Cancel.json -func ExampleWorkflowRunsClient_Cancel() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewWorkflowRunsClient().Cancel(ctx, "test-resource-group", "test-name", "test-workflow", "08586676746934337772206998657CU22", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/appservice/armappservice/workflows_client.go b/sdk/resourcemanager/appservice/armappservice/workflows_client.go index d8ed85bc7cdf..f99ce8c8da89 100644 --- a/sdk/resourcemanager/appservice/armappservice/workflows_client.go +++ b/sdk/resourcemanager/appservice/armappservice/workflows_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappservice @@ -33,7 +32,7 @@ type WorkflowsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWorkflowsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowsClient, error) { - cl, err := arm.NewClient(moduleName+".WorkflowsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -47,7 +46,7 @@ func NewWorkflowsClient(subscriptionID string, credential azcore.TokenCredential // RegenerateAccessKey - Regenerates the callback URL access key for request triggers. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - workflowName - The workflow name. @@ -55,16 +54,22 @@ func NewWorkflowsClient(subscriptionID string, credential azcore.TokenCredential // - options - WorkflowsClientRegenerateAccessKeyOptions contains the optional parameters for the WorkflowsClient.RegenerateAccessKey // method. func (client *WorkflowsClient) RegenerateAccessKey(ctx context.Context, resourceGroupName string, name string, workflowName string, keyType RegenerateActionParameter, options *WorkflowsClientRegenerateAccessKeyOptions) (WorkflowsClientRegenerateAccessKeyResponse, error) { + var err error + const operationName = "WorkflowsClient.RegenerateAccessKey" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.regenerateAccessKeyCreateRequest(ctx, resourceGroupName, name, workflowName, keyType, options) if err != nil { return WorkflowsClientRegenerateAccessKeyResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowsClientRegenerateAccessKeyResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowsClientRegenerateAccessKeyResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowsClientRegenerateAccessKeyResponse{}, err } return WorkflowsClientRegenerateAccessKeyResponse{}, nil } @@ -93,32 +98,41 @@ func (client *WorkflowsClient) regenerateAccessKeyCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, keyType) + if err := runtime.MarshalAsJSON(req, keyType); err != nil { + return nil, err + } + return req, nil } // Validate - Validates the workflow definition. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - workflowName - The workflow name. // - validate - The workflow. // - options - WorkflowsClientValidateOptions contains the optional parameters for the WorkflowsClient.Validate method. func (client *WorkflowsClient) Validate(ctx context.Context, resourceGroupName string, name string, workflowName string, validate Workflow, options *WorkflowsClientValidateOptions) (WorkflowsClientValidateResponse, error) { + var err error + const operationName = "WorkflowsClient.Validate" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.validateCreateRequest(ctx, resourceGroupName, name, workflowName, validate, options) if err != nil { return WorkflowsClientValidateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowsClientValidateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowsClientValidateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowsClientValidateResponse{}, err } return WorkflowsClientValidateResponse{}, nil } @@ -147,8 +161,11 @@ func (client *WorkflowsClient) validateCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, validate) + if err := runtime.MarshalAsJSON(req, validate); err != nil { + return nil, err + } + return req, nil } diff --git a/sdk/resourcemanager/appservice/armappservice/workflows_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/workflows_client_example_test.go deleted file mode 100644 index 55e57de8bf83..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/workflows_client_example_test.go +++ /dev/null @@ -1,67 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/Workflows_RegenerateAccessKey.json -func ExampleWorkflowsClient_RegenerateAccessKey() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewWorkflowsClient().RegenerateAccessKey(ctx, "testResourceGroup", "test-name", "testWorkflowName", armappservice.RegenerateActionParameter{ - KeyType: to.Ptr(armappservice.KeyTypePrimary), - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/Workflows_Validate.json -func ExampleWorkflowsClient_Validate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewWorkflowsClient().Validate(ctx, "test-resource-group", "test-name", "test-workflow", armappservice.Workflow{ - Properties: &armappservice.WorkflowProperties{ - Definition: map[string]any{ - "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", - "actions": map[string]any{}, - "contentVersion": "1.0.0.0", - "outputs": map[string]any{}, - "parameters": map[string]any{}, - "triggers": map[string]any{}, - }, - Kind: to.Ptr(armappservice.KindStateful), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/appservice/armappservice/workflowtriggerhistories_client.go b/sdk/resourcemanager/appservice/armappservice/workflowtriggerhistories_client.go index d71c60c26d3a..636691cbb640 100644 --- a/sdk/resourcemanager/appservice/armappservice/workflowtriggerhistories_client.go +++ b/sdk/resourcemanager/appservice/armappservice/workflowtriggerhistories_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappservice @@ -34,7 +33,7 @@ type WorkflowTriggerHistoriesClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWorkflowTriggerHistoriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowTriggerHistoriesClient, error) { - cl, err := arm.NewClient(moduleName+".WorkflowTriggerHistoriesClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,7 +47,7 @@ func NewWorkflowTriggerHistoriesClient(subscriptionID string, credential azcore. // Get - Gets a workflow trigger history. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - workflowName - The workflow name. @@ -57,18 +56,25 @@ func NewWorkflowTriggerHistoriesClient(subscriptionID string, credential azcore. // - options - WorkflowTriggerHistoriesClientGetOptions contains the optional parameters for the WorkflowTriggerHistoriesClient.Get // method. func (client *WorkflowTriggerHistoriesClient) Get(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, historyName string, options *WorkflowTriggerHistoriesClientGetOptions) (WorkflowTriggerHistoriesClientGetResponse, error) { + var err error + const operationName = "WorkflowTriggerHistoriesClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, name, workflowName, triggerName, historyName, options) if err != nil { return WorkflowTriggerHistoriesClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowTriggerHistoriesClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowTriggerHistoriesClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowTriggerHistoriesClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -103,7 +109,7 @@ func (client *WorkflowTriggerHistoriesClient) getCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -120,7 +126,7 @@ func (client *WorkflowTriggerHistoriesClient) getHandleResponse(resp *http.Respo // NewListPager - Gets a list of workflow trigger histories. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - workflowName - The workflow name. @@ -133,25 +139,20 @@ func (client *WorkflowTriggerHistoriesClient) NewListPager(resourceGroupName str return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WorkflowTriggerHistoriesClientListResponse) (WorkflowTriggerHistoriesClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, name, workflowName, triggerName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WorkflowTriggerHistoriesClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkflowTriggerHistoriesClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, name, workflowName, triggerName, options) + }, nil) if err != nil { return WorkflowTriggerHistoriesClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowTriggerHistoriesClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -183,7 +184,7 @@ func (client *WorkflowTriggerHistoriesClient) listCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } @@ -207,7 +208,7 @@ func (client *WorkflowTriggerHistoriesClient) listHandleResponse(resp *http.Resp // BeginResubmit - Resubmits a workflow run based on the trigger history. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - workflowName - The workflow name. @@ -221,29 +222,40 @@ func (client *WorkflowTriggerHistoriesClient) BeginResubmit(ctx context.Context, if err != nil { return nil, err } - return runtime.NewPoller[WorkflowTriggerHistoriesClientResubmitResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkflowTriggerHistoriesClientResubmitResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WorkflowTriggerHistoriesClientResubmitResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WorkflowTriggerHistoriesClientResubmitResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Resubmit - Resubmits a workflow run based on the trigger history. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *WorkflowTriggerHistoriesClient) resubmit(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, historyName string, options *WorkflowTriggerHistoriesClientBeginResubmitOptions) (*http.Response, error) { + var err error + const operationName = "WorkflowTriggerHistoriesClient.BeginResubmit" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.resubmitCreateRequest(ctx, resourceGroupName, name, workflowName, triggerName, historyName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // resubmitCreateRequest creates the Resubmit request. @@ -278,7 +290,7 @@ func (client *WorkflowTriggerHistoriesClient) resubmitCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/workflowtriggerhistories_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/workflowtriggerhistories_client_example_test.go deleted file mode 100644 index d53d4b6d549b..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/workflowtriggerhistories_client_example_test.go +++ /dev/null @@ -1,131 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/WorkflowTriggerHistories_List.json -func ExampleWorkflowTriggerHistoriesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWorkflowTriggerHistoriesClient().NewListPager("testResourceGroup", "test-name", "testWorkflowName", "testTriggerName", &armappservice.WorkflowTriggerHistoriesClientListOptions{Top: nil, - Filter: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.WorkflowTriggerHistoryListResult = armappservice.WorkflowTriggerHistoryListResult{ - // Value: []*armappservice.WorkflowTriggerHistory{ - // { - // ID: to.Ptr("/workflows/testWorkflowName/triggers/testTriggerName/histories/08586676746934337772206998657CU22"), - // Name: to.Ptr("08586676746934337772206998657CU22"), - // Type: to.Ptr("/workflows/triggers/histories"), - // Properties: &armappservice.WorkflowTriggerHistoryProperties{ - // Code: to.Ptr("OK"), - // Correlation: &armappservice.Correlation{ - // ClientTrackingID: to.Ptr("08586676746934337772206998657CU22"), - // }, - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-10T20:16:32.2987996Z"); return t}()), - // Fired: to.Ptr(true), - // Run: &armappservice.ResourceReference{ - // Name: to.Ptr("08586676746934337772206998657CU22"), - // Type: to.Ptr("/workflows/runs"), - // ID: to.Ptr("/workflows/testWorkflowName/runs/08586676746934337772206998657CU22"), - // }, - // ScheduledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-10T20:16:31.6344174Z"); return t}()), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-10T20:16:32.0387927Z"); return t}()), - // Status: to.Ptr(armappservice.WorkflowStatusSucceeded), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/WorkflowTriggerHistories_Get.json -func ExampleWorkflowTriggerHistoriesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWorkflowTriggerHistoriesClient().Get(ctx, "testResourceGroup", "test-name", "testWorkflowName", "testTriggerName", "08586676746934337772206998657CU22", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.WorkflowTriggerHistory = armappservice.WorkflowTriggerHistory{ - // ID: to.Ptr("/workflows/testWorkflowName/triggers/testTriggerName/histories/08586676746934337772206998657CU22"), - // Name: to.Ptr("08586676746934337772206998657CU22"), - // Type: to.Ptr("/workflows/triggers/histories"), - // Properties: &armappservice.WorkflowTriggerHistoryProperties{ - // Code: to.Ptr("OK"), - // Correlation: &armappservice.Correlation{ - // ClientTrackingID: to.Ptr("08586676746934337772206998657CU22"), - // }, - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-10T20:16:32.2987996Z"); return t}()), - // Fired: to.Ptr(true), - // Run: &armappservice.ResourceReference{ - // Name: to.Ptr("08586676746934337772206998657CU22"), - // Type: to.Ptr("/workflows/runs"), - // ID: to.Ptr("/workflows/testWorkflowName/runs/08586676746934337772206998657CU22"), - // }, - // ScheduledTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-10T20:16:31.6344174Z"); return t}()), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-10T20:16:32.0387927Z"); return t}()), - // Status: to.Ptr(armappservice.WorkflowStatusSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/WorkflowTriggerHistories_Resubmit.json -func ExampleWorkflowTriggerHistoriesClient_BeginResubmit() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewWorkflowTriggerHistoriesClient().BeginResubmit(ctx, "testResourceGroup", "test-name", "testWorkflowName", "testTriggerName", "testHistoryName", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/appservice/armappservice/workflowtriggers_client.go b/sdk/resourcemanager/appservice/armappservice/workflowtriggers_client.go index 2ad14314c4ba..a8497d4bbb5c 100644 --- a/sdk/resourcemanager/appservice/armappservice/workflowtriggers_client.go +++ b/sdk/resourcemanager/appservice/armappservice/workflowtriggers_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappservice @@ -34,7 +33,7 @@ type WorkflowTriggersClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWorkflowTriggersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowTriggersClient, error) { - cl, err := arm.NewClient(moduleName+".WorkflowTriggersClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,25 +47,32 @@ func NewWorkflowTriggersClient(subscriptionID string, credential azcore.TokenCre // Get - Gets a workflow trigger. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - workflowName - The workflow name. // - triggerName - The workflow trigger name. // - options - WorkflowTriggersClientGetOptions contains the optional parameters for the WorkflowTriggersClient.Get method. func (client *WorkflowTriggersClient) Get(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, options *WorkflowTriggersClientGetOptions) (WorkflowTriggersClientGetResponse, error) { + var err error + const operationName = "WorkflowTriggersClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, name, workflowName, triggerName, options) if err != nil { return WorkflowTriggersClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowTriggersClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowTriggersClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowTriggersClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -97,7 +103,7 @@ func (client *WorkflowTriggersClient) getCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -115,7 +121,7 @@ func (client *WorkflowTriggersClient) getHandleResponse(resp *http.Response) (Wo // GetSchemaJSON - Get the trigger schema as JSON. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - workflowName - The workflow name. @@ -123,18 +129,25 @@ func (client *WorkflowTriggersClient) getHandleResponse(resp *http.Response) (Wo // - options - WorkflowTriggersClientGetSchemaJSONOptions contains the optional parameters for the WorkflowTriggersClient.GetSchemaJSON // method. func (client *WorkflowTriggersClient) GetSchemaJSON(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, options *WorkflowTriggersClientGetSchemaJSONOptions) (WorkflowTriggersClientGetSchemaJSONResponse, error) { + var err error + const operationName = "WorkflowTriggersClient.GetSchemaJSON" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getSchemaJSONCreateRequest(ctx, resourceGroupName, name, workflowName, triggerName, options) if err != nil { return WorkflowTriggersClientGetSchemaJSONResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowTriggersClientGetSchemaJSONResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowTriggersClientGetSchemaJSONResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowTriggersClientGetSchemaJSONResponse{}, err } - return client.getSchemaJSONHandleResponse(resp) + resp, err := client.getSchemaJSONHandleResponse(httpResp) + return resp, err } // getSchemaJSONCreateRequest creates the GetSchemaJSON request. @@ -165,7 +178,7 @@ func (client *WorkflowTriggersClient) getSchemaJSONCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -182,7 +195,7 @@ func (client *WorkflowTriggersClient) getSchemaJSONHandleResponse(resp *http.Res // NewListPager - Gets a list of workflow triggers. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - workflowName - The workflow name. @@ -194,25 +207,20 @@ func (client *WorkflowTriggersClient) NewListPager(resourceGroupName string, nam return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WorkflowTriggersClientListResponse) (WorkflowTriggersClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, name, workflowName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) - } - if err != nil { - return WorkflowTriggersClientListResponse{}, err + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkflowTriggersClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } - resp, err := client.internal.Pipeline().Do(req) + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, name, workflowName, options) + }, nil) if err != nil { return WorkflowTriggersClientListResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowTriggersClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -240,7 +248,7 @@ func (client *WorkflowTriggersClient) listCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } @@ -264,7 +272,7 @@ func (client *WorkflowTriggersClient) listHandleResponse(resp *http.Response) (W // ListCallbackURL - Get the callback URL for a workflow trigger. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - workflowName - The workflow name. @@ -272,18 +280,25 @@ func (client *WorkflowTriggersClient) listHandleResponse(resp *http.Response) (W // - options - WorkflowTriggersClientListCallbackURLOptions contains the optional parameters for the WorkflowTriggersClient.ListCallbackURL // method. func (client *WorkflowTriggersClient) ListCallbackURL(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, options *WorkflowTriggersClientListCallbackURLOptions) (WorkflowTriggersClientListCallbackURLResponse, error) { + var err error + const operationName = "WorkflowTriggersClient.ListCallbackURL" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.listCallbackURLCreateRequest(ctx, resourceGroupName, name, workflowName, triggerName, options) if err != nil { return WorkflowTriggersClientListCallbackURLResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowTriggersClientListCallbackURLResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowTriggersClientListCallbackURLResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowTriggersClientListCallbackURLResponse{}, err } - return client.listCallbackURLHandleResponse(resp) + resp, err := client.listCallbackURLHandleResponse(httpResp) + return resp, err } // listCallbackURLCreateRequest creates the ListCallbackURL request. @@ -314,7 +329,7 @@ func (client *WorkflowTriggersClient) listCallbackURLCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -332,7 +347,7 @@ func (client *WorkflowTriggersClient) listCallbackURLHandleResponse(resp *http.R // BeginRun - Runs a workflow trigger. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - workflowName - The workflow name. @@ -345,29 +360,40 @@ func (client *WorkflowTriggersClient) BeginRun(ctx context.Context, resourceGrou if err != nil { return nil, err } - return runtime.NewPoller[WorkflowTriggersClientRunResponse](resp, client.internal.Pipeline(), nil) + poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[WorkflowTriggersClientRunResponse]{ + Tracer: client.internal.Tracer(), + }) + return poller, err } else { - return runtime.NewPollerFromResumeToken[WorkflowTriggersClientRunResponse](options.ResumeToken, client.internal.Pipeline(), nil) + return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[WorkflowTriggersClientRunResponse]{ + Tracer: client.internal.Tracer(), + }) } } // Run - Runs a workflow trigger. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 func (client *WorkflowTriggersClient) run(ctx context.Context, resourceGroupName string, name string, workflowName string, triggerName string, options *WorkflowTriggersClientBeginRunOptions) (*http.Response, error) { + var err error + const operationName = "WorkflowTriggersClient.BeginRun" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.runCreateRequest(ctx, resourceGroupName, name, workflowName, triggerName, options) if err != nil { return nil, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return nil, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { - return nil, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { + err = runtime.NewResponseError(httpResp) + return nil, err } - return resp, nil + return httpResp, nil } // runCreateRequest creates the Run request. @@ -398,7 +424,7 @@ func (client *WorkflowTriggersClient) runCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/appservice/armappservice/workflowtriggers_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/workflowtriggers_client_example_test.go deleted file mode 100644 index d829cc6c51a9..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/workflowtriggers_client_example_test.go +++ /dev/null @@ -1,176 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/WorkflowTriggers_List.json -func ExampleWorkflowTriggersClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWorkflowTriggersClient().NewListPager("test-resource-group", "test-name", "test-workflow", &armappservice.WorkflowTriggersClientListOptions{Top: nil, - Filter: nil, - }) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.WorkflowTriggerListResult = armappservice.WorkflowTriggerListResult{ - // Value: []*armappservice.WorkflowTrigger{ - // { - // ID: to.Ptr("/workflows/test-workflow/triggers/manual"), - // Name: to.Ptr("manual"), - // Type: to.Ptr("/workflows/triggers"), - // Properties: &armappservice.WorkflowTriggerProperties{ - // ChangedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-10T18:47:49.5288666Z"); return t}()), - // CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-10T17:32:30.2496336Z"); return t}()), - // ProvisioningState: to.Ptr(armappservice.WorkflowTriggerProvisioningStateSucceeded), - // State: to.Ptr(armappservice.WorkflowStateEnabled), - // Workflow: &armappservice.ResourceReference{ - // Name: to.Ptr("08586676800160476478"), - // Type: to.Ptr("/workflows/versions"), - // ID: to.Ptr("/workflows/test-workflow/versions/08586676800160476478"), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/WorkflowTriggers_Get.json -func ExampleWorkflowTriggersClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWorkflowTriggersClient().Get(ctx, "test-resource-group", "test-name", "test-workflow", "manual", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.WorkflowTrigger = armappservice.WorkflowTrigger{ - // ID: to.Ptr("/workflows/test-workflow/triggers/manual"), - // Name: to.Ptr("manual"), - // Type: to.Ptr("/workflows/triggers"), - // Properties: &armappservice.WorkflowTriggerProperties{ - // ChangedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-10T18:47:49.5288666Z"); return t}()), - // CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-10T17:32:30.2496336Z"); return t}()), - // ProvisioningState: to.Ptr(armappservice.WorkflowTriggerProvisioningStateSucceeded), - // State: to.Ptr(armappservice.WorkflowStateEnabled), - // Workflow: &armappservice.ResourceReference{ - // Name: to.Ptr("08586676800160476478"), - // Type: to.Ptr("/workflows/versions"), - // ID: to.Ptr("/workflows/test-workflow/versions/08586676800160476478"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/WorkflowTriggers_ListCallbackUrl.json -func ExampleWorkflowTriggersClient_ListCallbackURL() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWorkflowTriggersClient().ListCallbackURL(ctx, "test-resource-group", "test-name", "test-workflow", "manual", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.WorkflowTriggerCallbackURL = armappservice.WorkflowTriggerCallbackURL{ - // Method: to.Ptr("POST"), - // BasePath: to.Ptr("https://test-site.azurewebsites.net:443/runtime/webhooks/workflow/scaleUnits/prod-00/workflows/fb9c8d79b15f41ce9b12861862f43546/versions/08587100027316071865/triggers/manualTrigger/paths/invoke"), - // Queries: &armappservice.WorkflowTriggerListCallbackURLQueries{ - // APIVersion: to.Ptr("2018-07-01-preview"), - // Sig: to.Ptr("IxEQ_ygZf6WNEQCbjV0Vs6p6Y4DyNEJVAa86U5B4xhk"), - // Sp: to.Ptr("/versions/08587100027316071865/triggers/manualTrigger/run"), - // Sv: to.Ptr("1.0"), - // }, - // Value: to.Ptr("https://test-site.azurewebsites.net:443/runtime/webhooks/workflow/scaleUnits/prod-00/workflows/fb9c8d79b15f41ce9b12861862f43546/versions/08587100027316071865/triggers/manualTrigger/paths/invoke?api-version=2015-08-01-preview&sp=%2Fversions%2F08587100027316071865%2Ftriggers%2FmanualTrigger%2Frun&sv=1.0&sig=IxEQ_ygZf6WNEQCbjV0Vs6p6Y4DyNEJVAa86U5B4xhk"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/WorkflowTriggers_Run.json -func ExampleWorkflowTriggersClient_BeginRun() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewWorkflowTriggersClient().BeginRun(ctx, "test-resource-group", "test-name", "test-workflow", "recurrence", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/WorkflowTriggers_GetSchemaJson.json -func ExampleWorkflowTriggersClient_GetSchemaJSON() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWorkflowTriggersClient().GetSchemaJSON(ctx, "testResourceGroup", "test-name", "testWorkflow", "testTrigger", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.JSONSchema = armappservice.JSONSchema{ - // Content: to.Ptr("JsonContent"), - // Title: to.Ptr("JsonTitle"), - // } -} diff --git a/sdk/resourcemanager/appservice/armappservice/workflowversions_client.go b/sdk/resourcemanager/appservice/armappservice/workflowversions_client.go index 7e3da16fa864..b4ae8c3598c1 100644 --- a/sdk/resourcemanager/appservice/armappservice/workflowversions_client.go +++ b/sdk/resourcemanager/appservice/armappservice/workflowversions_client.go @@ -3,9 +3,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armappservice @@ -34,7 +33,7 @@ type WorkflowVersionsClient struct { // - credential - used to authorize requests. Usually a credential from azidentity. // - options - pass nil to accept the default values. func NewWorkflowVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkflowVersionsClient, error) { - cl, err := arm.NewClient(moduleName+".WorkflowVersionsClient", moduleVersion, credential, options) + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) if err != nil { return nil, err } @@ -48,25 +47,32 @@ func NewWorkflowVersionsClient(subscriptionID string, credential azcore.TokenCre // Get - Gets a workflow version. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - workflowName - The workflow name. // - versionID - The workflow versionId. // - options - WorkflowVersionsClientGetOptions contains the optional parameters for the WorkflowVersionsClient.Get method. func (client *WorkflowVersionsClient) Get(ctx context.Context, resourceGroupName string, name string, workflowName string, versionID string, options *WorkflowVersionsClientGetOptions) (WorkflowVersionsClientGetResponse, error) { + var err error + const operationName = "WorkflowVersionsClient.Get" + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) + ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) + defer func() { endSpan(err) }() req, err := client.getCreateRequest(ctx, resourceGroupName, name, workflowName, versionID, options) if err != nil { return WorkflowVersionsClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return WorkflowVersionsClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowVersionsClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return WorkflowVersionsClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. @@ -97,7 +103,7 @@ func (client *WorkflowVersionsClient) getCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -114,7 +120,7 @@ func (client *WorkflowVersionsClient) getHandleResponse(resp *http.Response) (Wo // NewListPager - Gets a list of workflow versions. // -// Generated from API version 2022-09-01 +// Generated from API version 2023-01-01 // - resourceGroupName - Name of the resource group to which the resource belongs. // - name - Site name. // - workflowName - The workflow name. @@ -126,25 +132,20 @@ func (client *WorkflowVersionsClient) NewListPager(resourceGroupName string, nam return page.NextLink != nil && len(*page.NextLink) > 0 }, Fetcher: func(ctx context.Context, page *WorkflowVersionsClientListResponse) (WorkflowVersionsClientListResponse, error) { - var req *policy.Request - var err error - if page == nil { - req, err = client.listCreateRequest(ctx, resourceGroupName, name, workflowName, options) - } else { - req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "WorkflowVersionsClient.NewListPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listCreateRequest(ctx, resourceGroupName, name, workflowName, options) + }, nil) if err != nil { return WorkflowVersionsClientListResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) - if err != nil { - return WorkflowVersionsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WorkflowVersionsClientListResponse{}, runtime.NewResponseError(resp) - } return client.listHandleResponse(resp) }, + Tracer: client.internal.Tracer(), }) } @@ -172,7 +173,7 @@ func (client *WorkflowVersionsClient) listCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-09-01") + reqQP.Set("api-version", "2023-01-01") if options != nil && options.Top != nil { reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) } diff --git a/sdk/resourcemanager/appservice/armappservice/workflowversions_client_example_test.go b/sdk/resourcemanager/appservice/armappservice/workflowversions_client_example_test.go deleted file mode 100644 index de8ad75b4204..000000000000 --- a/sdk/resourcemanager/appservice/armappservice/workflowversions_client_example_test.go +++ /dev/null @@ -1,138 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armappservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appservice/armappservice/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/WorkflowVersions_List.json -func ExampleWorkflowVersionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewWorkflowVersionsClient().NewListPager("test-resource-group", "test-name", "test-workflow", &armappservice.WorkflowVersionsClientListOptions{Top: nil}) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.WorkflowVersionListResult = armappservice.WorkflowVersionListResult{ - // Value: []*armappservice.WorkflowVersion{ - // { - // Name: to.Ptr("test-workflow"), - // Type: to.Ptr("/workflows/versions"), - // ID: to.Ptr("/workflows/test-workflow"), - // Properties: &armappservice.WorkflowVersionProperties{ - // ChangedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-09T22:54:54.3533634Z"); return t}()), - // CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-25T01:39:21.4365247Z"); return t}()), - // Definition: map[string]any{ - // "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", - // "actions":map[string]any{ - // }, - // "contentVersion": "1.0.0.0", - // "outputs":map[string]any{ - // }, - // "parameters":map[string]any{ - // }, - // "triggers":map[string]any{ - // }, - // }, - // EndpointsConfiguration: &armappservice.FlowEndpointsConfiguration{ - // Connector: &armappservice.FlowEndpoints{ - // OutgoingIPAddresses: []*armappservice.IPAddress{ - // }, - // }, - // Workflow: &armappservice.FlowEndpoints{ - // AccessEndpointIPAddresses: []*armappservice.IPAddress{ - // }, - // OutgoingIPAddresses: []*armappservice.IPAddress{ - // }, - // }, - // }, - // Parameters: map[string]*armappservice.WorkflowParameter{ - // }, - // Version: to.Ptr("08586677515911718341"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/10c740b7224771c889cfb92f128168f5a0568c26/specification/web/resource-manager/Microsoft.Web/stable/2022-09-01/examples/WorkflowVersions_Get.json -func ExampleWorkflowVersionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armappservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewWorkflowVersionsClient().Get(ctx, "test-resource-group", "test-name", "test-workflow", "08586676824806722526", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.WorkflowVersion = armappservice.WorkflowVersion{ - // Name: to.Ptr("test-workflow"), - // Type: to.Ptr("/workflows/versions"), - // ID: to.Ptr("/workflows/test-workflow"), - // Properties: &armappservice.WorkflowVersionProperties{ - // ChangedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-09T22:54:54.3533634Z"); return t}()), - // CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-04-25T01:39:21.4365247Z"); return t}()), - // Definition: map[string]any{ - // "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", - // "actions":map[string]any{ - // }, - // "contentVersion": "1.0.0.0", - // "outputs":map[string]any{ - // }, - // "parameters":map[string]any{ - // }, - // "triggers":map[string]any{ - // }, - // }, - // EndpointsConfiguration: &armappservice.FlowEndpointsConfiguration{ - // Connector: &armappservice.FlowEndpoints{ - // OutgoingIPAddresses: []*armappservice.IPAddress{ - // }, - // }, - // Workflow: &armappservice.FlowEndpoints{ - // AccessEndpointIPAddresses: []*armappservice.IPAddress{ - // }, - // OutgoingIPAddresses: []*armappservice.IPAddress{ - // }, - // }, - // }, - // Parameters: map[string]*armappservice.WorkflowParameter{ - // }, - // Version: to.Ptr("08586677515911718341"), - // }, - // } -}